This Space for Rent

New Code!

Postoffice has been pushed up to version 1.3.pre1. It's 1.3.pre1 because there is one fairly drastic feature change in it that is difficult for me to properly test on pell; I've added support for sendmail mail filters ("milters") so that people don't have to write their own mail filtration to wedge into --with-av.

telnet localhost smtp
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220-HELLO, LOCALHOST, WELCOME TO THE ESMTP SERVICE ON
220-SOME.POOR.HELPLESS.REDHAT.MACHINE.
220 THE CURRENT TIME IS WED APR 5 14:12:38 2006
helo pell
250 A WINK IS AS GOOD AS A NOD.
mail from:<orc>
250 OKAY FINE.
rcpt to:<orc>
250 SURE, I LOVE SPAM!
data
354 BRING IT ON.
begin 644 eicar
M6#5/(5`E0$%06S1<4%I8-30H4%XI-T-#*3=])$5)0T%2+5-404Y$05)$+4%.
75$E625)54RU415-4+49)3$4A)$@K2"H`
`
end
.
554-THE COMMITTEE HAS REJECTED THIS LETTER:
554 VIRUS EICAR-TEST-SIGNATURE DETECTED BY CLAMAV - HTTP://WWW.CLAMAV.NET
quit
221 BE SEEING YOU.

The committee, in this case, is composed of clamav-milter and spamass-milter, and the filters are passed into postoffice with the new filter= options in /etc/postoffice.cf

filter=/var/clamav/clmilter.socket
filter=/var/run/spamass.sock

The new milter code is enabled by configuring postoffice with --with-milter, which turns off the old --with-av virus scanning interface and replaces it with the milter interface.

(And you may wonder why I haven't been posting to TSFR; it's because of this code, which has eaten my brain and needed to be released before it turned me into a dessicated husk.)

Comments


Hi,

I’m going to try out the new milter feature. Where should the clamav path & options be mentioned ? I was previously using: –with-av=“/usr/pkg/bin/clamscan –mbox -i –disable-summary”

Besides, I’m wondering if I could use a bayesian ONLY spam filter instead of spamassassin.

bmf is much faster, needs quite no ram and doesn’t add a header to the message. http://pkgsrc.se/mail/bmf I’m using it in a POP_incoming/procmail filter for now,

  :0fw
  | bmf -p
  :0:
  * ^X-Spam-Status: Yes
  spam\_mbox

and you can pipe a mail to bmf -S or bmf -N to add/remove message’s words to the bayesian db respectively, which learns on itself anyways.

Thanks elge

elge Sat Apr 15 04:49:38 2006

in fact bmf also adds a header to the message, X-Spam-Status: Yes

elge Sat Apr 15 05:13:40 2006

If you want to use milters, you need to give the option –with-milter when you configure postoffice; this will turn off the old –with-av filter and use milters exclusively. Then, in postoffice.cf, you need to set filter=/path/to/unix.socket or filter=hostname:port for each milter you want to use. The example I show in the message is the way I’ve got it set up on one of my Linux servers at work.

It doesn’t really matter which order you put the filters in. They are called in order that they are listed in the config file, but since postoffice doesn’t allow them to modify the mail message, they all run without knowing about the others.

David Parsons Sat Apr 15 11:27:09 2006

Oh, and the whole business of configuring sendmail milters is a whole different can of spaghetti. I cheated when I installed them; I tested on a Linux (Centos) system, and just installed precompiled packages there, then tweaked their config files until the milters stopped trying to send mail to the (forged) From: address.

NetBSD has some milters in ports, so it’s possible the portified milters are already configured and just need a “make install” to wedge them into your system with the proper configuration.

David Parsons Sat Apr 15 11:46:58 2006

Comments are closed