(Fwd) Re: [Exim] System wide filter

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Dermot Paikkos
Dátum:  
Címzett: exim-users
Tárgy: (Fwd) Re: [Exim] System wide filter
I have tried this on a test account but it doesn't fail the message.
The central_filter was amended to the end of the directors section
and I sent mail to the user. All the mail got through. Does the order
of the directors matter? The first director is the system_aliases that
sends mail to pop mail boxes. Do I need to put my central filter
before the system_aliases? The filter reads:
# Exim filter

if error_message then finish endif
if ${local_part} contains "test"
then fail text "banned by postmaster"
endif


Dp

On Thu, 15 Mar 2001, Dermot Paikkos wrote:

> I am trying to set up a system wide filter on a Exim 3.16 running on Digital


The phrase "system filter" in Exim is normally used to refer to a single
filter which is set up by the message_filter option, and run once, at
the start of delivery. To avoid confusion, I'd rather call what you are
doing "centralized per-address filtering", or something.

> Here's the example transport:


This is a director, not a transport. (I know that new terminology is
confusing, but best not add to the confusion.)

> central_filter:
> driver = forwardfile
> file = /path/to/file/${local_part}
> no_check_local_user
> no_verify
> filter
> allow_system_actions


> Question 1) My understanding of this transport is that it will search for a file to
> match the local part of the recipient. It a file exists (in the path given) it will
> apply the filter if not it will continue as a normal delivery. Is that correct?


Yes. It will also continue as a normal delivery if the filter does
nothing (e.g. is an empty file) or sets up only non-significant
deliveries.

> Question 2) According to the docs this allows me to use the ${local_part} (and
> $domain) variables, so I could theoretically limit email sizes for some users, with
> a filter such as; if ${local_part} contains "heavyuser" and $message_size is not
> below 4000 then fail text "Message to large for this user". Does that seems right?


Yes. (Just to be absolutely clear: this would limit *incoming* messages
for those users.)

> Question 3) I already have a sender_reject_recipients in the conf file. Will the
> no_check_local_user or no_verify interfere with this. I still need to halt mail from
> one or two hosts (spammers), which I guess I can do with the central filter after
> but I do like sender_reject.


No. Sender_reject[_recipients] doesn't go near the directors/routers.

> Question 4) Has anyone else successfully set a system wide filter which would do
> what I am after? If so could I have a look :-), I would like to see if the example is
> very different from what I am about to embark on.


Pass.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



------- End of forwarded message -------
~~
Dermot Paikkos * dermot@???
Network Administrator @ Science Photo Library
Phone: 0207 432 1100 * Fax: 0207 286 8668