2 --------------------------------------------------------------------------------
3 Contents of the tools directory:
4 --------------------------------------------------------------------------------
7 cm-reparent.pl Fix thread parenting for two or more messages
8 cm-break.pl Remove thread parenting for one or more messages
9 ddg_search.pl Search DuckDuckGo for selected text
10 google_msgid.pl Search groups.google.com for selected message-id
11 multiwebsearch.pl Search any search engine for the selected text
12 textviewer.sh Attempt to view an attachment as plain text
13 uudec Decode and display uuencoded images
14 uuooffice Decode uuencoded attachments and open them with
17 Addressbook conversion:
18 csv2addressbook.pl Import Becky, Thunderbird, Kmail, Gmail and Fox
20 eud2gc.py Convert Eudora address book to Gnomecard
21 kmail2claws-mail.pl Import a Kmail address book (KDE2)
22 kmail2claws-mail_v2.pl Import a Kmail address book (KDE3)
23 mew2claws-mail.pl Import a Mew address book
24 outlook2claws-mail.pl Import an Outlook generated contact list
25 tb2claws-mail Import The Bat! address books
26 vcard2xml.py Import an Evolution vCard
29 calypso_convert.pl Import mbox files with attachments from Calypso
30 convert_mbox.pl Import mbox files
31 kmail-mailbox2claws-mail.pl Convert a kmail mailbox to a Claws Mail mailbox
32 tbird2claws.py Integrate a Thunderbird folder tree into Claws
35 acroread2claws-mail.pl Send PDFs from Adobe Reader 7
36 claws-mail-compose-insert-files.pl
37 Insert files into a new Compose window
38 filter_conv_new.pl Convert new-style Sylpheed filters to filtering
39 filter_conv.pl Convert old-style Sylpheed filters to filtering
40 fix-date.sh Replace/Add a message's Date field
41 mairix.sh A wrapper to mairix, to enable global searches in
43 nautilus2claws-mail.sh Send files from Nautilus
44 popfile-link.sh Open messages in POPFile control center to edit
46 textviewer.pl Display various attachments as text
47 thunderbird-filters-convertor.pl
48 Convert Thunderbird filtering rules
51 gif2xface.pl Convert a 48x48 GIF file to an X-Face header
52 update-po Update the .po files named on the command line.
54 --------------------------------------------------------------------------------
55 Detailed Descriptions:
56 --------------------------------------------------------------------------------
62 WORKS ON: selected messages (two or more)
63 COMMAND: cm-reparent.pl %F
64 Thread the selected messages based on date, old to new
67 WORKS ON: selected messages (one or more)
68 COMMAND: cm-break.pl %F
69 Break thread references for the selected messages
73 COMMAND: |ddg_search.pl
74 Search duckduckgo.com for selected text using the default Claws Mail browser
78 COMMAND: |google_msgid.pl
79 Lookup selected message-id in google using mozilla. Edit the script to use
84 see further down for details
87 WORKS ON: current message part
88 COMMAND: textviewer.sh %p |
89 Attempt to view an attachment as plain text
92 WORKS ON: current message (or part of multipart message)
94 Decode and display uuencoded images using uudecode.
97 WORKS ON: current message (or part of multipart message)
98 COMMAND: uuooffice %f&
99 Decode uuencoded attachments and open them with OpenOffice
101 * More action examples can be found at the Claws Mail FAQ
102 http://www.claws-mail.org/faq/index.php/Actions
104 ** multiwebsearch.pl **
107 This is an Actions script that allows you to search
108 websites for the selected text. It uses the default
109 Claws Mail browser as configured through Claws Mail's
110 GUI and specified in ~/.claws-mail/clawsrc, and a
111 configuration file called multiwebsearch.conf.
114 The configuration file takes the following format:
116 ALIAS|URL PART|URL PART
118 ALIAS is a user-defined name; the first URL PART is the
119 url before the search term; the second URL PART is
120 optional and contains the remaining part of the url which
121 comes after the search term. A sample configuration file
125 Copy 'multiwebsearch.conf' to ~/.claws-mail/
128 a) pre-configured website
129 Command: multiwebsearch.pl --where="ddg" --what="%s"
131 Command: multiwebsearch.pl --where="%u" --what="%s"
133 In type a) "ddg" refers to one of the configured aliases,
134 this Action will always search the website referred to by
137 In type b) you will be presented with a dialog box into
138 which you type one of your configured aliases
141 Contact: Paul Mangan <paul@claws-mail.org>
142 --------------------------------------------------------------------------------
144 Address book conversion
145 -----------------------
150 This perl script will import a Becky, Thunderbird, Kmail, Gmail and
151 Fox Mail address book.
154 (You must run claws-mail at least once before running this script.)
158 In Becky you need to do a CSV full export with titles of your
161 Run the script with the following options:
163 perl csv2addressbook.pl --type=becky --csv=/full/path/to/file.csv
165 Addtionally you can use the option '--name="My address book"', if
166 you don't use this option the new Claws address book will be
167 called 'Becky address book'.
170 Thunderbird >= 2.0.0.6
171 ----------------------
172 In Thunderbird you need to export your address book as 'comma
175 Run the script with the following options:
177 perl csv2addressbook.pl --type=thunderbird --csv=/full/path/to/file.csv
179 Addtionally you can use the option '--name="My address book"', if
180 you don't use this option the new Claws address book will be
181 called 'Thunderbird address book'.
183 Kmail >= 1.9.7 / Kaddressbook >= 3.5.7
184 --------------------------------------
185 In Kaddressbook you need to export your address book as 'CSV List'.
187 Run the script with the following options:
189 perl csv2addressbook.pl --type=kmail --csv=/full/path/to/file.csv
191 Addtionally you can use the option '--name="My address book"', if
192 you don't use this option the new Claws address book will be
193 called 'Kmail address book'.
195 WARNING: Kmail/Kaddressbook has a bug whereby it exports badly
196 formatted CSV if the values are quoted.
200 In the Gmail web interface you need to export your address book
201 as Outlook CSV format.
203 Run the script with the following options:
205 perl csv2addressbook.pl --type=gmail --csv=/full/path/to/file.csv
207 Addtionally you can use the option '--name="My address book"', if
208 you don't use this option the new Claws address book will be
209 called 'gmail address book'.
213 Export your Fox Mail address book as CSV with all possible headers.
215 Run the script with the following options:
217 perl csv2addressbook.pl --type=foxmail --csv=/full/path/to/file.csv
219 Addtionally you can use the option '--name="My address book"', if
220 you don't use this option the new Claws address book will be
221 called 'foxmail address book'.
223 You can also run the script with '--help' to get a brief usage message.
225 Contact: Paul Mangan <paul@claws-mail.org>
230 This python-script is a quick hack to convert an Eudora (v.3?)
231 addressbook to vCard (GnomeCard) format.
234 You may do whatever you want with it! (Also regarding copying)
235 However, the script is intended to use like this:
237 eud2gc.py <Eudora-addressbook-file> <Gnomecard-file>
239 Be careful not to overwrite your original GnomeCard.gcrd!
240 (But of course you might want to add the converted stuff to it)
242 Contact: Jeroen Versteeg <j.m.versteeg@student.utwente.nl>
244 * kmail2claws-mail.pl
247 This perl script will convert an exported Kmail addressbook into a
248 Claws Mail addressbook. If your version of Kmail is 1.37 or
249 greater and/or your version of KAddressBook is 3.1beta1 or greater,
250 or this script mixes up your definitions and their related data, use
251 'kmail2claws-mail_v2.pl' instead.
254 (You must run claws-mail at least once before running this script.)
256 In Kmail's Address book choose '/File/Export List'. This will export
257 your Kmail address book data to a *.csv file.
259 If Claws Mail is running, close it.
261 From the command line, execute the following:
263 perl kmail2claws-mail.pl --kmailfile=/path/to/addressbook.csv
265 Your Kmail address book data will now be contained in Claws Mail'
266 address book, under the name 'Kmail Address Book'.
268 Contact: Paul Mangan <paul@claws-mail.org>
271 * kmail2claws-mail_v2.pl
273 This script has been tested with Kmail 1.4.7 and KAddressBook 3.1beta1
276 This perl script will convert a Kmail address book that has been
277 exported in csv format into a Claws Mail address book.
280 (You must run claws-mail at least once before running this script.)
282 Open Kmail's Addressbook, /File/Address Book
283 In Kmail's Addressbook choose '/File/Export/Export List...'. This
284 will allow you to export your Kmail addressbook data to a *.csv file.
286 If Claws Mail is running, close it.
288 From the command line, execute the following:
290 perl kmail2claws-mail_v2.pl --kmailfile=/path/to/addressbook.csv
292 You can also use --help to see usage instructions.
294 Your Kmail addressbook data will now be contained in Claws Mail'
295 addressbook, under the name 'Kmail address book'.
297 Contact: Paul Mangan <paul@claws-mail.org>
302 This perl script will convert a Mew address book into a Claws Mail
306 (You must run claws-mail at least once before running this script.)
308 If Claws Mail is running, close it.
310 From the command line, execute the following:
312 perl mew2claws-mail.pl --mew-addressbook=/path/to/mew/addressbook
314 You can also use --help to see usage instructions.
316 Your Mew addressbook data will now be contained in Claws Mail's
317 addressbook, under the name 'Mew Address Book'.
319 Contact: Jérôme Lelong <jerome.lelong@gmail.com>
321 * outlook2claws-mail.pl
324 This perl script converts an Outlook generated contact list into a
325 Claws Mail XML address book.
330 You must export Outlook Express contact list as TXT file, choosing
331 only "Name" and "Address" fields to export.
333 You must exit Claws Mail before converting the contact list.
335 From the command line, execute the following:
337 outlook2claws-mail.pl fullpathname
341 You must export Outlook contact list as CSV file, choosing ALL the
342 fields available for exporting.
344 You must exit Claws Mail before converting the contact list.
346 From the command line, execute the following:
348 outlook2claws-mail.pl --csv fullpathname
351 For text files only works with fields described above. If you have
352 more complex examples send them to me, and I'll try to enhance the
355 For csv files you must export all fields (but only non empty fields
356 are added to the created Claws Mail address book) and the number
357 of fields expected is harcoded. Look for the $nboffields variable in
358 the script and change its value if you are sure you exported all
359 fields and script gives the 'unknown csv file format' error.
361 Contact: Ricardo Mones <ricardo@mones.org>
367 This perl script will convert an address book exported from The Bat!
368 into a Claws Mail address book.
371 (You must run claws-mail at least once before running this script.)
373 If Claws Mail is running, close it.
375 Export The Bat! Address Book to CSV file format with all fields
376 selected to YES and then start:
378 tb2claws-mail --tbfile=/full/path/to/thebat/addressbook.csv
380 The Bat! addressbook data will now be contained in Claws Mail'
381 addressbook, under the name 'The Bat! Address Book'.
383 Contact: Urke MMI <urke@gmx.net>
389 This python script will convert an Evolution vCard into a Claws Mail
393 (You must run claws-mail at least once before running this script.)
395 If Claws Mail is running, close it.
396 From the command line, execute the following:
398 vcard2xml.py source_file [destination_file]
400 When only <source_file> is specified it will overwrite (and
401 create a backup of) the existing addressbook.
402 When both arguments are suplied it will create a new additional
403 addressbook named as <destination_file>.
404 If the script encounters an error it will attempt to roll back
405 the changes and restore the original files.
407 Contact: Bogdan Sumanariu <bsumanariu@one5.ro>
409 --------------------------------------------------------------------------------
417 This perl script imports mbox files that are exported by Calypso.
418 It recreates the folder structure by scanning the "X-CalypsoFolder"
419 header and reincludes the attachments referenced in the
420 "X-CalypsoHtmlBody" "X-CalypsoAccount" "X-Attachment" headers.
423 Export the Calypso mailbox by selecting "Save to archive" and check
424 the "Save attachments" box.
426 Edit the script to set following variables (at the top of the file):
427 $mboxdir : path to the exported mbox, e.g. 'Archive' or '.'
428 $mboxfile : name of exported mbox, e.g. 'mail.txt'
429 $outdir : name of the MH folder to create, e.g. 'Calypso'
433 perl calypso_convert.pl
435 Finally, import that folder by either selecting "New mailbox" or
436 moving it into your existing directory and recreate the folder
437 structure manually (contentmenu from folderview).
439 Contact: Thorsten Maerz <torte@netztorte.de>
444 This perl script converts an mbox directory's contents into
445 Claws Mail' MH format.
449 Run the script using:
451 perl convert_mbox.pl MBOX MH_DIR
453 Move the outputted MH_DIR and its contents into your Claws Mail
454 Mail folder; in Claws Mail right-click the top-level folder and
455 choose 'Rebuild folder tree' from the popup menu.
457 Contact: Fred Marton <Fred.Marton@uni-bayreuth.de>
459 * kmail-mailbox2claws-mail.pl
462 This perl script converts a kmail mailbox into Claws Mail' mailbox.
466 Exit Claws Mail if running.
468 Run the script using:
470 kmail-mailbox2claws-mail.pl --kmaildir=/full/path/to/kmail/mailbox
472 Start Claws Mail and right-click the toplevel mailbox, i.e
473 "Mailbox (MH)", and select 'Rebuild folder tree'.
474 You may also need to run '/File/Folder/Check for new messages
479 --dry-run test mode, nothing is actually written
480 --help brief usage info
482 Contact: Paul Mangan <paul@claws-mail.org>
487 This python script integrates a Thunderbird folder tree into
492 The script receives two parameters from command-line:
493 <Thunderbird folder path> <Claws Mail folder path>
495 The best way to use it is to go to inside your Thunderbird
496 root mailfolder directory and invoke it as:
498 <path>\python2.4 <path>\tbird2claws.py . <path to Claws Mail>\Mail
500 Contact: Aleksandar Urosevic aka Urke MMI <urke@gmx.net>
502 --------------------------------------------------------------------------------
507 * acroread2claws-mail.pl
510 This perl script enables Adobe Reader 7 to send documents to
511 Claws Mail as attachments.
514 Make sure that the script is executable (chmod +x acroread2claws-mail.pl)
515 Start up Adobe Reader 7 (acroread)
516 Go to /Edit/Preferences/SendMail
517 Select any email client except 'System Mail (mail)'
518 Enter the path to this script in the alternate location box
520 You can then use 'File/Email' or the Email toolbar button to launch
521 claws-mail (if not already launched) and open a new compose window
522 with the PDF attached.
524 Contact: Paul Mangan <paul@claws-mail.org>
526 * claws-mail-compose-insert-files.pl
529 This script enables inserting files into the message body of a new
530 Claws Mail Compose window from the command line. Additionally To,
531 Cc, Bcc, Subject and files to attach to the message can be specified.
534 claws-mail-compose-insert-files.pl [options]
537 --to "Person One <mail@address.net>"
538 --cc "Person One <mail@address.net>"
539 --bcc "Person One <mail@address.net>"
540 --subject "My subject"
544 For multiple recipients separate the addresses with ','
545 e.g. --to "Person One <mail@address.net>,Person Two <mail2@address.net>"
546 --attach and --insert can be used multiple times
548 Contact: Paul Mangan <paul@claws-mail.org>
553 This perl script provides easy conversion of your filtering rules from
554 sylpheed's new filter system (>= 0.9.99) to the filtering system used in
556 It reads '~/.sylpheed-2.0/filter.xml' or '~/.sylpheed/filter.xml' and
557 writes '~/[CLAWS CONFIG DIR]/matcherrc'
560 Issue the following command from the 'tools' directory:
562 perl filter_conv_new.pl
564 That's it, the claws' filtering system is now implemented with your
565 previous rules applied.
570 Contact: Paul Mangan <paul@claws-mail.org>
576 This perl script provides easy conversion of your filtering rules
577 from sylpheed's old filter system (< 0.9.99) to the filtering system
579 It reads '~/.sylpheed/filterrc' and writes '~/.claws-mail/matcherrc'
582 Issue the following command from the 'tools' directory:
586 That's it, the new filtering system is now implemented with your
587 previous rules applied.
589 Contact: Paul Mangan <paul@claws-mail.org>
595 Add a 'Date:' header to the selected email(s) when such header
596 is missing. The correct date is guessed from other headers
597 that contain timestamp information (preferred: Fetchinfo
598 header if found) or from the file or system date as a
599 fallback. The order or preference for the date value
600 replacement can be changed by editing the script.
601 This script can be used to fix messages that show non
602 RFC-compliant Date headers as well.
603 X-Original-Date is always added too if not already existing
604 (if so, it's left untouched), to keep track of the original
606 An existing Date: header is not overwritten unless you use the
608 Non RFC-compliant dates can be overwritten using the --rfc
609 switch. Use --strict to use strict RFC matching patterns for
610 date values in other headers.
613 First you have to create an action with the following command:
617 On main window's message list, select the messages to be fixed
618 and invoke the created action.
620 Contact: wwp <wwp@claws-mail.org>
625 It's a wrapper to mairix, a tool that makes indexed searches
626 and shows search results in a virtual folder. Maildir, MH and
627 mbox formats are supported, see: https://github.com/rc0/mairix
631 mairix.sh <mairix rcfile> [<mairix options>..]
634 mairix.sh ~/.mairixrc s:word1,word2
636 Contact: wwp <wwp@claws-mail.org>
639 * nautilus2claws-mail.sh
642 This script will recursively attach a number of selected
643 files/directories from Nautilus to a new blank e-mail.
646 Copy the script to $HOME/.gnome2/nautilus-scripts, chmod u+x,
647 and restart nautilus (killall -9 nautilus). You will now have
648 a right-click menu item: '/Scripts/nautilus2claws-mail.sh'
650 Contact: Reza Pakdel <hrpakdel@cpsc.ucalgary.ca>
656 Open selected messages in POPFile control center to edit their
657 status. Requires that POPFile is running and that the messages
658 have been processed by it (X-POPFile-Link: header is expected).
659 POPFile control center opens with the web browser set in
663 popfile-link.sh <filename> [<filename>..]
666 Contact: wwp <wwp@claws-mail.org>
672 This script tries to recognise an attachment by using the 'file'
673 command and/or the file extension and then uses the available
674 utilities to make an effort to display it as text.
678 will show available conversion, the top:
682 .bz2 bzip2 -d < %f | strings
687 If there are multiple alternatives available, they are listed in
688 the ordder they are tried, like for .xls:
691 .xls catdoc -x -dutf-8
695 Go to /Configuration/Message View/External Programs and enter the
696 path to the script in the "Command for 'Display as text'" box.
697 Now when you right-click an attachment and choose 'Display as text'
698 this script will be invoked.
700 xlscat comes with the perl module Spreadsheet::Read, which is a
701 wrapper module over several parsers and supports ods, sxc, csv, xls,
702 xlsx, and sq. See https://metacpan.org/release/Spreadsheet-Read
704 Contact: H.Merijn Brand <h.m.brand@xs4all.nl>
707 * thunderbird-filters-convertor.pl
710 This perl script converts Thunderbird filtering rules into Claws Mail
711 filtering rules. It can be run several times, once for each filter
712 configuration file in Thunderbird.
715 The script takes 3 arguments:
717 --tbird-file=PATH TO FILE The full path to the file to be converted
718 --mailbox-name=NAME The name of the Claws Mail mailbox
719 --account-name=NAME The name of the account to be used (optional)
721 --tbird-file must point to the Thunderbird filter file (msgFilterRules.dat)
722 that you want to convert, it must contain the full path to the file.
723 --mailbox-name should be given the name of your mailbox in Claws Mail, e.g.
724 if the top-level folder is 'Mailbox (MH)' then this option should be
726 --account-name is optional, only needed if you are creating account-specific
727 rules. This is the name of your account in Claws Mail, which should
728 correspond to an account that you had in Thunderbird, e.g. the acount whose
729 rules you are converting.
731 This script presumes that your folder hierarchy in Claws Mail matches the
732 one that you had in Thunderbird. If you used the tbird2claws.py script to
733 convert your Thunderbird mailbox, then the folder hierarchy should match.
735 If the Claws Mail filtering configuration file (matcherrc) does not exist,
736 the script will create it; if it does exist, the newly converted rules will
743 Contact: Paul Mangan <paul@claws-mail.org>
745 --------------------------------------------------------------------------------
753 This perl script converts a monochrome (1 bit) 48x48 pixels GIF file
754 into an X-Face graphic suitable for inclusion into custom headers of
755 Claws Mail. An X-Face allows to quickly identify (or be identified
756 as) the sender of a mail message in a xface-capable MUA (like Claws
760 After obtaining the desired image for your X-Face you should:
761 * scale it to 48x48 pixels (Image->Scale image on Gimp)
762 * down color depth to b/w (Image->Mode->Indexed selecting "Use
763 Black/White palette" and the desired dithering options (prior to
764 indexing doing Image->Colors->Threshold allows you to select the
765 b/w level if you don't want a dithered (dotty) image))
766 * save file as non-interlaced GIF
769 ./gif2xface < filename.gif > filename.xface
771 In filename.xface will be the X-Face header ready to use.
772 You can add a custom header in Claws Mail through Configuration->
773 Preferences per account, "Send" tab, check "Add user-defined header"
774 then "Edit..." if you want to add it via the Claws Mail interface, or do
776 echo "0:" `cat filename.xface` > ~/.claws-mail/customheaderrc
778 if you want to create the custom headers file yourself (Warning: this
779 method is valid only if you don't have any other custom header set or
782 Contact: Ricardo Mones <ricardo@mones.org>
788 This script is a message catalog translator's tool, it updates the .po
789 files named on the command line.
792 This script needs to be copied to and run from the 'po' directory.
794 ./update-po lang.po lang2.po ...
796 to update one or more <yourlang>.po files from the sourcecode files
797 named in POTFILES.in. The old .po file is save in a .po.old file.
799 For example, when you want to update fr.po, run ./update-po fr.po,
800 then edit fr.po to update your translation.
802 Contact: Wilbert Berendsen <wilbert@oswf.org> or the Claws Mail Team
804 --------------------------------------------------------------------------------
805 This file is Copyright 1999-2014 by the Claws Mail team.
806 See accompanying COPYING file for license details.
807 See each included script for copyright and license details.
812 This script tries to fix thread parenting for two or more messages
817 Menu name: Reparent (fix threading)
818 Command: cm-reparent.pl %F
820 Then select from the message list all files that should be re-parented
822 Then invoke the action
825 $ perldoc cm-reparent.pl
831 Contact: H.Merijn Brand <h.m.brand@xs4all.nl>
836 This script tries to break thread parenting for one or more messages
841 Menu name: Unthread (break threading)
842 Command: cm-break.pl %F
844 Then select from the message list all files that should be un-threaded
846 Then invoke the action
849 $ perldoc cm-break.pl
855 Contact: H.Merijn Brand <h.m.brand@xs4all.nl>