Re: [exim] Help with router

Etusivu
Poista viesti
Vastaa
Lähettäjä: Carlo Wood
Päiväys:  
Vastaanottaja: Antonio Cocco
Kopio: exim-users
Aihe: Re: [exim] Help with router
On Sun, May 06, 2007 at 05:53:20PM +0200, Antonio Cocco wrote:
> I wish to filter the message based on the x-spam-status header and I
> tried the following router trying to control if the x-spam-status
> contains Yes
>
> delspam:
>    driver = accept
>    condition = ${if match {$h_X-Spam-Status}{"Yes"} {Yes}{No}}
>    transport = rmspam


I use

condition = ${if >={$spam_score_int}{100}}

which uses the spam level rather than yes/no.
However, I am using the exim 'spam = User:true' filtering mechanism
(needs content filtering to be compiled it). See my previous
post to this list for a full example.

It seems that you are using a router instead. The normal way
that works is that you send all mail to spamc regardless,
changing the protocol. Then if mail is resubmitted (after
being filtered by spamassassin) it is not send to spamc
again because of the protocol (not smtp anymore). Every
mail thus passes twice through exim. The only advantage
is that this allows spamassassin to rewrite headers as
it pleases - but if that is really an advantage is dubious:
you can also tell spamassassin to put whatever you want
to know in the Status header, which is available in exim.
Ie, I have in /etc/spamassassin/local.cf:

add_header all Status "_YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTSSCORES(,)_ version=_VERSION_"

What satisfied me enough to use the 'spam =' method and
handling spam in the smtp data ACL, instead of using a router.

--
Carlo Wood <carlo@???>

PS I don't see you actually USE that router that sends
mail through spamc, so maybe that is your problem:
exim never sees your "rewritten" headers - because
whatever spamassassin is doing to the headers is
ignored. Only the Status header is available, but
not as header, but as variable: $spam_status (I think
it was).