[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .qmail files
- To: qmail@xxxxxxxxxxxxx
- Subject: Re: .qmail files
- From: Ajai Khattri <ajai@xxxxxxxxxxx>
- Date: Fri, 04 Mar 2005 12:33:37 -0500 (EST)
- Delivered-to: de5-qmail@sws5.ornl.gov
- Delivered-to: mailing list qmail@list.cr.yp.to
- In-reply-to: <4228787E.3070706@oranged.to>
- Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
On Fri, 4 Mar 2005, Jimmy Stewpot wrote:
> I am looking to write a script that will delete emails that have more
> than 20 points from spamassassin. If I did that how do you pipe the file
> back out of the other side or is there a more simple way?
We use maildrop to do this, so the .qmail file calls maildrop like this:
|preline /usr/local/bin/maildrop -w 90 /home/vpopmail/etc/mailfilter
And the maildrop filter file above contains something like this:
$VDIR=`pwd`
# Call spamc if message is not too big:
if ( $SIZE < 196608 )
{
xfilter "/usr/local/bin/spamc -f -t 30 -d spamd.local -u $USERNAME@$USERHOST"
}
# File spam into Spam folder:
if (/^X-Spam-Flag: *YES/)
{
to "$VDIR/Maildir/.Spam"
}
This assumes you already have a Spam folder - the full mailfilter file has
some more code to check for the existance of a Spam folder (which Ive
stripped out above) and create one if need be. We are running daemonized
spamassassin across several servers so spamd.local is a "local" domain
with DNS setup to do return answers that are weighted towards to dedicated
spamd boxes.
--
Aj. (ajai@xxxxxxxxxxx)
Systems Administrator / Developer