Retrieving Emails From Remote Servers With getmail (Debian Etch) - Page 2
4 Integrating SpamAssassin Into getmailIf you'd like getmail to invoke SpamAssassin, you can do it as follows: First we must install SpamAssassin. As root, we run apt-get install spamassassin spamc Then we must configure SpamAssassin. This can be done in the file /etc/mail/spamassassin/local.cf. A valid file could look like this: vi /etc/mail/spamassassin/local.cf
(The comments in /etc/mail/spamassassin/local.cf will tell you more about the above settings.) If you enable Bayes (use_bayes 1), it is important that you put the line bayes_ignore_header X-getmail-filter-classifier into /etc/mail/spamassassin/local.cf so that Bayes ignores headers added by getmail. Finally we must enable the SpamAssassin daemon by setting ENABLED to 1 in /etc/default/spamassassin: vi /etc/default/spamassassin
Then we start the SpamAssassin daemon: /etc/init.d/spamassassin start Now log in as falko again on the command line and open ~/.getmail/getmailrc and add the following [filter] section: vi ~/.getmail/getmailrc
(If this is not your first [filter] section, you must rename the first [filter] section to [filter-1], the second one to [filter-2], and so on.) That's it. SpamAssassin is now integrated into getmail.
5 Integrating ClamAVClamAV is a project that publishes new releases very often, and once a new release is published, old versions will print out warnings. Therefore we must make sure that we install the latest ClamAV release by adding the following line to /etc/apt/sources.list (as root): vi /etc/apt/sources.list
Afterwards we update our packages database: apt-get update (- if you get GPG warnings, you can ignore them -) and install ClamAV: apt-get install clamav clamav-base clamav-daemon clamav-freshclam Then log in as the user falko again and edit ~/.getmail/getmailrc. If you want getmail to delete virus emails, add the following filter: vi ~/.getmail/getmailrc
If you want getmail to deliver infected messages, add the following filter instead: vi ~/.getmail/getmailrc
Again, keep in mind what I said about multiple [filter] sections in the previous chapter: If this is not your first [filter] section, you must rename the first [filter] section to [filter-1], the second one to [filter-2], and so on. That's it for the ClamAV integration.
|



Recent comments
1 day 1 hour ago
1 day 4 hours ago
1 day 5 hours ago
1 day 7 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 11 hours ago
2 days 3 hours ago
2 days 4 hours ago
2 days 8 hours ago