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 (coreutils,
41 dos2unix, grep and sed are required in PATH)
42 mairix.sh A wrapper to mairix, to enable global searches in
44 nautilus2claws-mail.sh Send files from Nautilus
45 popfile-link.sh Open messages in POPFile control center to edit
47 textviewer.pl Display various attachments as text
48 thunderbird-filters-convertor.pl
49 Convert Thunderbird filtering rules
52 gif2xface.pl Convert a 48x48 GIF file to an X-Face header
53 update-po Update the .po files named on the command line.
55 --------------------------------------------------------------------------------
56 Detailed Descriptions:
57 --------------------------------------------------------------------------------
63 WORKS ON: selected messages (two or more)
64 COMMAND: cm-reparent.pl %F
65 Thread the selected messages based on date, old to new
68 WORKS ON: selected messages (one or more)
69 COMMAND: cm-break.pl %F
70 Break thread references for the selected messages
74 COMMAND: |ddg_search.pl
75 Search duckduckgo.com for selected text using the default Claws Mail browser
79 COMMAND: |google_msgid.pl
80 Lookup selected message-id in google using mozilla. Edit the script to use
85 see further down for details
88 WORKS ON: current message part
89 COMMAND: textviewer.sh %p |
90 Attempt to view an attachment as plain text
93 WORKS ON: current message (or part of multipart message)
95 Decode and display uuencoded images using uudecode.
98 WORKS ON: current message (or part of multipart message)
99 COMMAND: uuooffice %f&
100 Decode uuencoded attachments and open them with OpenOffice
102 * More action examples can be found at the Claws Mail FAQ
103 http://www.claws-mail.org/faq/index.php/Actions
105 ** multiwebsearch.pl **
108 This is an Actions script that allows you to search
109 websites for the selected text. It uses the default
110 Claws Mail browser as configured through Claws Mail's
111 GUI and specified in ~/.claws-mail/clawsrc, and a
112 configuration file called multiwebsearch.conf.
115 The configuration file takes the following format:
117 ALIAS|URL PART|URL PART
119 ALIAS is a user-defined name; the first URL PART is the
120 url before the search term; the second URL PART is
121 optional and contains the remaining part of the url which
122 comes after the search term. A sample configuration file
126 Copy 'multiwebsearch.conf' to ~/.claws-mail/
129 a) pre-configured website
130 Command: multiwebsearch.pl --where="ddg" --what="%s"
132 Command: multiwebsearch.pl --where="%u" --what="%s"
134 In type a) "ddg" refers to one of the configured aliases,
135 this Action will always search the website referred to by
138 In type b) you will be presented with a dialog box into
139 which you type one of your configured aliases
142 Contact: Paul Mangan <paul@claws-mail.org>
143 --------------------------------------------------------------------------------
145 Address book conversion
146 -----------------------
151 This perl script will import a Becky, Thunderbird, Kmail, Gmail and
152 Fox Mail address book.
155 (You must run claws-mail at least once before running this script.)
159 In Becky you need to do a CSV full export with titles of your
162 Run the script with the following options:
164 perl csv2addressbook.pl --type=becky --csv=/full/path/to/file.csv
166 Addtionally you can use the option '--name="My address book"', if
167 you don't use this option the new Claws address book will be
168 called 'Becky address book'.
171 Thunderbird >= 2.0.0.6
172 ----------------------
173 In Thunderbird you need to export your address book as 'comma
176 Run the script with the following options:
178 perl csv2addressbook.pl --type=thunderbird --csv=/full/path/to/file.csv
180 Addtionally you can use the option '--name="My address book"', if
181 you don't use this option the new Claws address book will be
182 called 'Thunderbird address book'.
184 Kmail >= 1.9.7 / Kaddressbook >= 3.5.7
185 --------------------------------------
186 In Kaddressbook you need to export your address book as 'CSV List'.
188 Run the script with the following options:
190 perl csv2addressbook.pl --type=kmail --csv=/full/path/to/file.csv
192 Addtionally you can use the option '--name="My address book"', if
193 you don't use this option the new Claws address book will be
194 called 'Kmail address book'.
196 WARNING: Kmail/Kaddressbook has a bug whereby it exports badly
197 formatted CSV if the values are quoted.
201 In the Gmail web interface you need to export your address book
202 as Outlook CSV format.
204 Run the script with the following options:
206 perl csv2addressbook.pl --type=gmail --csv=/full/path/to/file.csv
208 Addtionally you can use the option '--name="My address book"', if
209 you don't use this option the new Claws address book will be
210 called 'gmail address book'.
214 Export your Fox Mail address book as CSV with all possible headers.
216 Run the script with the following options:
218 perl csv2addressbook.pl --type=foxmail --csv=/full/path/to/file.csv
220 Addtionally you can use the option '--name="My address book"', if
221 you don't use this option the new Claws address book will be
222 called 'foxmail address book'.
224 You can also run the script with '--help' to get a brief usage message.
226 Contact: Paul Mangan <paul@claws-mail.org>
231 This python-script is a quick hack to convert an Eudora (v.3?)
232 addressbook to vCard (GnomeCard) format.
235 You may do whatever you want with it! (Also regarding copying)
236 However, the script is intended to use like this:
238 eud2gc.py <Eudora-addressbook-file> <Gnomecard-file>
240 Be careful not to overwrite your original GnomeCard.gcrd!
241 (But of course you might want to add the converted stuff to it)
243 Contact: Jeroen Versteeg <j.m.versteeg@student.utwente.nl>
245 * kmail2claws-mail.pl
248 This perl script will convert an exported Kmail addressbook into a
249 Claws Mail addressbook. If your version of Kmail is 1.37 or
250 greater and/or your version of KAddressBook is 3.1beta1 or greater,
251 or this script mixes up your definitions and their related data, use
252 'kmail2claws-mail_v2.pl' instead.
255 (You must run claws-mail at least once before running this script.)
257 In Kmail's Address book choose '/File/Export List'. This will export
258 your Kmail address book data to a *.csv file.
260 If Claws Mail is running, close it.
262 From the command line, execute the following:
264 perl kmail2claws-mail.pl --kmailfile=/path/to/addressbook.csv
266 Your Kmail address book data will now be contained in Claws Mail'
267 address book, under the name 'Kmail Address Book'.
269 Contact: Paul Mangan <paul@claws-mail.org>
272 * kmail2claws-mail_v2.pl
274 This script has been tested with Kmail 1.4.7 and KAddressBook 3.1beta1
277 This perl script will convert a Kmail address book that has been
278 exported in csv format into a Claws Mail address book.
281 (You must run claws-mail at least once before running this script.)
283 Open Kmail's Addressbook, /File/Address Book
284 In Kmail's Addressbook choose '/File/Export/Export List...'. This
285 will allow you to export your Kmail addressbook data to a *.csv file.
287 If Claws Mail is running, close it.
289 From the command line, execute the following:
291 perl kmail2claws-mail_v2.pl --kmailfile=/path/to/addressbook.csv
293 You can also use --help to see usage instructions.
295 Your Kmail addressbook data will now be contained in Claws Mail'
296 addressbook, under the name 'Kmail address book'.
298 Contact: Paul Mangan <paul@claws-mail.org>
303 This perl script will convert a Mew address book into a Claws Mail
307 (You must run claws-mail at least once before running this script.)
309 If Claws Mail is running, close it.
311 From the command line, execute the following:
313 perl mew2claws-mail.pl --mew-addressbook=/path/to/mew/addressbook
315 You can also use --help to see usage instructions.
317 Your Mew addressbook data will now be contained in Claws Mail's
318 addressbook, under the name 'Mew Address Book'.
320 Contact: Jérôme Lelong <jerome.lelong@gmail.com>
322 * outlook2claws-mail.pl
325 This perl script converts an Outlook generated contact list into a
326 Claws Mail XML address book.
331 You must export Outlook Express contact list as TXT file, choosing
332 only "Name" and "Address" fields to export.
334 You must exit Claws Mail before converting the contact list.
336 From the command line, execute the following:
338 outlook2claws-mail.pl fullpathname
342 You must export Outlook contact list as CSV file, choosing ALL the
343 fields available for exporting.
345 You must exit Claws Mail before converting the contact list.
347 From the command line, execute the following:
349 outlook2claws-mail.pl --csv fullpathname
352 For text files only works with fields described above. If you have
353 more complex examples send them to me, and I'll try to enhance the
356 For csv files you must export all fields (but only non empty fields
357 are added to the created Claws Mail address book) and the number
358 of fields expected is harcoded. Look for the $nboffields variable in
359 the script and change its value if you are sure you exported all
360 fields and script gives the 'unknown csv file format' error.
362 Contact: Ricardo Mones <ricardo@mones.org>
368 This perl script will convert an address book exported from The Bat!
369 into a Claws Mail address book.
372 (You must run claws-mail at least once before running this script.)
374 If Claws Mail is running, close it.
376 Export The Bat! Address Book to CSV file format with all fields
377 selected to YES and then start:
379 tb2claws-mail --tbfile=/full/path/to/thebat/addressbook.csv
381 The Bat! addressbook data will now be contained in Claws Mail'
382 addressbook, under the name 'The Bat! Address Book'.
384 Contact: Urke MMI <urke@gmx.net>
390 This python script will convert an Evolution vCard into a Claws Mail
394 (You must run claws-mail at least once before running this script.)
396 If Claws Mail is running, close it.
397 From the command line, execute the following:
399 vcard2xml.py source_file [destination_file]
401 When only <source_file> is specified it will overwrite (and
402 create a backup of) the existing addressbook.
403 When both arguments are suplied it will create a new additional
404 addressbook named as <destination_file>.
405 If the script encounters an error it will attempt to roll back
406 the changes and restore the original files.
408 Contact: Bogdan Sumanariu <bsumanariu@one5.ro>
410 --------------------------------------------------------------------------------
418 This perl script imports mbox files that are exported by Calypso.
419 It recreates the folder structure by scanning the "X-CalypsoFolder"
420 header and reincludes the attachments referenced in the
421 "X-CalypsoHtmlBody" "X-CalypsoAccount" "X-Attachment" headers.
424 Export the Calypso mailbox by selecting "Save to archive" and check
425 the "Save attachments" box.
427 Edit the script to set following variables (at the top of the file):
428 $mboxdir : path to the exported mbox, e.g. 'Archive' or '.'
429 $mboxfile : name of exported mbox, e.g. 'mail.txt'
430 $outdir : name of the MH folder to create, e.g. 'Calypso'
434 perl calypso_convert.pl
436 Finally, import that folder by either selecting "New mailbox" or
437 moving it into your existing directory and recreate the folder
438 structure manually (contentmenu from folderview).
440 Contact: Thorsten Maerz <torte@netztorte.de>
445 This perl script converts an mbox directory's contents into
446 Claws Mail' MH format.
450 Run the script using:
452 perl convert_mbox.pl MBOX MH_DIR
454 Move the outputted MH_DIR and its contents into your Claws Mail
455 Mail folder; in Claws Mail right-click the top-level folder and
456 choose 'Rebuild folder tree' from the popup menu.
458 Contact: Fred Marton <Fred.Marton@uni-bayreuth.de>
460 * kmail-mailbox2claws-mail.pl
463 This perl script converts a kmail mailbox into Claws Mail' mailbox.
467 Exit Claws Mail if running.
469 Run the script using:
471 kmail-mailbox2claws-mail.pl --kmaildir=/full/path/to/kmail/mailbox
473 Start Claws Mail and right-click the toplevel mailbox, i.e
474 "Mailbox (MH)", and select 'Rebuild folder tree'.
475 You may also need to run '/File/Folder/Check for new messages
480 --dry-run test mode, nothing is actually written
481 --help brief usage info
483 Contact: Paul Mangan <paul@claws-mail.org>
488 This python script integrates a Thunderbird folder tree into
493 The script receives two parameters from command-line:
494 <Thunderbird folder path> <Claws Mail folder path>
496 The best way to use it is to go to inside your Thunderbird
497 root mailfolder directory and invoke it as:
499 <path>\python2.4 <path>\tbird2claws.py . <path to Claws Mail>\Mail
501 Contact: Aleksandar Urosevic aka Urke MMI <urke@gmx.net>
503 --------------------------------------------------------------------------------
508 * acroread2claws-mail.pl
511 This perl script enables Adobe Reader 7 to send documents to
512 Claws Mail as attachments.
515 Make sure that the script is executable (chmod +x acroread2claws-mail.pl)
516 Start up Adobe Reader 7 (acroread)
517 Go to /Edit/Preferences/SendMail
518 Select any email client except 'System Mail (mail)'
519 Enter the path to this script in the alternate location box
521 You can then use 'File/Email' or the Email toolbar button to launch
522 claws-mail (if not already launched) and open a new compose window
523 with the PDF attached.
525 Contact: Paul Mangan <paul@claws-mail.org>
527 * claws-mail-compose-insert-files.pl
530 This script enables inserting files into the message body of a new
531 Claws Mail Compose window from the command line. Additionally To,
532 Cc, Bcc, Subject and files to attach to the message can be specified.
535 claws-mail-compose-insert-files.pl [options]
538 --to "Person One <mail@address.net>"
539 --cc "Person One <mail@address.net>"
540 --bcc "Person One <mail@address.net>"
541 --subject "My subject"
545 For multiple recipients separate the addresses with ','
546 e.g. --to "Person One <mail@address.net>,Person Two <mail2@address.net>"
547 --attach and --insert can be used multiple times
549 Contact: Paul Mangan <paul@claws-mail.org>
554 This perl script provides easy conversion of your filtering rules from
555 sylpheed's new filter system (>= 0.9.99) to the filtering system used in
557 It reads '~/.sylpheed-2.0/filter.xml' or '~/.sylpheed/filter.xml' and
558 writes '~/[CLAWS CONFIG DIR]/matcherrc'
561 Issue the following command from the 'tools' directory:
563 perl filter_conv_new.pl
565 That's it, the claws' filtering system is now implemented with your
566 previous rules applied.
571 Contact: Paul Mangan <paul@claws-mail.org>
577 This perl script provides easy conversion of your filtering rules
578 from sylpheed's old filter system (< 0.9.99) to the filtering system
580 It reads '~/.sylpheed/filterrc' and writes '~/.claws-mail/matcherrc'
583 Issue the following command from the 'tools' directory:
587 That's it, the new filtering system is now implemented with your
588 previous rules applied.
590 Contact: Paul Mangan <paul@claws-mail.org>
596 Add a 'Date:' header to the selected email(s) when such header
597 is missing. The correct date is guessed from other headers
598 that contain timestamp information (preferred: Fetchinfo
599 header if found) or from the file or system date as a
600 fallback. The order or preference for the date value
601 replacement can be changed by editing the script.
602 This script can be used to fix messages that show non
603 RFC-compliant Date headers as well.
604 X-Original-Date is always added too if not already existing
605 (if so, it's left untouched), to keep track of the original
607 An existing Date: header is not overwritten unless you use the
609 Non RFC-compliant dates can be overwritten using the --rfc
610 switch. Use --strict to use strict RFC matching patterns for
611 date values in other headers.
614 First you have to create an action with the following command:
618 On main window's message list, select the messages to be fixed
619 and invoke the created action.
621 Contact: wwp <wwp@claws-mail.org>
626 It's a wrapper to mairix, a tool that makes indexed searches
627 and shows search results in a virtual folder. Maildir, MH and
628 mbox formats are supported, see: https://github.com/rc0/mairix
632 mairix.sh <mairix rcfile> [<mairix options>..]
635 mairix.sh ~/.mairixrc s:word1,word2
637 Contact: wwp <wwp@claws-mail.org>
640 * nautilus2claws-mail.sh
643 This script will recursively attach a number of selected
644 files/directories from Nautilus to a new blank e-mail.
647 Copy the script to $HOME/.gnome2/nautilus-scripts, chmod u+x,
648 and restart nautilus (killall -9 nautilus). You will now have
649 a right-click menu item: '/Scripts/nautilus2claws-mail.sh'
651 Contact: Reza Pakdel <hrpakdel@cpsc.ucalgary.ca>
657 Open selected messages in POPFile control center to edit their
658 status. Requires that POPFile is running and that the messages
659 have been processed by it (X-POPFile-Link: header is expected).
660 POPFile control center opens with the web browser set in
664 popfile-link.sh <filename> [<filename>..]
667 Contact: wwp <wwp@claws-mail.org>
673 This script tries to recognise an attachment by using the 'file'
674 command and/or the file extension and then uses the available
675 utilities to make an effort to display it as text.
679 will show available conversion, the top:
683 .bz2 bzip2 -d < %f | strings
688 If there are multiple alternatives available, they are listed in
689 the ordder they are tried, like for .xls:
692 .xls catdoc -x -dutf-8
696 Go to /Configuration/Message View/External Programs and enter the
697 path to the script in the "Command for 'Display as text'" box.
698 Now when you right-click an attachment and choose 'Display as text'
699 this script will be invoked.
701 xlscat comes with the perl module Spreadsheet::Read, which is a
702 wrapper module over several parsers and supports ods, sxc, csv, xls,
703 xlsx, and sq. See https://metacpan.org/release/Spreadsheet-Read
705 Contact: H.Merijn Brand <h.m.brand@xs4all.nl>
708 * thunderbird-filters-convertor.pl
711 This perl script converts Thunderbird filtering rules into Claws Mail
712 filtering rules. It can be run several times, once for each filter
713 configuration file in Thunderbird.
716 The script takes 3 arguments:
718 --tbird-file=PATH TO FILE The full path to the file to be converted
719 --mailbox-name=NAME The name of the Claws Mail mailbox
720 --account-name=NAME The name of the account to be used (optional)
722 --tbird-file must point to the Thunderbird filter file (msgFilterRules.dat)
723 that you want to convert, it must contain the full path to the file.
724 --mailbox-name should be given the name of your mailbox in Claws Mail, e.g.
725 if the top-level folder is 'Mailbox (MH)' then this option should be
727 --account-name is optional, only needed if you are creating account-specific
728 rules. This is the name of your account in Claws Mail, which should
729 correspond to an account that you had in Thunderbird, e.g. the acount whose
730 rules you are converting.
732 This script presumes that your folder hierarchy in Claws Mail matches the
733 one that you had in Thunderbird. If you used the tbird2claws.py script to
734 convert your Thunderbird mailbox, then the folder hierarchy should match.
736 If the Claws Mail filtering configuration file (matcherrc) does not exist,
737 the script will create it; if it does exist, the newly converted rules will
744 Contact: Paul Mangan <paul@claws-mail.org>
746 --------------------------------------------------------------------------------
754 This perl script converts a monochrome (1 bit) 48x48 pixels GIF file
755 into an X-Face graphic suitable for inclusion into custom headers of
756 Claws Mail. An X-Face allows to quickly identify (or be identified
757 as) the sender of a mail message in a xface-capable MUA (like Claws
761 After obtaining the desired image for your X-Face you should:
762 * scale it to 48x48 pixels (Image->Scale image on Gimp)
763 * down color depth to b/w (Image->Mode->Indexed selecting "Use
764 Black/White palette" and the desired dithering options (prior to
765 indexing doing Image->Colors->Threshold allows you to select the
766 b/w level if you don't want a dithered (dotty) image))
767 * save file as non-interlaced GIF
770 ./gif2xface < filename.gif > filename.xface
772 In filename.xface will be the X-Face header ready to use.
773 You can add a custom header in Claws Mail through Configuration->
774 Preferences per account, "Send" tab, check "Add user-defined header"
775 then "Edit..." if you want to add it via the Claws Mail interface, or do
777 echo "0:" `cat filename.xface` > ~/.claws-mail/customheaderrc
779 if you want to create the custom headers file yourself (Warning: this
780 method is valid only if you don't have any other custom header set or
783 Contact: Ricardo Mones <ricardo@mones.org>
789 This script is a message catalog translator's tool, it updates the .po
790 files named on the command line.
793 This script needs to be copied to and run from the 'po' directory.
795 ./update-po lang.po lang2.po ...
797 to update one or more <yourlang>.po files from the sourcecode files
798 named in POTFILES.in. The old .po file is save in a .po.old file.
800 For example, when you want to update fr.po, run ./update-po fr.po,
801 then edit fr.po to update your translation.
803 Contact: Wilbert Berendsen <wilbert@oswf.org> or the Claws Mail Team
805 --------------------------------------------------------------------------------
806 This file is Copyright 1999-2014 by the Claws Mail team.
807 See accompanying COPYING file for license details.
808 See each included script for copyright and license details.
813 This script tries to fix thread parenting for two or more messages
818 Menu name: Reparent (fix threading)
819 Command: cm-reparent.pl %F
821 Then select from the message list all files that should be re-parented
823 Then invoke the action
826 $ perldoc cm-reparent.pl
832 Contact: H.Merijn Brand <h.m.brand@xs4all.nl>
837 This script tries to break thread parenting for one or more messages
842 Menu name: Unthread (break threading)
843 Command: cm-break.pl %F
845 Then select from the message list all files that should be un-threaded
847 Then invoke the action
850 $ perldoc cm-break.pl
856 Contact: H.Merijn Brand <h.m.brand@xs4all.nl>