procmail
[Top] [All Lists]

Re: Individual User Block Lists

2000-09-28 22:44:56
I want to modify my mail server (RedHat 6.2) so that any incoming mail for
users on my system will be checked against a list of blocked addresses for
that user.  What is the easiest way to go about this?  Should I setup a
server-wide procmail recipe that will refer to a file of blocked addresses
within the users home directory?

Something like:

# Blacklist lookup
# (Recipe is executed if exit code is 0)
# (Solaris 2.7 grep does not have "-f patternfile")
BLACKLIST=somefile
:0
* ! BOUNCE_NOUSER_EXITCODE ?? 1
* $ ? test -f $BLACKLIST \
        && (formail -zxFrom: -zxReply-To: -zx"From " | egrep -i -f $BLACKLIST)
{ BOUNCE_NOUSER_EXITCODE=1 }

taylor to your needs. It is not totally reliable as the sender can't be
determined reliably (as usual).

Whether you  have a system-wide file or on a per-user basis depends
on what you want to allow your users to do. You could use a per-user
.procmailrc file instead, from /etc/skel for example, then it gets
installed whenever you create a new account.

Volker

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>