Re: [Exim] how to skip a router for local mails?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Troy Engel
Ημερομηνία:  
Προς: exim-users
Υ/ο: dman
Αντικείμενο: Re: [Exim] how to skip a router for local mails?
Thanks Philip and dman -- combining your two suggestions and adjusting
the router position to be *above* system_aliases, it all seems to work
now -- local+interdomain mail is untouched, everything else is scanned.
The spamcheck_router now looks like:

# Spam Assassin
# http://dman.ddts.net/~dman/config_docs/exim4_spamassassin.html
# This is going before the other routers to ensure the mail is checked
# before handing it off to any user filters
spamcheck_router:
no_verify
check_local_user
# When to scan a message :
# - it isn't already flagged as spam
# - it isn't already scanned
# - it isn't local
# - it isn't from one internal domain user to another
condition = "${if and { {!def:h_X-Spam-Flag:} {!eq
{$received_protocol}{spam-scanned}} {!eq {$received_protocol}{local}}
{!eq {$sender_address_domain}{$domain}} } {1}{0}}"
driver = accept
transport = spamcheck


If anyone sees anything dicey/suspect/insecure here, gimme a holler. So
far after about 30mins watching the logs, it's working as expected...
(crossing fingers).

thx!
-te


Philip Hazel wrote:
> On Tue, 14 May 2002, Troy Engel wrote:
>
>
>>Easy one, 2 parts -- Exim 4.04:
>>
>>1) how do you skip a router if the email was sent from one user to
>>another within the domain?
>
>
> Use the "condition" option to test $sender_address_domain and $domain.
>
>
>>I have the spamassassin router configured,
>>but I don't want it to scan any internal mail (bob@??? ->
>>staff@???):
>
>
> Sender addresses can be forged. You might also want to test where the
> message came from (a local host, for example).
>
>
>>Thanks! A major problem happening is that "joe@???" sends an
>>email to "staff@???", an alias which expands to a bajillion
>>addresses. Then, each mail to each individual address is sent through
>>SpamAssassin, just clogging up the works entirely. In a nutshell, I
>>want anything sent from my local domains not spamcheck-touched.
>
>
> You might want to investigate the use of batching with SpamAssissin.
> (No, I can't help more - I haven't used SA myself, and don't even know
> if it supportes batching.) Oh, by "batching" I mean sending *one* copy
> of the message with many recipients.
>
>



--
Troy Engel, Systems Engineer
Hockey. Kinda like Figure Skating in a War Zone.