Mailing List Archive

Re: Pipe Transport + SpamAssassin = Double Exim Processes
On 25-Jul-2002 at 08:45:59 Philip Hazel wrote:
> The best way of doing this is surely to run the checker once per
> message, using the local_scan() interface, and use it to add headers to
> the message. These can then be used subsequently, in filters or in
> routers, to do different things for different recipients.
>
Exactly. However, in our case we allow each user to set their own 'spam
limits'. In that respect the message must be scanned according to the users
own preferences - per recipient rather than per message. Having said that,
since most users will probably use the system-wide defaults, then the
message will indeed pass through local_scan for one spam scan for most
users, and only those with non-default config files will have something else
happen - very vague at the moment! At present we are doing per-recipient
processing and yes it can be intensive :-)

If I can upgrade the mailhubs to exim4 this week then I can use local_scan -
so far we only have one central mailhub on exim4 :-)


John.

------------------------------------------------------------------------
John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914
E-mail: jhorne@plymouth.ac.uk
PGP key available from public key servers
RE: Pipe Transport + SpamAssassin = Double Exim Processes [ In reply to ]
Thanks for the suggestions so far!

I looked into the "${run" condition, and it would be perfect, if only
Exim made the message available to it.

For example, to enable filtering for a user, let them use their own
SpamAssassin rules, use Maildirs, and maintain all the local_delivery
transport options, all we would have to do is put this in a .forward
file for the user:

==============
# Exim Filter
if "${run{spamc -c}{}}$rurc" is 0 then
save $home/SpamMaildir
else
save $home/Maildir
endif
===============

That's short and sweet. No mail server maintainer will be confused by
that.

I wonder what the overhead would be using local_scan for every message
that comes in, versus only using a router or filter for just those
messages needing to be scanned?

I guess SA-Exim could be used and modified to only add a header with the
SA score (do no rejects). Then later, let the user decide what score
they want by a filter or something. However, we want to run other home
grown perl filters as well, that do not use scoring. And, using some
custom C program in our configuration will introduce its own problems.

Rather than modify Exim via local_scan, how hard would it be to modify
Exim to put the message in stdin whenever ${run is called? Kind of like
pipe.

Thanks again,

Rich
richs@whidbey.net

-----Original Message-----
From: exim-users-admin@exim.org [mailto:exim-users-admin@exim.org] On
Behalf Of John Horne
Sent: Thursday, July 25, 2002 2:10 AM
To: exim-users@exim.org
Subject: Re: [Exim] Pipe Transport + SpamAssassin = Double Exim
Processes


On 25-Jul-2002 at 08:45:59 Philip Hazel wrote:
> The best way of doing this is surely to run the checker once per
> message, using the local_scan() interface, and use it to add headers
> to the message. These can then be used subsequently, in filters or in
> routers, to do different things for different recipients.
>
Exactly. However, in our case we allow each user to set their own 'spam
limits'. In that respect the message must be scanned according to the
users own preferences - per recipient rather than per message. Having
said that, since most users will probably use the system-wide defaults,
then the message will indeed pass through local_scan for one spam scan
for most users, and only those with non-default config files will have
something else happen - very vague at the moment! At present we are
doing per-recipient processing and yes it can be intensive :-)

If I can upgrade the mailhubs to exim4 this week then I can use
local_scan - so far we only have one central mailhub on exim4 :-)


John.

------------------------------------------------------------------------
John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914
E-mail: jhorne@plymouth.ac.uk
PGP key available from public key servers

--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at http://www.exim.org/ ##
RE: Pipe Transport + SpamAssassin = Double Exim Processes [ In reply to ]
On Thu, 25 Jul 2002, Richard, WhidbeyNet NOC wrote:

> I looked into the "${run" condition, and it would be perfect, if only
> Exim made the message available to it.

Well, you can pass it the message id, and it can read the spool file for
itself. You would have to unpick the -H file for yourself, but the
format is documented.

> Rather than modify Exim via local_scan, how hard would it be to modify
> Exim to put the message in stdin whenever ${run is called? Kind of like
> pipe.

It would be hard to put the whole message (when there *is* a message -
${run can be called at times when there isn't a message, e.g. during an
ACL for RCPT) on stdin, because the headers are in memory, and not in a
file.


--
Philip Hazel University of Cambridge Computing Service,
ph10@cus.cam.ac.uk Cambridge, England. Phone: +44 1223 334714.