Procmail issue

Michael Schwendt mschwendt at gmail.com
Thu Jan 24 10:14:50 UTC 2013


On Wed, 23 Jan 2013 16:28:07 -0700, Ashley M. Kirchner wrote:

> :0
> * !^X-Forwarded-For: kirash4 at gmail.com mytest at pcigrafx.com<ashley at pcigrafx.com>
> * !^X-Forwarded-For: kirash4 at gmail.com mytest at pcraft.com <ashley at pcraft.com>
> * !^From.*kirash4 at gmail.com
> * !^To.*mytest at papillon.pcraft.com <ashley at papillon.pcraft.com>
> ! kirash4 at gmail.com <ashley at gmail.com>
> 
> :0c
> * ^X-Forwarded-For: kirash4 at gmail.com mytest at pcigrafx.com<ashley at pcigrafx.com>
> * ^X-Forwarded-For: kirash4 at gmail.com mytest at pcraft.com <ashley at pcraft.com>
> ! salesdept at 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 at gmail.com
> mytest at pcigrafx.com"
> procmail: Match on ! "^X-Forwarded-For: kirash4 at gmail.com mytest at pcraft.com"
> procmail: Match on ! "^From.*kirash4 at gmail.com"
> procmail: Match on ! "^To.*mytest at papillon.pcraft.com"
> procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi kirash4 at gmail.com"
> procmail: Executing "/usr/sbin/sendmail,-oi,kirash4 at gmail.com"
> procmail: Notified comsat: "mytest@:/usr/sbin/sendmail -oi kirash4 at gmail.com
> "
> From USER at DOMAIN.com  Wed Jan 23 16:02:10 2013
>  Subject: This is a test message
>   Folder: /usr/sbin/sendmail -oi kirash4 at 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 at gmail.com
> mytest at pcigrafx.com"
> procmail: No match on ! "^X-Forwarded-For: kirash4 at gmail.com
> mytest at pcraft.com"

Those two above are for the first recipe.

> procmail: No match on "^X-Forwarded-For: kirash4 at gmail.com
> mytest at 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 at gmail.com mytest at pcigrafx.com"

2nd recipe:
 No match on "^X-Forwarded-For: kirash4 at gmail.com mytest at 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.

-- 
Fedora release 19 (Rawhide) - Linux 3.8.0-0.rc4.git1.1.fc19.x86_64
loadavg: 0.00 0.06 0.12


More information about the users mailing list