Re: [exim] header_sender test and group addresses

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Kjetil Torgrim Homme
CC: exim-users
Tárgy: Re: [exim] header_sender test and group addresses
On Thu, 28 Sep 2006, Kjetil Torgrim Homme wrote:

> I thought I'd turn on the header_sender test, so I've been running it in
> logging mode for a while. today I noticed these headers would be
> rejected:
>
> From: "TICKET INTERNETT          (AGENTID01138828)" <emailserver@???>
> Reply-To: "Please do not respond":;

>
> I want to be 100% sure before rejecting e-mail from Amadeus :-), and
> according to my reading of RFC 2822, a group address is perfectly valid
> in Reply-To:
>
> reply-to        =       "Reply-To:" address-list CRLF
> address-list    =       (address *("," address)) / obs-addr-list
> address         =       mailbox / group
> group           =       display-name ":" [mailbox-list / CFWS] ";"
>                         [CFWS]

>
> this occured with Exim 4.43, but I don't think this behaviour has been
> changed in newer versions. looks like only a small patch is needed to
> do this right, since there is a nice Boolean parse_allow_group already.


The "small patch" wasn't quite as small as it might have been, because
when I looked at this I found a (small :-) can of worms for some places
in the code that allow group syntax when scanning headers. (You have to
set parse_allow_group before scanning a header by calling
parse_extract_address() multiple times, and then unset parse_allow_group
afterwards, as otherwise it might mess up something later. This is so
that it can keep a group "state" within the whole header line - for
example, to forbid groups within groups.)

Anyway, I think I have sorted this out. I have committed the code, so it
should be in tonight's snapshot.

Philip

--
Philip Hazel, University of Cambridge Computing Service.