I found a way to run Spambayes as a Postfix before-queue filter.
You also need qpsmtpd: http://wiki.qpsmtpd.org
qpsmtpd is an SMTP receiver that has several plugins, and one of them is a
Spambayes plugin:
http://wiki.qpsmtpd.org/plugins
http://wiki.qpsmtpd.org/plugins:spam:spambayes

It works like this:

* Postfix runs on port 25 and does all usual checks
* It passes the accepted mail to qpsmtpd that runs for example on port
10024. This is done with the SMTP protocol
* qpsmtpd sends the mail to sb_filter.py
* sb_filter.py scores the mail and adds the X-Spambayes headers
* qpsmtpd sends the mail to a second Postfix instance that runs for
example on port 10025. It does that by using the original SMTP commands it
got from the first Postfix instance
* Postfix 2 does its works and queues the mail for mailbox delivery.


This approach is interesting for small configs like mine, with only two
users (my wife and myself).
Apart from the fact that all email gets X-Spambayes headers (no need to do
that in .procmailrc any more), there is an intriguing possibility. One
could configure the second Postfix instance to reject all mail with a high
spam score, using header_checks. The really, *really* interesting part is
that this is an SMTP reject, not a bounce. In other words, the SMTP
session with the original server is still open, so the reject gets sent
from postfix2 to qpsmtpd; from qpsmtpd to postfix1, and from postfix1 all
the way back to the spammer. The *real* spammer. This does not create
backscatter.


All of this is still theory, but I'm going to try this in a couple of
weeks, after my CS exams.

Kind regards,
Amedee Van Gasse

-- 


_______________________________________________
[email protected]
http://mail.python.org/mailman/listinfo/spambayes
Info/Unsubscribe: http://mail.python.org/mailman/listinfo/spambayes
Check the FAQ before asking: http://spambayes.sf.net/faq.html

Reply via email to