1 message in net.sourceforge.lists.courier-maildrop[maildropl] filtering based on a spec...
FromSent OnAttachments
PollywogSep 29, 2005 10:23 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] filtering based on a specific received header [SOLVED]Actions...
From:Pollywog (lin@shadypond.com)
Date:Sep 29, 2005 10:23:39 am
List:net.sourceforge.lists.courier-maildrop

I was having difficulty getting Maildrop to examine the second "Received:" header, or even ALL the "Received:" headers (that would be fine too) for mail that is sent to me by my secondary MX. I could not find an easy solution to this, one that did not involve invoking an external script of some sort (PERL, PHP, etc) and I later thought I could get around this problem by having Postfix remove the first "Received:" header for mail received from my secondary MX. I am using header_checks in Postfix for this and my maildrop filter looks like this:

FILTERS=$HOME/.filters if ( /^Received:.*by.*\.mysecondarymxhost\.example\.com!.*/ && lookup( $MATCH2, "$FILTERS/dat.badrc vd" )) { to "$HOME/Maildir/.Spam/" }

(line wrapping has sort of messed that up)

and this seems to work. Too bad I could not find a simpler way to do it, but this seems to work. After Postfix removes the first "Received:" header, the second header becomes the topmost header and that is the "Received:" header that is examined by Maildrop.

8)