On Friday, October 17, 1997 18:22, Omer Music
[SMTP:omerm(_at_)stuserv(_dot_)me(_dot_)metu(_dot_)edu(_dot_)tr] wrote:
Hi guys,
Im making some kind of a mailing list, and what I need to
do is have procmail accept messages only if they come from
certain addresses (addresses of the subscribers). Does anybody
know the script thats used for it??
Try the following template (3 names given in example)...
# If you're REALLY confident ;>), you can replace everything in
the braces with the one line entry...
/dev/null
REJECT=rejected.mail
:0Hi
* !^From:(_dot_)*john\(_dot_)smith(_at_)some\-isp\(_dot_)com
* !^From:(_dot_)*jane\(_dot_)doe(_at_)another_isp\(_dot_)com
* !^From:(_dot_)*joe\-blow(_at_)some\-isp\(_dot_)com
{
LOG="////////////////////////////////////////
"
:0hbi
$REJECT
}
Notes:
- conditions are AND'ed in procmail. The logic behind this
filter is that it evaluates as true (and redirects email to
$REJECT) only if all the conditions are true. I.e. none of
the names in your subscriber list shows up in the "From:" header.
- If you want to do it as one long line for your entire list...
*
!^From:.*(john\(_dot_)smith(_at_)some\-isp\(_dot_)com|jane\(_dot_)doe(_at_)another_isp\(_dot_)com|jo
e\-blow(_at_)some\-isp\(_dot_)com)
watch that the linelength doesn't exceed the size set in
your LINEBUF (default 2048 characters). You can always put
LINEBUF=8192
in your .procmailrc, but I'd hate to have to edit that list.
Walter Dnes
<waltdnes(_at_)interlog(_dot_)com>