I've come up with this so far:
/Received:\s.+\.ac\.jp/h & /popmail.dircon.co.uk/t
Firstly, will this stop matching at the end of each "Received:..." line,
or start there and carry on searching 'til the end of the header?
To check whether the To: address includes my email address, I want to
check the To: line, but according to the helpfile, the t modifier will
"search the 'Forward Path' as taken from SMTP envelope RCPT TO:, or
equivalent information taken from the header."
In the example below, will the t modifier search the uppermost Received
line and find "ste...@popmail.dircon.co.uk" as the forward path, or
search the To: line and find "lon...@myrealbox.com"?
Received: from popmail.dircon.co.uk by hirschorn.demon.co.uk with POP3
id <380.s...@popmail.dircon.co.uk> for
<ste...@popmail.dircon.co.uk>
; Mon, 3 Jan 2000 19:41:06 +0000
Return-Path: <lon...@myrealbox.com>
Received: from sfwns001.spc.ritsumei.ac.jp (IDENT:ro...@sfwns001.spc.rits
umei.ac.jp [210.160.7.146])
by popmail.dircon.co.uk with ESMTP id IAA16786;
Mon, 3 Jan 2000 08:30:01 GMT
From: lon...@myrealbox.com
Received: from 210.164.231.212 by sfwns001.spc.ritsumei.ac.jp
(8.9.3/3.5Wpl5-spc) id RAA19008; Mon, 3 Jan 2000 17:28:32 +0900
Message-ID: <00007b64175c$00005c4e$0000...@210.164.231.210>
To: <lon...@myrealbox.com>
Subject: Complimentary Gifts
Date: Sun, 02 Jan 2000 15:24:58 -0600
X-Priority: 3
X-MSMail-Priority: Normal
Reply-To: tam...@myrealbox.com
Thanks for any help! The fact that there are two different rejection
pages with several helpfile pages that aren't clear whether they apply
to envelope rejection or mail rejection, and what happens in the case of
SMTP or POP3 collection is confusing me.
--
Steven Hirschorn - steven at hirschorn dot demon dot co dot uk
It will stop matching at the end of every Received: line; Turnpike's
rules act upon one header line only (or more precisely, it will stop
matching at the end of every line containing Received -- you might like
to anchor your regexp by starting with /^Received: )
>To check whether the To: address includes my email address, I want to
>check the To: line, but according to the helpfile, the t modifier will
>"search the 'Forward Path' as taken from SMTP envelope RCPT TO:, or
>equivalent information taken from the header."
>
>In the example below, will the t modifier search the uppermost Received
>line and find "ste...@popmail.dircon.co.uk" as the forward path, or
>search the To: line and find "lon...@myrealbox.com"?
I think it will find 'ste...@popmail.dircon.co.uk', as otherwise I
don't think Turnpike can really be said to "download the header and
create a simulated envelope" as the helpfile says it does.
But I might be wrong...
>Received: from popmail.dircon.co.uk by hirschorn.demon.co.uk with POP3
> id <380.s...@popmail.dircon.co.uk> for
><ste...@popmail.dircon.co.uk>
> ; Mon, 3 Jan 2000 19:41:06 +0000
[snip]
>To: <lon...@myrealbox.com>
[snip]
>Thanks for any help! The fact that there are two different rejection
>pages with several helpfile pages that aren't clear whether they apply
>to envelope rejection or mail rejection, and what happens in the case of
>SMTP or POP3 collection is confusing me.
SMTP collection is easy: the /t modifier looks at the SMTP 'RCPT TO'
header. (This is an RFC 821 header involved in the mail transfer
procedure, and does not necessarily (*) appear in the message at all)
POP3 collection is more difficult: POP3 does not have an envelope at
all, so Turnpike has to make one up; quite how it does this is (I
believe) not documented. What happens to rules in the case of POP3 mail
collection is explained pretty well in the Help topic 'Email Routeing -
Envelope Rejection'
HTH,
Phil
(*) Of course, in many cases, the RCPT TO: and RFC 822 To: header are
the same, and also I believe it is possible to configure Exim to put the
RCPT TO header into the RFC 822 headers, but this is all a bit off topic
for d.i.s.t :-)
--
Philip Kendall (pa...@cam.ac.uk pa...@kendalls.demon.co.uk)