[Exim] Controlling Spamassassin Scanning by Subnet in Exim

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Owen Creger
Fecha:  
A: spamassassin-talk, 'exim-users@exim.org'
Asunto: [Exim] Controlling Spamassassin Scanning by Subnet in Exim
I have seen this going around several times without a resolution, on
spamassassin and exim mailing lists

By using a regular expression (regex) in a condition statement, I was able
to control the spamassassin router and director by IP address.
I'm running Exim 3.2X, however this technique would most likely work with
4.X also.
I'm using Exim solely as a relay into and out of my network.
I have several hosts that use the relay, and I don't want their outbound
messages to be scanned.

To stop messages from being scanned that have already been scanned,
originate locally, or the 10.1.2.0/24 network:

condition = "${if and { {!def:h_X-Spam-Flag:} \
                  {!eq {$received_protocol}{spam-scanned}} \
                  {!eq {$received_protocol}{local}} \
                  {!match {$sender_host_address}{^10\.1\.2\.}} } {1}{0}}"


My actual network spans several class C's that are rather disparate, and I
was able to handle them without a problem.
I found several good sites on regex, just goole for regular expressions.

I discovered that regular expressions are tricky, very powerful, and
extremely useful to anyone who touches a *nix system.

O'Reilly has an excellent book on the subject -
http://oreilly.com/catalog/regex/
Please excuse the ad...

That's my 2 cents.
This problem was a real bear for me, so I though I would share...hope it
helps...enjoy...

Owen C. Creger CCNA, CISSP
Info. Sec. Administrator
Creative Solutions, a Thomson Company.
7322 Newman Blvd.
Dexter, MI 48130
email: ocreger@???
ph: 734-426-5860 ex. 3787
fax: 734-426-5946
cell: 734-223-6270