RE: [exim] redirecting spam

Pàgina inicial
Delete this message
Reply to this message
Autor: William Rundquist
Data:  
A: exim-users
Assumpte: RE: [exim] redirecting spam
> -----Original Message-----
> From: exim-users-bounces@???
> [mailto:exim-users-bounces@exim.org] On Behalf Of Odhiambo G.
> Washington
> Sent: Tuesday, January 18, 2005 11:59 PM
> Subject: Re: [exim] redirecting spam
>
> * William Rundquist <war@???> [20050119 02:35]: wrote:
> >
> > I have spamassassin integrated with Exim thru
> > the exiscan patch and its working well. Right
> > now, I have a simple setup wherein spam is
> > handled with a header addition and a filter
> > which changes the subject to include a SPAM
> > marker in the subject line. I am also including
> > the spam level and spam report in the headers.
> > This is being done for all email which is processed
> > by the server.
> >
> > What I need to do is only process email for the
> > local domain (there are several domains for which
> > we are secondary MX) and also to deliver spam to
> > a separate mailbox for each of the local users.
> > Unlike the system mailbox, this spambox will be
> > a file in the users home directory.
> >
> > I have tried a rewrite rule with no luck and so
> > am looking for assistance from the list.
>
> There is no "straight" solution to that one. You have to craft it
> yourself by searching on the Internet for some keywords only
> available to your mind (right now).


Interesting proposition. I would have thought that delivering
spam to a separate mail folder (regardless of the location of
that folder) would be something that a large portion of the
community would be doing and so there would be a straightforward
recommendation.

FWIW, the solution that I have come up with after digging
thru the docs a bit more (I'm still getting use to the exim
configuration syntax after way too many years of smail-3) is
working well. It relies only on a flag set by the data acl
as a result of the scan.

The redirect router looks like the following:

spam_redirect:
driver = redirect
condition = ${if def:h_X-Spam-Flag: {1}{0}}
domains = "your domain(s) here"
check_local_user
require_files = /home/$local_part
data = /home/$local_part/Spambox
file_transport = address_file

The keys in this router are the use of check_local_user to
properly setup the user and group for the delivery thru the
file_transport and the require_files check for a home
directory (which prevents entries in /home from being created
for the system accounts like exim, admin, etc).

YMMV, but this *seems to me* to be a reasonable strategy
assuming that you don't ever want to reject email with a
false positive, and lets you set the spam score level to
a much lower value since all mail will be delivered somewhere.


Andy