Mailing List CGatePro@mail.stalker.com Message #92750
From: John Rudd <jrudd@ucsc.edu>
Subject: Re: Processing server wide rules when email comes from certain host
Date: Wed, 26 Sep 2007 10:36:05 -0700
To: CommuniGate Pro Discussions <CGatePro@mail.stalker.com>
Stefan Seiz wrote:
On 26.09.2007 18:47 Uhr, Urban Loesch <bind@enas.net> wrote:

Hi,

I try to implement a rule, that my external helper (ClamAv) does not
scan for viruses if mail comes from 2 certain hosts.

I tried the following rule.

Data:
Submit Address --> is not --> SMTP [192.168.20.231], SMTP[192.168.20.251]
Action
ExternalFilter --> virusscanner

The problem is, the rule does not work correctly. The rule redirects all
messages through
the virusscanner.

If I only use "SMTP [192.168.20.231]" in the rules condition it works
normally. But so I have the problem that
mails only will not be scanned when they come from IP "192.168.20.231".
 From IP "192.168.20.251" they
will be redirected through the external helper.

Have you any idea how can I implement this?


You need to change "is not" with "not in", then it'll work.

The "is not" operator will only match against one Parameter whereas "not in"
will match against a comma separated list. AFAIK there shouldn't be a SPACE
after the comma, so the rule should look like:

Submit Address -> NOT IN -> SMTP [192.168.20.231],SMTP[192.168.20.251]

There shouldn't be a space after the comma, but there SHOULD be a space after SMTP ;-)

Submit Address -> NOT IN -> SMTP [192.168.20.231],SMTP [192.168.20.251]

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster