Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

From field with comma rewritten

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


cgregoir99 at yahoo

May 15, 2008, 1:39 AM

Post #1 of 6 (670 views)
Permalink
From field with comma rewritten

Hello,

When a message with a 'From:' header line contains a comma, like :
From: my, test <my [at] addr>
Sendmail rewrites it, prepending @domain_ name before the comma :
From: my [at] domain name, test <my [at] addr>

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.

Thanks in advance.

Christian




--
## 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/


temmokan at gmail

May 15, 2008, 2:07 AM

Post #2 of 6 (651 views)
Permalink
Re: From field with comma rewritten [In reply to]

Hello,

2008/5/15 Christian Gregoire <cgregoir99 [at] yahoo>:
> When a message with a 'From:' header line contains a comma, like :
> From: my, test <my [at] addr>
> Sendmail rewrites it, prepending @domain_ name before the comma :
> From: my [at] domain name, test <my [at] addr>
>
> 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.
>
> Thanks in advance.

If I am not mistaken, From/To/Cc address fields syntax states that
comma is a separator if not placed within quoted string (when multiple
addresses are present in the header field).

Thus, the MTA assumes there are two entries, "my" and "test
<my [at] addr>" and appends the default domain name to the first entry.

All the best,

Konstantin

--
## 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/


exim-users at spodhuis

May 15, 2008, 2:16 AM

Post #3 of 6 (652 views)
Permalink
Re: From field with comma rewritten [In reply to]

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 [at] addr>
> Sendmail rewrites it, prepending @domain_ name before the comma :
> From: my [at] domain name, test <my [at] addr>

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 [at] example>

-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/


dot at dotat

May 15, 2008, 4:32 AM

Post #4 of 6 (651 views)
Permalink
Re: From field with comma rewritten [In reply to]

On Thu, 15 May 2008, Phil Pennock wrote:
> 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 [at] addr>
> > Sendmail rewrites it, prepending @domain_ name before the comma :
> > From: my [at] domain name, test <my [at] addr>
>
> 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 -bnq command line option should do the trick.

However I agree that the thing to do is to fix the program that generated
the message so that it doesn't create messages with syntax errors.

Tony.
--
<fanf [at] exim> <dot [at] dotat> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}

--
## 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/


cgregoir99 at yahoo

May 18, 2008, 6:49 AM

Post #5 of 6 (586 views)
Permalink
Re: From field with comma rewritten [In reply to]

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 [at] spodhuis>
To: Christian Gregoire <cgregoir99 [at] yahoo>
Cc: exim-users [at] exim
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 [at] addr>
> Sendmail rewrites it, prepending @domain_ name before the comma :
>    From: my [at] domain name, test <my [at] addr>

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 [at] example>

-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/





--
## 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/


exim-users at spodhuis

May 18, 2008, 7:50 PM

Post #6 of 6 (595 views)
Permalink
Re: From field with comma rewritten [In reply to]

On 2008-05-18 at 06:49 -0700, Christian Gregoire wrote:
> 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 !

Exim only does these header fix-ups for hosts matching
sender_unqualified_hosts (or for locally submitted mails).

The default config doesn't set sender_unqualified_hosts; it's fairly
common to only set it to include hosts that you relay for (provide a
smarthost service for).

-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/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.