On Wed, 23 Jan 2013 16:28:07 -0700, Ashley M. Kirchner wrote:
:0
- !^X-Forwarded-For: kirash4@gmail.com mytest@pcigrafx.comashley@pcigrafx.com
- !^X-Forwarded-For: kirash4@gmail.com mytest@pcraft.com ashley@pcraft.com
- !^From.*kirash4@gmail.com
- !^To.*mytest@papillon.pcraft.com ashley@papillon.pcraft.com
! kirash4@gmail.com ashley@gmail.com
:0c
- ^X-Forwarded-For: kirash4@gmail.com mytest@pcigrafx.comashley@pcigrafx.com
- ^X-Forwarded-For: kirash4@gmail.com mytest@pcraft.com ashley@pcraft.com
! salesdept@pcraft.com
Generates this in the log file when it first shows up and gets forwarded to GMail:
procmail: [7884] Wed Jan 23 16:02:10 2013 procmail: Match on ! "^X-Forwarded-For: kirash4@gmail.com mytest@pcigrafx.com" procmail: Match on ! "^X-Forwarded-For: kirash4@gmail.com mytest@pcraft.com" procmail: Match on ! "^From.*kirash4@gmail.com" procmail: Match on ! "^To.*mytest@papillon.pcraft.com" procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi kirash4@gmail.com" procmail: Executing "/usr/sbin/sendmail,-oi,kirash4@gmail.com" procmail: Notified comsat: "mytest@:/usr/sbin/sendmail -oi kirash4@gmail.com " From USER@DOMAIN.com Wed Jan 23 16:02:10 2013 Subject: This is a test message Folder: /usr/sbin/sendmail -oi kirash4@gmail.com 3139
And when it comes back from GMail:
procmail: [7892] Wed Jan 23 16:02:18 2013 procmail: Match on ! "^X-Forwarded-For: kirash4@gmail.com mytest@pcigrafx.com" procmail: No match on ! "^X-Forwarded-For: kirash4@gmail.com mytest@pcraft.com"
Those two above are for the first recipe.
procmail: No match on "^X-Forwarded-For: kirash4@gmail.com mytest@pcigrafx.com"
This is for the second recipe. So far so good. But please pay attention to what it matched! Compare the first two lines of the log for each of the recipes:
1st recipe: Match on ! "^X-Forwarded-For: kirash4@gmail.com mytest@pcigrafx.com"
2nd recipe: No match on "^X-Forwarded-For: kirash4@gmail.com mytest@pcigrafx.com"
"Match on ! …" is equivalent to "No match on …", so your returning email did NOT contain the wanted X-Forwarded-For line in the header. Can you look up such a forwarded message and show its headers? Does the message really contain such a header? The recipe looks strange, because it refers to a line with multiple email address, for example.