Re: [exim] want to skip dspam router

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Phil Pennock
Ημερομηνία:  
Προς: Brent Clark
Υ/ο: exim-users
Αντικείμενο: Re: [exim] want to skip dspam router
On 2006-02-16 at 13:08 +0200, Brent Clark wrote:
> dspam_router:
>  no_verify
>  check_local_user
>  condition   = "${if and { \
>  {!def:h_X-Spam-Flag:} \
>  {!def:h_X-FILTER-DSPAM:} \
>  {!eq {$received_protocol}{local}} \
>  { <= {$message_size}{512k}} \
>  }\
>  {1}{0}}"
>  headers_add  = "X-FILTER-DSPAM: by $primary_hostname on $tod_full"
>  driver       = accept
>  transport    = dspam_spamcheck
>  local_part_suffix != -bookings
>  local_part != sales admin accounts

>
> If anyone would be so kind as to over look this and perhaps share with me
> as too how I can enhance on this, I would be most grateful.


I may have been out of it a while, but I've just checked the docs with
Exim 4.60 and I'm not seeing anything which allows != as a matcher for a
condition on a router. It's present in ACL checks, but that's it.

I just checked on a 4.54 box and that's the case there.

If != has been added and this passes config checks with "exim -bV" for
you, then please accept my apologies and point me to the docs which I've
missed. However, since local_parts is missing the trailing 's' I'm
going to risk posting.

You probably want to move those local_part values out to a localpartlist
and then negate a match on that, vis:

  localpartlist skip_spam_scanning = sales admin accounts
  [...]
  dspam_router:
    [...]
    local_parts = ! +skip_spam_scanning


Aside from anything else, to the extent practical it's good to keep
user-specific stuff abstracted out to the start of your config. If you
have special handling for a particular magic user, that's arguably a
different matter.

Also, what are you trying to do with the local_part_suffix check? If
you want to state "must not end -bookings" then you probably want
something like:

    condition = ${if match{$local_part}{\N-request$\N} {no}{yes}}


Regards,
--
I am keeping international relations on a peaceable footing.
You are biding your time before acting.
He is coddling tyrants.
-- Roger BW on topic of verb conjugation