Discussion:
Differences in "Delivered-To" header between deliver and LMTP
Jeff Rice
2014-07-09 18:20:03 UTC
Permalink
Hi,
I'm transitioning my server over from using the deliver LDA and LMTP.
Suddenly a bunch of sieve filters stopped working, and I noticed the
contents of the Delivered-To header are different.

Using Dovecot's deliver LDA, the contents are a bare email address
(foo at bar.com). Using Dovecot LMTP, they are in brackets
(<foo at bar.com>). Is there a reason why this isn't consistent between
the two delivery agents? It seems like it ought to be.

Jeff
Reindl Harald
2014-07-09 18:42:03 UTC
Permalink
I'm transitioning my server over from using the deliver LDA and LMTP. Suddenly a bunch of sieve filters stopped
working, and I noticed the contents of the Delivered-To header are different.
Using Dovecot's deliver LDA, the contents are a bare email address (foo at bar.com). Using Dovecot LMTP, they are in
brackets (<foo at bar.com>). Is there a reason why this isn't consistent between the two delivery agents? It seems
like it ought to be
LMTP is practically SMTP

http://www.faqs.org/rfcs/rfc2822.html

A mailbox receives mail. It is a conceptual entity which does not
necessarily pertain to file storage. For example, some sites may
choose to print mail on a printer and deliver the output to the
addressee's desk. Normally, a mailbox is comprised of two parts: (1)
an optional display name that indicates the name of the recipient
(which could be a person or a system) that could be displayed to the
user of a mail application, and (2) an addr-spec address enclosed in
angle brackets ("<" and ">"). There is also an alternate simple form
of a mailbox where the addr-spec address appears alone, without the
recipient's name or the angle brackets. The Internet addr-spec
address is described in section 3.4.1.

Note: Some legacy implementations used the simple form where the
addr-spec appears without the angle brackets, but included the name
of the recipient in parentheses as a comment following the addr-spec.
Since the meaning of the information in a comment is unspecified,
implementations SHOULD use the full name-addr form of the mailbox,
instead of the legacy form, to specify the display name associated
with a mailbox. Also, because some legacy implementations interpret
the comment, comments generally SHOULD NOT be used in address fields
to avoid confusing such implementations.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20140709/97e2da13/attachment.sig>
Timo Sirainen
2014-07-10 15:29:15 UTC
Permalink
I'm transitioning my server over from using the deliver LDA and LMTP. Suddenly a bunch of sieve filters stopped working, and I noticed the contents of the Delivered-To header are different.
Using Dovecot's deliver LDA, the contents are a bare email address (foo at bar.com). Using Dovecot LMTP, they are in brackets (<foo at bar.com>). Is there a reason why this isn't consistent between the two delivery agents? It seems like it ought to be.
Oh, that's annoying. Dovecot LDA doesn't actually add this header, it was your MTA that added it. But looks like I hadn't checked what the MTAs actually write to the header when I added this feature to LMTP, and nobody had mentioned this before either. I wonder if anybody's system breaks if I just change it now..
Jeff Rice
2014-07-10 15:54:10 UTC
Permalink
I don't know if there is a convention for whether the brackets should be
included or not. But consistency is a virtue. The MTA in question is
Postfix 2.9.6. I assumed it was the Dovecot LDA adding the Delivered-To
header because it was rewritten when I did a redirect in sieve, but
redirect must put the message back into Postfix's queue where the header
gets added (or replaced, in this case).

Maybe other folks can chime in if they see emails in brackets (<>) or
not for this type of header for other MTAs and we can get a sense of
which is more common.

Jeff
Timo Sirainen <mailto:tss at iki.fi>
July 10, 2014 at 11:29 AM
Oh, that's annoying. Dovecot LDA doesn't actually add this header, it
was your MTA that added it. But looks like I hadn't checked what the
MTAs actually write to the header when I added this feature to LMTP,
and nobody had mentioned this before either. I wonder if anybody's
system breaks if I just change it now..
Jeff Rice <mailto:jeff at jrice.me>
July 9, 2014 at 2:20 PM
Hi,
I'm transitioning my server over from using the deliver LDA and LMTP.
Suddenly a bunch of sieve filters stopped working, and I noticed the
contents of the Delivered-To header are different.
Using Dovecot's deliver LDA, the contents are a bare email address
(foo at bar.com). Using Dovecot LMTP, they are in brackets
(<foo at bar.com>). Is there a reason why this isn't consistent between
the two delivery agents? It seems like it ought to be.
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compose-unknown-contact.jpg
Type: image/jpeg
Size: 770 bytes
Desc: not available
URL: <Loading Image...>
Larry Rosenman
2014-07-10 17:26:10 UTC
Permalink
There is no Delivered-To: in Exim, there is an "Envelope-To:" which is
added withOUT the
the angle-brackets(<>)

Return-path: <bo-b685yaba89pstxauy6speqcc659syz at b.emails.containerstore.com>
Envelope-to: parents at lerctr.org
Delivery-date: Thu, 10 Jul 2014 12:17:54 -0500

