Re: [exim] header validation

Top Page
Delete this message
Reply to this message
Author: Mike Brudenell
Date:  
To: sergey
CC: exim-users
Subject: Re: [exim] header validation
Hi, Sergey -

As far as I remember, the standard Exim installation doesn't do any
checking of the "From:" headers. Instead it deals with the MAIL FROM and
RCPT TO addresses in the SMTP envelope.

So anything on your setup that's checking "From:" headers must have been
added by yourself? If so then presumably there might be an error in those
checks, not in Exim itself. Perhaps you could look out the lines in your
Exim configuration file that implement such checks and share them here;
someone might then be able to spot a mistake in them.

*However…*

The "From:" line you give as an example is

From: hdv@gmail <hdv.jadev@???>


and appears not to be valid under RFC 5322. That specification says a
"From:" line is defined as

from            =   "From:" mailbox-list CRLF



where

mailbox-list    =   (mailbox *("," mailbox)) / obs-mbox-list


mailbox         =   name-addr / addr-spec


name-addr       =   [display-name] angle-addr


display-name    =   phrase


phrase          =   1*word / obs-phrase


word            =   atom / quoted-string


atom            =   [CFWS] 1*atext [CFWS]


atext           =   ALPHA / DIGIT /    ; Printable US-ASCII
                       "!" / "#" /        ;  characters not including
                       "$" / "%" /        ;  specials.  Used for atoms.
                       "&" / "'" /
                       "*" / "+" /
                       "-" / "/" /
                       "=" / "?" /
                       "^" / "_" /
                       "`" / "{" /
                       "|" / "}" /
                       "~"



In your sample the *display-name* field is hdv@gmail and includes an "@",
but this is not a character listed as being valid for *atext*. Therefore
the entire *display-name* string has to be enclosed within quotes.

So actually there might not be a mistake in your validation rule at all! If
I'm right about the "From:" header not being valid (can some confirm this?)
then your rule is doing its job and rejecting it! 😊

Cheers,
Mike B-)

On 17 November 2015 at 18:39, sergey <sergey@???> wrote:

> Hello
>
> I've started to receive bounce notices from libreoffice mailing lists
> Log record
> ===
> 2015-11-17 18:42:19 1ZykGp-0003Le-Bx H=bilbo2.documentfoundation.org
> [2a01:4f8:190:3144::2].
> X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 F=<users+bounces-47461-sergey=
> fidoman.ru@???>.
> rejected after DATA: malformed address: <hdv.jadev@???>\n may not
> follow hdv@gmail :.
> failing address in "From:" header is: hdv@gmail <hdv.jadev@???>
> ===
>
> Exim4 refuses mail when valid address is given in header but sender name
> is spelled as e-mail (contains '@')
> If e-mail is given inside '<>', should then field where sender name must
> reside to check if it contains '@' or not?
>
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/





--
Systems Administrator & Change Manager
IT Services, University of York, Heslington, York YO10 5DD, UK
Tel: +44-(0)1904-323811

Web: www.york.ac.uk/it-services
Disclaimer: www.york.ac.uk/docs/disclaimer/email.htm