dworkin <dworkin(_at_)rotary(_dot_)type2(_dot_)com> writes:
I am having a confounding problem administering a mailing list. The list
is run using smartlist and I hope to do all the admin functions using
procmail.. the problem is as follows:
...
o At that point I want to bounce them to a second acount (t2-admin)
using an alias (type2-offlist, set in /etc/aliases to point to
t2-admin) where a procmail recipe should add a line to the beginning of
the body and bounce it to the list. Since t2-admin is an authorized
poster, it should then go to the list. The recipe that I have written
is:
...
The problem is that while the recipe works well enough, in that it does
insert and remove the lines as requested, somehow smartlist is sensing
that the mail is coming from a daemon and bouncing it back to me. The
removal of lines containing "type2" and "ReSent" in the headers is because
of this, but smartlist still catches them. A close look at the smartlist
recipes and logs tells me my problem lies here:
* -100^0 ^FROM_MAILER|\
^(((Resent-)?(From|Sender)|X-Envelope-From):|>?From )\
([^>]*[^((_dot_)%(_at_)a-z0-9])?(\
LIST(SERV|proc)|NETSERV|bounce|autoanswer|echo|mirror\
)(([^).!:a-z0-9][-_a-z0-9]*)?[%@>
][^<)]*(\(.*\).*)?)?$([^>]|$)
toward the beginning of rc.submit. Per this statement in the log, the
mail is scoring -100, but I can't figure out why :-(
Well, let's look at the expansion of ^FROM_MAILER, as found on the
procmailrc(5) manpage:
(^(((Resent-)?(From|Sender)|X-Envelope-From):|>?From )\
([^>]*[^((_dot_)%(_at_)a-z0-9])?\
(Post(ma(st(er)?|n)|office)\
|(send)?Mail(er)?|daemon|mmdf|n?uucp|ops|r(esponse|oot)\
|(bbs\.)?smtp(error)?|s(erv(ices?|er)|ystem)\
|A(dmin(istrator)?|MMGR))\
(\
([^).!:a-z0-9][-_a-z0-9]*)?\
[%@> ][^<)]*\ # note: space & tab are in there
(\(.*\).*)?\
)?\
$([^>]|$))\
If you pick through that you'll find that it'll match that line:
From t2-admin Sun Mar 14 10:14:33 1999
That line shows up in the bounce log as the X-From_: header.
So, you have two choices:
1) change the name of the account to not include a word what matches
anything in that big regexp, OR
2) tweak that recipe to not match your -admin accounts.
While there are are several ways to go about the latter, I'll only
describe one because I have to stop typing and pet my cats. That
method is to add another condition that'll balance out the first for
your -admin accounts:
* 100^0 ^(((Resent-)?(From|Sender)|X-Envelope-From):|>?From )\
([^>]*[^((_dot_)%(_at_)a-z0-9])?\
t2-admin\
(\
([^).!:a-z0-9][-_a-z0-9]*)?\
[%@> ][^<)]*\
(\(.*\).*)?\
)?\
$([^>]|$)\
You may want to contract that into fewer lines -- I just left it like
that to show the derivation from the ^FROM_MAILER expansion. Note that
the first pair of brackets on the sixth line contain both a space and a
tab.
Philip Guenther