KMail/Інструменти

From KDE UserBase Wiki
Revision as of 19:18, 20 September 2010 by Yurchor (talk | contribs) (Created page with '==Розробка і захист==')
Other languages:

KMail: Інструменти

Попередження

Слід пам’ятати, що тут наведено посилання на програмне забезпечення та документацію, створену переважно людьми, які не є учасниками команди розробників KMail. Отже команда розробників не може супроводжувати ці дані. Фактично, команда розробників навіть не тестувала ці програми. Вся відповідальність за їх використання покладається на вас. Деякі з інструментів мають доволі поважний вік.


Інструменти імпортування поштових архівів

Вам варто спочатку спробувати імпортувати поштові архіви за допомогою пункту меню Файл -> Імпортувати повідомлення... самої програми KMail.

Якщо вам потрібно імпортувати повідомлення і структуру каталогів з програми Outlook™, ви можете скористатися програмою Thunderbird (версією для Windows) для імпортування даних Outlook™, а потім імпортувати до Kmail каталог зі збереженими даними Thunderbird.

Якщо цей спосіб не спрацює, корисними можуть виявитися ці програми:

  • readpst — програма для перетворення файлів поштових архівів Microsoft Outlook™ (особистих тек) на стандартні дані mbox UNIX. Додано 24 січня 2005 року.
  • Outport — програма для експортування даних з Outlook™ до Evolution, дані цього формату можна імпортувати до KMail. Додано 23 липня 2004 року.
  • 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

Програми для експортування поштових архівів

  • MHonArc — програма для перетворення поштових архівів на дані у форматі HTML. Додано 31 березня 2003 року.
  • tKMailHonArc, a frontend for MHonArc to convert KMail email folders (mbox, maildir) to HTML. Added 2003-03-31

Програми для імпортування даних адресних книг

  • 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.

Розробка і захист

  • 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 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
  • 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 propably 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.

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.