(solved) getmail + bmf + dovecot-lda + dovecot + imapsieve + kmail
Volker Wysk <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <5872820.GHCopCA7CM@desktop> |
Hi! Since I've caused some discussions in this list, I think I'd let you know how I've managed to eventually set all up cleanly. 1. I've set up getmail for mail fetching. I'm running it as a Systemd User Service Unit. This means, that the user(s) are in control of their mail fetching and spam filters. All the configuration files are owned by the respective users. And all programs (getmail, bmf, dovecot-lda) run as the user, and not as root - except for the dovecot server, but including dovecot-lda. 2. I've set up bmf to filter the mail. It is run as a filter by getmail. This was simple. 3. Getmail calls dovecot-lda to deliver the mail. This requires some tweaking of file ownerships. Also, rotation of the logfiles need to be set up, because they quickly grow very large. 4. The messages get stored by dovecot. The user's sieve script is applied. Its last sieve rule moves messages, which have been marked as spam by bmf, to the spam folder. 5. The IMAPSieve standard is used to train the spam filter when a message is moved from or to the spam folder. This means, that four scripts (sieve and bash) need to be set up. This way, bmf, the spam filter, can be trained by moving messages to or from the spam folder, respectively. 6. However, Kmail brings two buttons named "Spam", and "Ham". It can be configured, what they are to do, by using kmail's filters. I've configured the "spam" button to move the messages into the spam folder (what causes it to be trained as spam). And made the "ham" button to cause the message to be moved to INBOX (causing it to be trained as ham). 7. So we're done. Only one spam filter for all three of my devices (desktop, laptop, smartphone). And it can even be trained by all devices alike. Ultimately, I now think, that getmail works better and is a cleaner solution than fetchmail (except for LMTP support). Happy hacking, Volker