Does that help?
Post by Jeff Rice
I don't know if there is a convention for whether the brackets should be
included or not. But consistency is a virtue. The MTA in question is
Postfix 2.9.6. I assumed it was the Dovecot LDA adding the Delivered-To
header because it was rewritten when I did a redirect in sieve, but
redirect must put the message back into Postfix's queue where the header
gets added (or replaced, in this case).
Maybe other folks can chime in if they see emails in brackets (<>) or not
for this type of header for other MTAs and we can get a sense of which is
more common.
Jeff
Timo Sirainen <mailto:tss at iki.fi>
July 10, 2014 at 11:29 AM
Oh, that's annoying. Dovecot LDA doesn't actually add this header, it was
your MTA that added it. But looks like I hadn't checked what the MTAs
actually write to the header when I added this feature to LMTP, and nobody
had mentioned this before either. I wonder if anybody's system breaks if I
just change it now..
Jeff Rice <mailto:jeff at jrice.me>
July 9, 2014 at 2:20 PM
Hi,
I'm transitioning my server over from using the deliver LDA and LMTP.
Suddenly a bunch of sieve filters stopped working, and I noticed the
contents of the Delivered-To header are different.
Using Dovecot's deliver LDA, the contents are a bare email address (
foo at bar.com). Using Dovecot LMTP, they are in brackets (<foo at bar.com>).
Is there a reason why this isn't consistent between the two delivery
agents? It seems like it ought to be.
Jeff
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 (c) E-Mail: larryrtx at gmail.com
US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
Charles Marcus
2014-07-11 09:23:43 UTC
Permalink
Post by Timo Sirainen
I'm transitioning my server over from using the deliver LDA and LMTP. Suddenly a bunch of sieve filters stopped working, and I noticed the contents of the Delivered-To header are different.
Using Dovecot's deliver LDA, the contents are a bare email address (foo at bar.com). Using Dovecot LMTP, they are in brackets (<foo at bar.com>). Is there a reason why this isn't consistent between the two delivery agents? It seems like it ought to be.
Oh, that's annoying. Dovecot LDA doesn't actually add this header, it was your MTA that added it. But looks like I hadn't checked what the MTAs actually write to the header when I added this feature to LMTP, and nobody had mentioned this before either. I wonder if anybody's system breaks if I just change it now..
If you do this Timo, would you please also consider going ahead and
adding the 20 or so lines of code you said it would take to also add
support for the x-original-to header (this specific was in a private
email to me while our support contract was active), as we discussed on
this list - and you then discussed with Wietse, back in April or so of 2012:

http://dovecot.org/list/dovecot/2012-April/082585.html

Thanks!

Charles
Tobias Franzén
2014-07-16 18:41:04 UTC
Permalink
Post by Charles Marcus
Post by Timo Sirainen
Post by Jeff Rice
I'm transitioning my server over from using the deliver LDA and
LMTP. Suddenly a bunch of sieve filters stopped working, and I
noticed the contents of the Delivered-To header are different.
Using Dovecot's deliver LDA, the contents are a bare email address
(foo at bar.com). Using Dovecot LMTP, they are in brackets
(<foo at bar.com>). Is there a reason why this isn't consistent
between the two delivery agents? It seems like it ought to be.
Oh, that's annoying. Dovecot LDA doesn't actually add this header, it
was your MTA that added it. But looks like I hadn't checked what the
MTAs actually write to the header when I added this feature to LMTP,
and nobody had mentioned this before either. I wonder if anybody's
system breaks if I just change it now..
If you do this Timo, would you please also consider going ahead and
adding the 20 or so lines of code you said it would take to also add
support for the x-original-to header (this specific was in a private
email to me while our support contract was active), as we discussed on
http://dovecot.org/list/dovecot/2012-April/082585.html
Thanks!
Charles
I am also very interested in the outcome of these discussions for
X-Original-To header together with LMTP.

My setup will be migrating from an old Courier-IMAP install with Postfix
VDA and plan to keep using Postfix but this time with Dovecot and
potentially Dovecot LMTP. My users have multiple aliases and rely on the
X-Original-To header for filters, however they mostly reside within the
same domain handled by the same mail server.

Old threads in this and Postfix mail lists indicate that Timo thinks
LMTP cannot solve this.
Some of this could possibly be solved for local implementations if LMTP
can expand aliases itself for local delivery. Is this possible?
In general it seems that LMTP has to rely on previous layers to keep the
original recipient in for example X-Original-To header.

For reference:
http://archives.neohapsis.com/archives/postfix/2012-04/0179.html
http://dovecot.org/list/dovecot/2012-April/082585.html
http://www.dovecot.org/list/dovecot/2014-January/094396.html

Charles, you seem to also have been involved in the following Postfix
list thread from 2011. Are you using this Postfix workaround detailed at
the end to add X-Original-To?
https://groups.google.com/forum/#!topic/mailing.postfix.users/ceRuhB8NFWQ

Postfix/main.cf:
# to make sure Delivered-To header contains only one address
lmtp_destination_recipient_limit=1
# for X-Original-To header
smtpd_recipient_restrictions =
check_recipient_access pcre:/etc/postfix/recipient_access.pcre

/etc/postfix/recipient_access.pcre
/(.+)/ prepend X-Original-To: $1


Dovecot:
lda_original_recipient_header = X-Original-To

/Tobias
Timo Sirainen
2014-08-01 14:29:42 UTC
Permalink
This post might be inappropriate. Click to display it.
Loading...