Re: [exim] From field with comma rewritten

Top Page
Delete this message
Reply to this message
Author: Christian Gregoire
Date:  
To: exim-users
Subject: Re: [exim] From field with comma rewritten
Thanks for the replies.
Actually, the bad thing with this behaviour is when spam is sent to my platfom with a such written subject, my clients think the sender is my company since the @mycompany.com domain name is appended !
Christian


----- Original Message ----
From: Phil Pennock <exim-users@???>
To: Christian Gregoire <cgregoir99@???>
Cc: exim-users@???
Sent: Thursday, May 15, 2008 11:16:11 AM
Subject: Re: [exim] From field with comma rewritten

On 2008-05-15 at 01:39 -0700, Christian Gregoire wrote:
> When a message with a 'From:' header line contains a comma, like :
>    From: my, test <my@???>
> Sendmail rewrites it, prepending @domain_ name before the comma :
>    From: my@domain_ name, test <my@???>


I take it you mean "Exim", not "Sendmail"?

> If the line is encoded beforehand by the SMTP client (quoted-printable,
> base64, ...), this rule does not apply. I noticed the same behaviour with Sendmail.

> Is there an explanation to this, and a way to deactivate it ? It's not
> about the MAIL FROM command, but the From: field.


You can't deactivate it.

The From: header can contain multiple addresses, just like the To: or
Cc: headers.  The addresses are separated with a comma.  This would be
used, for instance, for emails representing the view of a group of
people, speaking together, with the Sender: header noting who actually
sent the email.

So you've supplied two email addresses; one is a full address with
display text, one is just a local-part, "my", which has to be qualified
with a domain before it's sent off the local system.

Leaving the line alone on your own system would just mean that the
receiving system changes it, assuming that it didn't reject it outright,
as for instance Exim would do if the sending host isn't in
sender_unqualified_hosts.

You'll need to work with the email standards, instead of against them,
unless you don't need to worry about ever sending email to anyone else's
systems.  So, what are the options?

Each address can contain display information which can be encoded per
RFC2047; that encoded data can have whatever you want in it, including
commas.  Any MIME-capable client will decode this and the results should
look the same; you've already noticed this and it apparently isn't
acceptable?

So, the other alternative is to use double-quotes around the display
name.  That will add visible quoting, for many email clients, but will
avoid encoding in transit. 

  From: "my, test" <my@???>

-Phil

--
## List details at http://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/