[Avcheck] Spamassassin & Avcheck with Postfix

Piotr Klaban makler+avcheck@man.torun.pl
Fri, 6 Dec 2002 09:49:37 +0100


On Fri, Dec 06, 2002 at 05:25:12AM +0300, Michael Tokarev wrote:
> I.e., spamassassin calls avcheck to reinject message back to postfix.
> Cute.  Note that this speeds up reinjections significantly ;)
Right, realy smart.

> BTW, can spamassassin's daemon accept email using SMTP?  I.e., why
> there is a need to run a program (spamc) in order to contact with
> spamd?

spamc connects to spamd on port localhost:783 and uses internal protocol
(just like avcheck with avpd etc.):

               spamc --> PROCESS SPAMC/1.2
               spamc --> Content-length: <size>
  (optional)   spamc --> User: <username>
               spamc --> \r\n [blank line]
               spamc --> --message sent here--

               spamd --> SPAMD/1.1 0 EX_OK
               spamd --> Content-length: <size>
               spamd --> \r\n [blank line]
               spamd --> --processed message sent here--

spamd checks the message and returns the result to spamc.
A postfix filter program is usually a shell script that
calls spamc, and then make a decision what to do with message
if it is a spam, and what to do if it is not a spam.
It seems that spamd could listen on SMTP-aware port, but
it is not necessary.

I think that the problem with breaking sender/rcpt address
here could take place only inside the shell script.
There is a line with avcheck execution that need to be checked
if there are good arguments given.

-- 
Piotr Klaban