KMail/Tools: Difference between revisions

From KDE UserBase Wiki
m (fix the links)
(Marked this version for translation)
 
(17 intermediate revisions by 7 users not shown)
Line 2: Line 2:
<translate>
<translate>


=KMail: Tools=
=KMail: Tools= <!--T:1-->
Please understand that the software and documentation provided here is mostly not written by the KMail team, so we cannot provide support for it. In fact we often cannot even test these applications - ''use at your own risk.''
{{Warning|1=Please understand that the software and documentation provided here is mostly not written by the KMail team, so they cannot provide support for it. In fact they often cannot even test these applications - ''use at your own risk.'' Some of these utilities are extremely old}}


==Mail Import Tools==
</translate><span id="Mail Import Tools"></span><translate>
 
==Mail Import Tools== <!--T:2-->
You should first try to import your old mail using '''KMail''''s <menuchoice>File -> Import Messages...</menuchoice> menu.
You should first try to import your old mail using '''KMail''''s <menuchoice>File -> Import Messages...</menuchoice> menu.


<!--T:3-->
If you need to import mails and directory structure from '''Outlook''', you can use '''Thunderbird''' (Windows version) to import '''Outlook''' data, then you can use the '''Kmail''' import from '''Thunderbird''' and point the directory where the'''Thunderbird''' data has been saved.
If you need to import mails and directory structure from '''Outlook''', you can use '''Thunderbird''' (Windows version) to import '''Outlook''' data, then you can use the '''Kmail''' import from '''Thunderbird''' and point the directory where the'''Thunderbird''' data has been saved.


<!--T:4-->
If that doesn't work, the following programs might be helpful:
If that doesn't work, the following programs might be helpful:


