procmail
[Top] [All Lists]

a good feeling when...

1999-10-01 11:55:43
You figure out how to fix something....

I had a mail forwarding break when the forwarding provider
for the domain in question changed software.

All email to domain.com was forwarding to one email account
forwarder(_at_)newdomain(_dot_)com, and I was forwarding from
anyuser(_at_)domain(_dot_)com to anyuser(_at_)newdomain(_dot_)com (so 
seth(_at_)domain
would forward to seth(_at_)newdomain, etc...)

previously they sent email with a header:
Delivered-To: redirect-anyuser(_at_)domain(_dot_)com

I had a working procmailrc:

:0
* ^Delivered-To:[       ]+redirect-\/[^(_at_)]+
! $MATCH(_at_)newdomain(_dot_)com

thanks to this list some time back....

then due to a software change, the new mail became arriving
looking like this:

Delivered-To: domain(_dot_)com%postmaster(_at_)domain(_dot_)com
Received: (cpmta 15146 invoked from network); 29 Sep 1999 12:09:08 -0700
Delivered-To: domain(_dot_)com%anyuser(_at_)domain(_dot_)com

changing the exact match didn't work, due to multiple lines, and
that darn postmaster line.... so I needed something different now.

Reading the Faq and Examples from someplace online, I found
a scoring example that picked just the last line with a match...
tweaked it to fit, and voila....

:0
* $ 1^1 ^Delivered-To: domain.com.\/[^(_at_)]+
! $MATCH(_at_)newdomain(_dot_)com

Working again....

Thanks to procmail....
thanks to this list and all of the people who've written
examples and put them online...

Seth






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