On Fri, 10 Dec 2004, Anandh G wrote:
AG> 
AG> If a mail is fetched by fetchmail to mailroot,
AG> procmail forwards the mail to respective user mailbox.
AG> This works, but in one case. If a mail is received
AG> like To:ban(_dot_)sh(_at_)x(_dot_)com and 
cc:vijay(_dot_)g(_at_)x(_dot_)com, the mail is
AG> only delivered to ban mailbox and not to vijay
AG> mailbox. But if i swaped both the entries,
AG> vijay(_dot_)g(_at_)x(_dot_)com first and ban(_dot_)sh(_at_)x(_dot_)com 
second, I am
AG> getting the mail delivered to vijay and not to ban. 
AG> 
AG> How can I make procmail to look all the rules before
AG> exiting
AG> 
At one time, I had a go at this with scoring.  Any mail that fell off the 
end was for alan.
--------------------------------------
# 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
# :0 c:
# | formail -x To: -x Cc: > toccheaderfile
# clifford.ac mail
:0
* TOCCHEADER ?? @clifford\.ac
{
 # To margaret
 :0 c
 * TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]margaret(_at_)clifford\(_dot_)ac
 ! margaret
 # To test
 :0 c
 * TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]test(_at_)clifford\(_dot_)ac
 ! test
 # To proctest
 :0 c
 * TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]testtest(_at_)clifford\(_dot_)ac
 ! test
 # is it for alan or unknown?
 :0:
 # add a +1 to ensure positive rather than 0
 * 1^0 TOCCHEADER ?? @clifford\.ac
 # subtract 1 for each clifford.ac
 * -1^1 TOCCHEADER ?? @clifford\.ac
 # add one for each of the names specified above
 * 1^1 TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]margaret(_at_)clifford\(_dot_)ac
 * 1^1 TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]test(_at_)clifford\(_dot_)ac
 * 1^1 TOCCHEADER ?? [^-a-zA-Z0-9_(_dot_)]testtest(_at_)clifford\(_dot_)ac
 # if positive, then not for alan or unknown
 IN.notforalan
}
--------------------------------------
-- 
Alan
( Please do not email me AS WELL as replying to the list.  Please 
  address personal email to alan+1@ as lists@ is not read. A
  password autoresponder may be invoked if this email is very old. )
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail