On Fri, 06 Jan 2006 13:30:59 -1000 Michael J Wise <mjwise(_at_)kapu(_dot_)net>
wrote:
On Jan 6, 2006, at 1:13 PM, Gerald V. Livingston II wrote:
An idea popped into my head on that discourse. One of you more astute
procmail gurus correct me if I'm wrong. No specifics here, it will
have to
be fleshed out by others. I probably have something backward in my
logic but this should be something to work with.
Michael J Wise <mjwise(_at_)kapu(_dot_)net> wrote
The problem you're pecking at is known in other contexts as, "Finding
the Handoff Header", and ... it takes a bit of code to do it in
Procmail.
You have to walk the chain of ALL the Received: headers, looking for
the first one that specifies a non-local IP address.
I did a reset on my brain and hopefully got it working again, at least
better than before.
I understand the problem with my idea as it relates to Received: headers
now.
EVERY incoming email will have at least one local IP Received: header so on
the FIRST match of a local IP, regardless of how you do it in a
"straightforward" manner the recipe would say "local address, local IP, all
is well" and skip checking further down the chain for a non-local IP. You
have to rip out each IP, one at a time, and see if it matches your
acceptable range. If not, that is an error and you can do something with
the message at that point.
So, Mr. Duck could use your 'recursive.rc' and a regex matching his own
local IP ranges. At the "# otherwise, if XINPUT is NOT already defined"
point he would simply use
:0E:
$DEFAULT.TRAPPED
to deliver the message with the non-matching IP to his trap folder.
Gerald
____________________________________________________________
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