I'm starting to play around with localmailfilter some and I've managed to get rcptfilter working. /etc/courier/maildropfilter contains:

/usr/lib/courier/bin/maildrop

I have a simple rcptfilter like this:

import SENDER
if (lookup($SENDER, 'badfrom.dat'))
{
 echo "$SENDER, your email is not wanted here"
 EXITCODE=1
 exit
}

EXITCODE=99
exit

so with this, users can add patterns to $HOME/badfrom.dat and successfully blacklist them during the SMTP session. I'd also like to be able to do some basic content checking of messages before accepting them so for smtpfilter I have:

/^Subject: *!.*/:h
if (lookup($MATCH2, 'badsubj.dat'))
{
 echo "That was not a nice thing to say"
 EXITCODE=100
 exit
}

EXITCODE=0
exit

However this doesn't seem to work, $MATCH2 doesn't seem to get set at all. Does pattern matching of headers work differently with localfilters than it does at local delivery time? What am I missing here?

Jay

--
Jay Lee
Network / Systems Administrator
Information Technology Dept.
Philadelphia Biblical University
--



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to