You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by alexus <al...@gmail.com> on 2009/04/09 04:16:34 UTC
SA + maildrop
I have maildrop installed on my system and I was thinking to enable a
global rule among of all my maildrop users
where all emails that have score 5.0 and higher would move into junk
e-mail folder, and rest should go to INBOX as it was in the past
can someone help me out with this?
--
http://alexus.org/
Re: SA + maildrop
Posted by Bill Landry <bi...@inetmsg.com>.
alexus wrote:
> I have maildrop installed on my system and I was thinking to enable a
> global rule among of all my maildrop users
>
> where all emails that have score 5.0 and higher would move into junk
> e-mail folder, and rest should go to INBOX as it was in the past
>
> can someone help me out with this?
Depending on how your MTA is configured, you could use something like
this in your maildroprc file:
USER="$1"
DOMAIN="$2"
VMAIL="/var/spool/vmail"
VDOMAIN="$VMAIL/$DOMAIN"
DEFAULT="$VDOMAIN/$USER"
# Deliver Spam to spam folder (create spam folder or maildir if it does
not exist)
if ( /^X-Spam-Flag: YES/:hD )
{
exception {
to $DEFAULT/.Spam/
}
exception {
`test -d $DEFAULT`
if ( $RETURNCODE == 0 )
{
`$MAILDIRMAKE -f Spam $DEFAULT`
`echo "Spam" >> $DEFAULT/subscriptions`
to $DEFAULT/.Spam/
}
else
{
`$MAILDIRMAKE $DEFAULT`
`$MAILDIRMAKE -f Spam $DEFAULT`
`echo "Spam" >> $DEFAULT/subscriptions`
to $DEFAULT/.Spam/
}
}
}
Watch for wrapping. You will also need to adjust the folder paths to
meet your own needs.
Bill