Re: [Exim] Filter Help

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Giuliano Gavazzi
CC: Marc Perkel, exim-users
New-Topics: [Exim] Conditional System Filter
Subject: Re: [Exim] Filter Help
On Mon, 16 Dec 2002, Giuliano Gavazzi wrote:

> >From: Marc Parkel <marc@???>
> >
> >Need to extract the "Marc Perkel" part of $h_from:


> ${if match{$h_from}{^From: *(.*) *<} {$1}{}}
>
> the answer to your question?


Note that a full regular expression that tries to match all possible
forms of an RFC 2822 address (and doesn't quite do the whole job) is
over 5000 characters long. There are so many variations. Even to handle
the relatively common (used to be)

From: <marc@???> (Marc Perkel)

as well as the other form is going to be tricky. But you may be able to
handle enough simple to do what you need.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.