Re: [Exim] Filter Help

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Giuliano Gavazzi
CC: Marc Perkel, exim-users
新しいトピック: [Exim] Conditional System Filter
題目: 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.