Re: [Exim] Filter howto.

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Sheldon Hearn
Ημερομηνία:  
Προς: Jason C. Leach
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] Filter howto.

On Thu, 14 Jun 2001 15:55:27 MST, "Jason C. Leach" wrote:

> I don't really get what they are talking about with the scanned-ok or -f
> option.


Both -oMr and -f are described in the Exim Specification, which is
available on the www.exim.org site if you don't have a local copy yet.

Basically, the proposed virus scanning solution in the FAQ works like
this:

* Message arrives

* The message hasn't been specially marked as having come from an OK
place, so...

* The message is piped (by the virus_scan transport, which you set up)
to your Python script, which either handles the "found a virus
condition" and then returns a non-zero exit code or...

* If the virus scan shows no viruses, your script pipes the message into
a new instance of Exim, using the -oMr option to specially mark the
message has having come from an OK place (and using the -f option to
ensure that you don't "overwrite" the original sender address.

So now we start again, but this time...

* Message arrives

* The message has been specially marked as having come from an OK place,
so...

* The vircheck router now declines to handle the message and processing
continues as if it didn't exist.

* The message goes through the "normal" (configured) routing and
delivery process.

I think your virus_scan transport might look something like this, but
you should read up on the pipe transport, because there are loads of
different ways to handle this (e.g. get Exim to send the failure
message by using return_fail_output)

virus_scan:
driver = pipe
command = /path/to/filter.py
user = <some trusted user>
# Don't bounce messages for which the filter returned non-zero,
# because the filter is set up to do that...
ignore_status
[...]

Ciao,
Sheldon.