Re: [exim] System filter

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Peter Bowyer
Date:  
À: exim users
Sujet: Re: [exim] System filter
On 10 August 2010 15:33, Ken Tucker <Tucker@???> wrote:
> Hi
>
> Can anyone give me any pointers why I'm getting the following error, is
> this a bug in Exim?
>
> In my system filter I have a stanza of the form
>
> if "${if def:header_X-Small: {there}}" is there
> then
>        mail to $header_to:
>             from "postmaster@???"
>             subject "Small attachment "
>             text "A message from $sender_address with subject $h_subject:
> has a small attachment"
>       seen finish
> endif
>
>
> This generates the following error
>
> A message that you sent could not be delivered to one or more of its
> recipients. This is a permanent error. The following address(es) failed:
>
>  mail to Tucker@???
>    generated by system-filter
>    SMTP error from remote mail server after RCPT
> TO:<>Tucker@???>:
>    host mdomsmp02.cf.ac.uk [10.255.228.31]: 501 Syntax error, parameters
> in command "RCPT TO:<>Tucker@???>" unrecognized or missing
>
> which implies the SMTP dialogue is incorrect when Exim is supplying the
> RCPT TO: string, there are extraneous angle brackets around the address
>


The To: header probably contains more than just the email address. I
think you might want this:

${address:<string>}
The string is interpreted as an RFC 2822 address, as it might appear
in a header line, and the effective address is extracted from it. If
the string does not parse successfully, the result is empty.

Peter