Stephane Parenton wrote:
> A mail server, serving several domains : domain_a.com, domain_b.com,
> domain_c.com etc...
> for the moment, domain_a and domain_b are filtered, but if everything
> runs ok, all the domains should be filtered....
> When a mail arrives, it's controled, scored, and if it's spam, it
> appears as an attachement.
> What I want is when a mail arrives, it's scored, and if it's spam,
> it's not put in the user's mailbox but on a single box that will
> receive only spam, whatever domain it's adressed to.

OK.  I know that this is possible because I'm doing it on one system
here.  <g>

> At first, i thought i could play with this :
> .procmailrc
>     MAILDIR=$HOME/mail
>     DEFAULT=$HOME/mail/Inbox
>     LOGFILE=$HOME/mail/proc.log
> 
>     # Catch SPAM
>     :0
>     * ^X-Spam-Flag: YES
>     * ^X-Spam-Level: \*\*\*\*\*\*
>     spam
>     #

OK, fairly standard .procmailrc file.  Files the spam in a per-user
spambox.  In a general ISP environment, I prefer this if possible.

>     .forward
> 
>     "|IFS=' ' && exec /usr/bin/procmail || exit 75 #username"

Required on those strange systems that don't call procmail by default
for local mail delivery.  <g>

> but it forces me to put these in each home directory... i don't want
> to spend time doing this... how can I do a general rule to do what I
> want, or is there a place where this is explained ?

Since you're using procmail, you may be able to create a global
procmailrc file (/etc/procmailrc) something like this:

        # File spam in the global spambox:
        :0:
        * ^X-Spam-Flag: YES
        /var/spool/mail/spambox

YMMV for permissions and "execute procmail as" issues, etc, etc.  On any
of the systems I admin at work, and any of my personal systems, that
would work fine because procmail is called directly by sendmail for
local mail delivery.

What I do on one system here is actually a little different.  I use
MIMEDefang (http://www.mimedefang.org) to call SpamAssassin, and then do
additional processing within MIMEDefang to determine where the message
actually ends up.

-kgd
-- 
Get your mouse off of there!  You don't know where that email has been!

Reply via email to