<!--T:5-->
* [http://alioth.debian.org/projects/libpst/ readpst], a utility for converting '''Microsoft Outlook''' mail files (personal folders) to standard UNIX mbox format, Added 2005-01-24
* [http://alioth.debian.org/projects/libpst/ readpst], a utility for converting '''Microsoft Outlook''' mail files (personal folders) to standard UNIX mbox format, Added 2005-01-24


* [http://outport.sourceforge.net/ Outport], a program for exporting data from '''Outlook''' to '''Evolution''', from which '''KMail''' can import messages, Added 2004-07-23
<!--T:6-->
* [https://outport.sourceforge.net/ Outport], a program for exporting data from '''Outlook''' to '''Evolution''', from which '''KMail''' can import messages, Added 2004-07-23


* [http://kmail.kde.org/unsupported/mozilla2kmail.pl mozilla2kmail.pl], a simple bash script to convert mail from '''Mozilla''' to '''KMail''', Added 2004-06-12
<!--T:7-->
* [https://web.archive.org/web/20071008235210/kmail.kde.org/unsupported/mozilla2kmail.pl mozilla2kmail.pl], a simple bash script to convert mail from '''Mozilla''' to '''KMail''', Added 2004-06-12


* [http://tldp.org/HOWTO/Outlook-to-Unix-Mailbox.html '''MS Outlook''' to Unix Mailbox Conversion mini HOWTO] - just in case the tools above don't work for you. Updated 2004-01-08
<!--T:8-->
* [http://tldp.org/HOWTO/Outlook-to-Unix-Mailbox.html MS Outlook to Unix Mailbox Conversion mini HOWTO] - just in case the tools above don't work for you. Updated 2004-01-08


* [http://www.panayotis.com/prog/scripts/smdir/ Sylpheed2Maildir], a simple bash script to convert a '''sylpheed''' mail box directory to maildir format. Added 2003-05-27
<!--T:9-->
* [http://www.panayotis.com/prog/scripts/sylpheed.html Sylpheed2Maildir], a simple bash script to convert a '''sylpheed''' mail box directory to maildir format. Added 2003-05-27


* [http://eudora2unix.sourceforge.net/ Eudora2Unix], a collection of Python scripts that together convert Qualcomm '''Eudora''' mail folders to mail directories for unix or Linux. Updated 2003-03-31
<!--T:10-->
* [https://eudora2unix.sourceforge.net/ Eudora2Unix], a collection of Python scripts that together convert Qualcomm '''Eudora''' mail folders to mail directories for unix or Linux. Updated 2003-03-31


<!--T:11-->
* [http://www.informatik-vollmer.de/software/mh2maildir.html mh2maildir transformator], a small shellscript for transforming mails from MH format to Maildir format. Added 2002-11-06
* [http://www.informatik-vollmer.de/software/mh2maildir.html mh2maildir transformator], a small shellscript for transforming mails from MH format to Maildir format. Added 2002-11-06


* [http://sourceforge.net/projects/ol2mbox/ ol2mbox], '''Outlook Express''' to mbox converter (not maintained anymore). Added 2002-02-09
<!--T:12-->
* [https://sourceforge.net/projects/ol2mbox/ ol2mbox], '''Outlook Express''' to mbox converter (not maintained anymore). Added 2002-02-09


* [http://msquadrat.de/projects/tb2kmail/ tb2kmail], a tool to export mail from '''The Bat''' to '''KMail'''. Added 2002-01-07
<!--T:13-->
* [https://msquadrat.de/projects/tb2kmail/ tb2kmail], a tool to export mail from '''The Bat''' to '''KMail'''. Added 2002-01-07


* [http://www.david-guembel.de/index.php?id=12 '''KMail''' filters for GPG and RFC-2015-compliant mails]. Added 2001-07-15
<!--T:14-->
* [http://www.david-guembel.de/index.php?id=12 KMail filters for GPG and RFC-2015-compliant mails]. Added 2001-07-15


* [http://kmail.kde.org/unsupported/xfmail2mbox.sh xfmail2mbox.sh], a shell script by Jörg Reinhardt <joeyhh(at)gmx.de> to convert xfmail folders to mbox (which is used by '''KMail'''). Requires awk. Updated 2001-02-12
<!--T:15-->
* [https://web.archive.org/web/20041211080655/http://kmail.kde.org/unsupported/xfmail2mbox.sh xfmail2mbox.sh], a shell script by Jörg Reinhardt <joeyhh(at)gmx.de> to convert xfmail folders to mbox (which is used by '''KMail'''). Requires awk. Updated 2001-02-12


==Mail Export Tools==
</translate><span id="Mail Export Tools"></span><translate>


* [http://www.mhonarc.org/ MHonArc], a mail-to-HTML converter. Added 2003-03-31
==Mail Export Tools== <!--T:16-->


<!--T:17-->
* [https://www.mhonarc.org/ MHonArc], a mail-to-HTML converter. Added 2003-03-31
<!--T:18-->
* [http://www.bernreuther.net/martin/software/KDE/tKMailHonArc/ tKMailHonArc], a frontend for MHonArc to convert '''KMail''' email folders (mbox, maildir) to HTML. Added 2003-03-31
* [http://www.bernreuther.net/martin/software/KDE/tKMailHonArc/ tKMailHonArc], a frontend for MHonArc to convert '''KMail''' email folders (mbox, maildir) to HTML. Added 2003-03-31


==Addressbook Import Tools==
<!--T:56-->
* [https://www.acjlaw.net:8080/~jeremy/Ricoh/scripts.html#mbox2pdf mbox2pdf], perl script for converting an email mbox to a hyperlinked pdf. Uses hypermail-2.2.0 and LaTeX. Added 2011-08-11.
 
</translate><span id="Addressbook Import Tools"></span><translate>
 
==Addressbook Import Tools== <!--T:19-->


<!--T:20-->
* [http://catb.org/~esr/lookout/ lookout], a small Python script that enables you to convert your '''Outlook 97''' addressbook data to '''KAB'''. Added 2002-07-31
* [http://catb.org/~esr/lookout/ lookout], a small Python script that enables you to convert your '''Outlook 97''' addressbook data to '''KAB'''. Added 2002-07-31


* [http://kontact.kde.org/kmail/unsupported/pineToKMail pineToKMail], a perl script to convert a '''pine''' addressbook to a '''KMail''' addressbook.
<!--T:21-->
* [https://web.archive.org/web/20071009103646/kmail.kde.org/unsupported/pineToKMail pineToKMail], a perl script to convert a '''pine''' addressbook to a '''KMail''' addressbook.


==Development and Security==
</translate><span id="Development and Security"></span><translate>


* [http://www.slac.com/~mpilone/projects/kde/kmailssh/index.html HOWTO on how to use the Precommand feature of '''KMail''' for ''SSH tunneling''], Added 2003-04-19
==Development and Security== <!--T:22-->


* Gregor Waluga has written a German tutorial on how to use '''KMail''' and '''GnuPG''': [http://www.linuxnetmag.com/de/issue8/m8kmailgpg1.html Mit KMail verschlüsselte E-Mails verschicken] (download as [http://www.waluga.de/linux/tutorials/tutorials.htm as PDF here]).
<!--T:23-->
* [http://www.slac.com/~mpilone/projects/kde/kmailssh/index.html HOWTO on how to use the Precommand feature of KMail for SSH tunneling], Added 2003-04-19


* [http://kontact.kde.org/kmail/unsupported/kmail_over_ssh.txt Setting up '''KMail '''over ''ssh''] (by Ferdinand Gassauer)
<!--T:57-->
* [[Special:myLanguage/Concepts/OpenPGP_For_Beginners|Explanation of OpenPGP concepts for beginners]]


* [http://kontact.kde.org/kmail/unsupported/mail-client-QA.gz Mail client test file v0.5] (55kB): This mbox file triggers some bugs and has very long field values to trigger buffer overflows. You may use this to find possible security problems - not only in '''KMail''', but in any mail client that supports mbox folders. Just copy this file to ~/Mail/ and start '''KMail'''.
<!--T:24-->
* Gregor Waluga has written a German tutorial on how to use '''KMail''' and '''GnuPG''': [https://web.archive.org/web/20061015202437/http://www.linuxnetmag.com/de/issue8/m8kmailgpg1.html Mit KMail verschlüsselte E-Mails verschicken] (download as [https://web.archive.org/web/20071013123902/http://www.waluga.de/linux/tutorials/tutorials.htm as PDF here]).


==Anti-Spam Tools==
<!--T:25-->
* [https://web.archive.org/web/20071009103618/http://kmail.kde.org/unsupported/kmail_over_ssh.txt Setting up KMail over ssh] (by Ferdinand Gassauer)


* (Polish) [http://yaro.gdi.pl/linux/spamassassin.html Spamassassin na localhost na Mdk.10], a description of how to use '''KMail''' and '''SpamAssassin''', Added 2004-05-14
<!--T:26-->
* [https://web.archive.org/web/20061210081157/http://kmail.kde.org/mail-client-QA.gz Mail client test file v0.5] (55kB): This mbox file triggers some bugs and has very long field values to trigger buffer overflows. You may use this to find possible security problems - not only in '''KMail''', but in any mail client that supports mbox folders. Just copy this file to ~/Mail/ and start '''KMail'''.


* (German) [http://www.pl-berichte.de/t_programme/bogofilter-kmail.html Mini-HOWTO für bogofilter mit '''KMail'''], Added 2003-11-07
</translate><span id="Anti-Spam Tools"></span><translate>


* [http://www.andrefelipemachado.hpg.ig.com.br/linux/mini-how-to-Kmail_and_Bogofilter.html '''KMail''' and '''Bogofilter''' Mini HOWTO], a description of how to configure '''KMail''' to filter spam using '''Bogofilter''' (Robinson-Fischer self-learning algorithm filtering for English and non-English messages) on IMAP and POP accounts without using '''procmail''', Added 2004-01-19
==Anti-Spam Tools== <!--T:27-->


* [http://www.andrefelipemachado.hpg.ig.com.br/linux/mini-how-to-Kmail_and_SpamOracle.html KMail and SpamOracle Mini HOWTO] This is a description of how to configure '''KMail''' to filter spam using '''SpamOracle''' (Bayesian self-learning algorithm filtering for English and non-English messages) on IMAP and POP accounts without using '''procmail''', Updated 2004-01-19
<!--T:58-->
* [http://www.ghacks.net/2009/10/16/spam-filtering-with-kmail/ Spam filtering with Kmail] October 16, 2009 - Last Update: February 13, 2018


* [http://www.softwaredesign.co.uk/Information.SpamFilters.html '''KMail''' and '''SpamAssassin''' resp. Quick Spam Filter (qsf)], a more detailed article than the one below, Added 2003-06-30
<!--T:28-->
* (Polish) [https://web.archive.org/web/20081216160551/http://yaro.gdi.pl/linux/spamassassin.html Spamassassin na localhost na Mdk.10], a description of how to use '''KMail''' and '''SpamAssassin''', Added 2004-05-14


* [http://kontact.kde.org/kmail/unsupported/spamd Startup script for '''SpamAssassin'''] (Christian Banik <christian at buschaos.de>, 2002-07-11)  This is a startup script for '''SpamAssassin''' in SuSE Linux 8.0. You can install '''SpamAssassin''' from the RPMs. You have to remove the old startup script /etc/rc.d/init.d/spamassassin and copy this script to /etc/init.d/spamd. cd to /etc/init.d and call insserv spamd. On the next bootup, SpamAssassin will be activated.
<!--T:29-->
* (German) [https://www.pro-linux.de/artikel/2/950/mini-howto-fuer-bogofilter-mit-kmail.html Mini-HOWTO für bogofilter mit KMail], Added 2003-11-07


==Other Tools and Patches==
<!--T:31-->
* [http://www.techforce.com.br/news/quem_somos/linux/mini_how_to_kmail_and_spamoracle KMail and SpamOracle Mini HOWTO]  This is a description of how to configure '''KMail''' to filter spam using '''SpamOracle''' (Bayesian self-learning algorithm filtering for English and non-English messages) on IMAP and POP accounts without using '''procmail''', Updated 2004-01-19


<!--T:32-->
* [http://www.softwaredesign.co.uk/Information.SpamFilters.html KMail and SpamAssassin resp. Quick Spam Filter (qsf)], a more detailed article than the one below, Added 2003-06-30
<!--T:33-->
* [https://web.archive.org/web/20081031150245/http://kmail.kde.org/unsupported/spamd Startup script for SpamAssassin] (Christian Banik <christian at buschaos.de>, 2002-07-11)  This is a startup script for '''SpamAssassin''' in SuSE Linux 8.0. You can install '''SpamAssassin''' from the RPMs. You have to remove the old startup script /etc/rc.d/init.d/spamassassin and copy this script to /etc/init.d/spamd. cd to /etc/init.d and call insserv spamd. On the next bootup, SpamAssassin will be activated.
</translate><span id="Other Tools and Patches"></span><translate>
==Other Tools and Patches== <!--T:34-->
<!--T:35-->
* [http://www.tiros.net/pfeiffer/bin/lyris_filter Lyris Filter], a script to repair broken IDs and In-Reply-To headers produced by the commercial listserve product Lyris, Updated 2005-01-16
* [http://www.tiros.net/pfeiffer/bin/lyris_filter Lyris Filter], a script to repair broken IDs and In-Reply-To headers produced by the commercial listserve product Lyris, Updated 2005-01-16


* [http://kontact.kde.org/kmail/unsupported/eudorafilters2kmail.pl eudorafilters2kmail.pl], Perl script to import filters from '''Eudora''', Added 2003-05-09
<!--T:36-->
* [http://kmail.kde.org/unsupported/eudorafilters2kmail.pl eudorafilters2kmail.pl], Perl script to import filters from '''Eudora''', Added 2003-05-09


<!--T:37-->
* [http://jice.free.fr/kmailpt/ KMail power tools] to save and remove attachments from emails, Added 2009-09-23
* [http://jice.free.fr/kmailpt/ KMail power tools] to save and remove attachments from emails, Added 2009-09-23


<!--T:38-->
'''Script to filter by header (by Marc Mutz)'''
'''Script to filter by header (by Marc Mutz)'''
   
   
This perl script can be used with a ''pipe through'' filter action after a <menuchoice>remove header -> Reply-To</menuchoice> action. It's useful for people who want to change certain headers based on the content of other headers. This is something '''KMail''' filters currently do not support, but is useful here and there.
This perl script can be used with a ''pipe through'' filter action after a <menuchoice>remove header -> Reply-To</menuchoice> action. It's useful for people who want to change certain headers based on the content of other headers. This is something '''KMail''' filters currently do not support, but is useful here and there.


<!--T:39-->
This particular script replaces (if used in conjunction with the <menuchoice>remove header -> Reply-To</menuchoice> action) the Reply-To header of mails sent from a Debian-style bugtracking system with <bugno>@bugs.kde.org. This is useful if bug reports are delivered to developers through a mailinglist that overwrites the Reply-To header with its post address:
This particular script replaces (if used in conjunction with the <menuchoice>remove header -> Reply-To</menuchoice> action) the Reply-To header of mails sent from a Debian-style bugtracking system with <bugno>@bugs.kde.org. This is useful if bug reports are delivered to developers through a mailinglist that overwrites the Reply-To header with its post address:


<!--T:40-->
{{Input|1=#!/usr/bin/perl
{{Input|1=#!/usr/bin/perl
     $endOfHeader = 0;
     $endOfHeader = 0;
Line 100: Line 151:
         print;
         print;
     };
     };
}}
}}


* [http://www.garandnet.net/prog.php#randsig RandSig], a small script that produces random quotes.
<!--T:42-->
 
* [http://kmail.kde.org/unsupported/uniqmail uniqmail], a small bash/sed script that removes mail duplicates from mbox files.
* [http://kontact.kde.org/kmail/unsupported/uniqmail uniqmail], a small bash/sed script that removes mail duplicates from mbox files.
 
* [http://www.cs.uni-magdeburg.de/~muhs/projekte/index.html KMail-Plugin for Netscape], how to modify Netscape so you can use '''KMail''' instead of '''Netscape Messenger'''.


<!--T:43-->
* '''Using KMail and [http://cr.yp.to/proto/maildir.html Maildir]''' (by Georg Lehner, jorge(at)toa.magma.com.ni):  
* '''Using KMail and [http://cr.yp.to/proto/maildir.html Maildir]''' (by Georg Lehner, jorge(at)toa.magma.com.ni):  
'''qmail''' delivers (with standard Maildir setup) Mail into the subdirectories of ~/Maildir/, that means, personal mail never goes to a "public" directory (e.g. /var/spool/mail/) as is the case with traditional mail transport agents.
'''qmail''' delivers (with standard Maildir setup) Mail into the subdirectories of ~/Maildir/, that means, personal mail never goes to a "public" directory (e.g. /var/spool/mail/) as is the case with traditional mail transport agents.


<!--T:44-->
'''qmail''' provides a command: '''maildir2mbox''', to re-"deliver" mail from ~/Maildir/ to this namely public directory, we wrap this command into a script: '''qmail2kmail'''.
'''qmail''' provides a command: '''maildir2mbox''', to re-"deliver" mail from ~/Maildir/ to this namely public directory, we wrap this command into a script: '''qmail2kmail'''.


<!--T:45-->
'''KMail''' is set up to read mail from the "traditional" place, but '''qmail2kmail''' is run before checking mail via the precommand directive in the configuration, so it finds all incoming mail where it is supposed to find it in a traditional setup.
'''KMail''' is set up to read mail from the "traditional" place, but '''qmail2kmail''' is run before checking mail via the precommand directive in the configuration, so it finds all incoming mail where it is supposed to find it in a traditional setup.


<!--T:46-->
'''Setup: '''
'''Setup: '''
My '''qmail''' binaries reside in /var/qmail/bin, which is most propably not the "right" place to put them, so fix this on your system and in the '''qmail2kmail''' script.
My '''qmail''' binaries reside in /var/qmail/bin, which is most probably not the "right" place to put them, so fix this on your system and in the '''qmail2kmail''' script.


I installed '''qmail2kmail''' in /usr/local/bin, I suppose it should be world executable, or at least by the qmail-groups, if you are concerned about security you should know how to figure out and rewrite this instructions.
<!--T:47-->
I installed '''qmail2kmail''' in /usr/local/bin, I suppose it should be world executable, or at least by the qmail-groups, if you are concerned about security you should know how to figure out and rewrite these instructions.


<!--T:48-->
In the '''KMail''' configuration you should have something similar to:
In the '''KMail''' configuration you should have something similar to:


<!--T:49-->
{{Output|1=
{{Output|1=
   [Account 1]
   [Account 1]
Line 135: Line 189:
and everything should work fine. Here comes '''qmail2kmail''':
and everything should work fine. Here comes '''qmail2kmail''':


<!--T:50-->
{{Input|1=
{{Input|1=
   #!/bin/sh
   #!/bin/sh
Line 140: Line 195:
   # LEG06012001
   # LEG06012001
   # Convert Mails in Maildir format in ~/Maildir/ to mbox format in ~/Mail/inbox
   # Convert Mails in Maildir format in ~/Maildir/ to mbox format in ~/Mail/inbox
   #  as required by Kmail.
   #  as required by Kmail.<!--}}-->


   MAILDIR=~/Maildir/
   <!--T:51-->
MAILDIR=~/Maildir/
   MAILTMP=tmpdir
   MAILTMP=tmpdir
   MAIL=/var/mail/$USER
   MAIL=/var/mail/$USER
   export MAILDIR MAILTMP MAIL
   export MAILDIR MAILTMP MAIL


  /var/qmail/bin/maildir2mbox
<!--T:52-->
/var/qmail/bin/maildir2mbox
}}
}}
                
                
Note that "tmpdir" is a scratchfile and will be overwritten, so if you happen to have a file tmpdir in the place where '''maildir2mbox''' wants to create it, you will get in trouble.
Note that "tmpdir" is a scratchfile and will be overwritten, so if you happen to have a file tmpdir in the place where '''maildir2mbox''' wants to create it, you will get in trouble.


<!--T:53-->
A solution would be to use the '''tempfile''' command, but it happens to not exist on every Unix, so a local solution will have to be found if necessary. If '''qmail2kmail''' doesn't run in the $USER's homedirectory (which I did not check out) I would strongly recommend to use at least:
A solution would be to use the '''tempfile''' command, but it happens to not exist on every Unix, so a local solution will have to be found if necessary. If '''qmail2kmail''' doesn't run in the $USER's homedirectory (which I did not check out) I would strongly recommend to use at least:


<!--T:54-->
{{Input|1=MAILTMP=$USER/.qmailtemp
{{Input|1=MAILTMP=$USER/.qmailtemp
}}
}}
Line 159: Line 218:
Note that I also successfully installed '''qmail-pop3d''' and fetched mail via POP3 from the local host, but it is slower and clumsier.
Note that I also successfully installed '''qmail-pop3d''' and fetched mail via POP3 from the local host, but it is slower and clumsier.


<!--T:55-->
[[Category:Office]]
[[Category:Office]]
[[Category:Internet]]
[[Category:Internet]]
</translate>
</translate>

Latest revision as of 06:06, 18 April 2019

KMail: Tools

Warning

Please understand that the software and documentation provided here is mostly not written by the KMail team, so they cannot provide support for it. In fact they often cannot even test these applications - use at your own risk. Some of these utilities are extremely old

Mail Import Tools

You should first try to import your old mail using KMail's File -> Import Messages... menu.

If you need to import mails and directory structure from Outlook, you can use Thunderbird (Windows version) to import Outlook data, then you can use the Kmail import from Thunderbird and point the directory where theThunderbird data has been saved.

If that doesn't work, the following programs might be helpful:

  • readpst, a utility for converting Microsoft Outlook mail files (personal folders) to standard UNIX mbox format, Added 2005-01-24
  • Outport, a program for exporting data from Outlook to Evolution, from which KMail can import messages, Added 2004-07-23
  • mozilla2kmail.pl, a simple bash script to convert mail from Mozilla to KMail, Added 2004-06-12
  • Sylpheed2Maildir, a simple bash script to convert a sylpheed mail box directory to maildir format. Added 2003-05-27
  • Eudora2Unix, a collection of Python scripts that together convert Qualcomm Eudora mail folders to mail directories for unix or Linux. Updated 2003-03-31
  • ol2mbox, Outlook Express to mbox converter (not maintained anymore). Added 2002-02-09
  • tb2kmail, a tool to export mail from The Bat to KMail. Added 2002-01-07
  • xfmail2mbox.sh, a shell script by Jörg Reinhardt <joeyhh(at)gmx.de> to convert xfmail folders to mbox (which is used by KMail). Requires awk. Updated 2001-02-12

Mail Export Tools

  • MHonArc, a mail-to-HTML converter. Added 2003-03-31
  • tKMailHonArc, a frontend for MHonArc to convert KMail email folders (mbox, maildir) to HTML. Added 2003-03-31
  • mbox2pdf, perl script for converting an email mbox to a hyperlinked pdf. Uses hypermail-2.2.0 and LaTeX. Added 2011-08-11.

Addressbook Import Tools

  • lookout, a small Python script that enables you to convert your Outlook 97 addressbook data to KAB. Added 2002-07-31
  • pineToKMail, a perl script to convert a pine addressbook to a KMail addressbook.

Development and Security

  • Mail client test file v0.5 (55kB): This mbox file triggers some bugs and has very long field values to trigger buffer overflows. You may use this to find possible security problems - not only in KMail, but in any mail client that supports mbox folders. Just copy this file to ~/Mail/ and start KMail.

Anti-Spam Tools

  • KMail and SpamOracle Mini HOWTO This is a description of how to configure KMail to filter spam using SpamOracle (Bayesian self-learning algorithm filtering for English and non-English messages) on IMAP and POP accounts without using procmail, Updated 2004-01-19
  • Startup script for SpamAssassin (Christian Banik <christian at buschaos.de>, 2002-07-11) This is a startup script for SpamAssassin in SuSE Linux 8.0. You can install SpamAssassin from the RPMs. You have to remove the old startup script /etc/rc.d/init.d/spamassassin and copy this script to /etc/init.d/spamd. cd to /etc/init.d and call insserv spamd. On the next bootup, SpamAssassin will be activated.

Other Tools and Patches

  • Lyris Filter, a script to repair broken IDs and In-Reply-To headers produced by the commercial listserve product Lyris, Updated 2005-01-16

Script to filter by header (by Marc Mutz)

This perl script can be used with a pipe through filter action after a remove header -> Reply-To action. It's useful for people who want to change certain headers based on the content of other headers. This is something KMail filters currently do not support, but is useful here and there.

This particular script replaces (if used in conjunction with the remove header -> Reply-To action) the Reply-To header of mails sent from a Debian-style bugtracking system with <bugno>@bugs.kde.org. This is useful if bug reports are delivered to developers through a mailinglist that overwrites the Reply-To header with its post address:

#!/usr/bin/perl
    $endOfHeader = 0;
    while (<>) {
        if ( $endOfHeader == 0 )
        {
            if ( /^(?i:Subject):\s+Bug\#(\d{4,5}):/ )
            {
                $_ = "Reply-To: $1\@bugs.kde.org\n".$_;
            }
            elsif ( /^$/ )
            {
                $endOfHeader = 1;
            }
        }
        print;
    };
  • uniqmail, a small bash/sed script that removes mail duplicates from mbox files.
  • Using KMail and Maildir (by Georg Lehner, jorge(at)toa.magma.com.ni):

qmail delivers (with standard Maildir setup) Mail into the subdirectories of ~/Maildir/, that means, personal mail never goes to a "public" directory (e.g. /var/spool/mail/) as is the case with traditional mail transport agents.

qmail provides a command: maildir2mbox, to re-"deliver" mail from ~/Maildir/ to this namely public directory, we wrap this command into a script: qmail2kmail.

KMail is set up to read mail from the "traditional" place, but qmail2kmail is run before checking mail via the precommand directive in the configuration, so it finds all incoming mail where it is supposed to find it in a traditional setup.

Setup: My qmail binaries reside in /var/qmail/bin, which is most probably not the "right" place to put them, so fix this on your system and in the qmail2kmail script.

I installed qmail2kmail in /usr/local/bin, I suppose it should be world executable, or at least by the qmail-groups, if you are concerned about security you should know how to figure out and rewrite these instructions.

In the KMail configuration you should have something similar to:

[Account 1]
  Folder=inbox
  Name=Mi correo en TOA
  Type=local
  check-exclude=false
  check-interval=0
  precommand=/usr/local/bin/qmail2kmail

and everything should work fine. Here comes qmail2kmail:

#!/bin/sh
  #
  # LEG06012001
  # Convert Mails in Maildir format in ~/Maildir/ to mbox format in ~/Mail/inbox
  #   as required by Kmail.

  MAILDIR=~/Maildir/
  MAILTMP=tmpdir
  MAIL=/var/mail/$USER
  export MAILDIR MAILTMP MAIL

/var/qmail/bin/maildir2mbox

Note that "tmpdir" is a scratchfile and will be overwritten, so if you happen to have a file tmpdir in the place where maildir2mbox wants to create it, you will get in trouble.

A solution would be to use the tempfile command, but it happens to not exist on every Unix, so a local solution will have to be found if necessary. If qmail2kmail doesn't run in the $USER's homedirectory (which I did not check out) I would strongly recommend to use at least:

MAILTMP=$USER/.qmailtemp

Note that I also successfully installed qmail-pop3d and fetched mail via POP3 from the local host, but it is slower and clumsier.