Re: [exim] Extract email address from From header

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Richard Clayton
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Extract email address from From header
In message <43C1354E.3010304@???>, Marc Perkel <marc@???>
writes

>OK - this can't be that hard but how do you extrace the email address
>part from the $h_From: header?


I'd recommend Perl... this is non-trivial

>Shouldn't this work? ${local_part:$h_From:}@${domain:$h_From:}
>
>What am I missing?


you appear to be assuming that there can be no "@" in the local part and
that there are no comments :-( [and doubtless more nits as well]

RFC(2)822 parsers are far from simple... hence my recommendation of
finding an existing one and calling it from Perl

of course you may be happy with a bodge and some hand-waving assumptions

- -- 
richard                                                   Richard Clayton


Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety. Benjamin Franklin 11 Nov 1755