On Mon, 22 Jul 2002, electronicexpansion ____ wrote:
e>
e> The problem is this:
e>
e> When we send email to more than one person on the same domain (say
e> a(_at_)foobar(_dot_)com, b(_at_)foobar(_dot_)com, c(_at_)foobar(_dot_)com),
procmail only matches the first
e> ocurrence of the name (for example a(_at_)foobar(_dot_)com), and, instead of
sending
e> the email to b and c also, the email is repeated 2 times to a.
e>
e> The result is that b and c never got the email, and a has 3 emails with the
e> same information.
e>
e> Is there any way to solve this ???
e>
Recommended answer: don't even try.
A kludge answer I once tried, using the procmailrc for user alan
<-------- cut here ------------>
# all mail, excepting previously handled - temporary for safety
:0 c:
IN.allacmail
# get the to and cc headers
# this appears to put a blank before the start
:0 w
TOCCHEADER=| formail -x To: -x Cc:
# save to and cc headers to a files
# just to see what I've got
:0 c:
| formail -x To: -x Cc: > toccheaderfile
# example.ac mail
:0
* TOCCHEADER ?? @example\.ac
{
# To margaret
:0 c
* TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]margaret(_at_)example\(_dot_)ac
! margaret
# To test
:0 c
* TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]test(_at_)example\(_dot_)ac
! test
# To proctest
:0 c
* TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]testtest(_at_)example\(_dot_)ac
! test
# is it for alan or unknown?
:0:
# add a +1 to ensure positive rather than 0
* 1^0 TOCCHEADER ?? @example\.ac
# subtract 1 for each example.ac
* -1^1 TOCCHEADER ?? @example\.ac
# add one for each of the names specified above
* 1^1 TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]margaret(_at_)example\(_dot_)ac
* 1^1 TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]test(_at_)example\(_dot_)ac
* 1^1 TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]testtest(_at_)example\(_dot_)ac
# if positive, then not for alan or unknown
IN.notforalan
}
# drop off end and deliver to alan if not delivered to IN.notforalan
<-------- cut here ------------>
As you see from the above, I had to allow for things like test@ and
testtest@ as addresses so you need to be careful.
You may want to put a message id cache at the start to dump multiple
copies of the same email if you are getting multiple copies.
You'll miss any bcc's.
Alan
( Please do not email me AS WELL as replying to the list. Personal
email may invoke a password autoresponder. )
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail