Differences in "Delivered-To" header between deliver and LMTP
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@bar.com). Using Dovecot LMTP, they are in brackets (foo@bar.com). Is there a reason why this isn't consistent between the two delivery agents? It seems like it ought to be.
Jeff
Am 09.07.2014 20:20, schrieb 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@bar.com). Using Dovecot LMTP, they are in brackets (foo@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.
On 9.7.2014, at 21.20, Jeff Rice jeff@jrice.me wrote:
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@bar.com). Using Dovecot LMTP, they are in brackets (foo@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..
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@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@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@bar.com). Using Dovecot LMTP, they are in brackets (foo@bar.com). Is there a reason why this isn't consistent between the two delivery agents? It seems like it ought to be.
Jeff
There is no Delivered-To: in Exim, there is an "Envelope-To:" which is added withOUT the the angle-brackets(<>)
Return-path: bo-b685yaba89pstxauy6speqcc659syz@b.emails.containerstore.com Envelope-to: parents@lerctr.org Delivery-date: Thu, 10 Jul 2014 12:17:54 -0500
Does that help?
On Thu, Jul 10, 2014 at 10:54 AM, Jeff Rice jeff@jrice.me wrote:
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@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@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@bar.com). Using Dovecot LMTP, they are in brackets (foo@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@gmail.com US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
On 7/10/2014 11:29 AM, Timo Sirainen tss@iki.fi wrote:
On 9.7.2014, at 21.20, Jeff Rice jeff@jrice.me wrote:
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@bar.com). Using Dovecot LMTP, they are in brackets (foo@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
On 2014-07-11 11:23, Charles Marcus wrote:
On 7/10/2014 11:29 AM, Timo Sirainen tss@iki.fi wrote:
On 9.7.2014, at 21.20, Jeff Rice jeff@jrice.me wrote:
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@bar.com). Using Dovecot LMTP, they are in brackets (foo@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
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
On 11 Jul 2014, at 12:23, Charles Marcus CMarcus@Media-Brokers.com wrote:
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:
The problem is still that it would require Dovecot LMTP to start advertising the DSN extension, which brings it more responsibilities. I'm still a bit scared of doing such change as it would need to be thought out well and to see what its impact would be for current MTAs. I'm especially worried that different MTAs would behave differently and we might need to add a setting to control what Dovecot needs to do.
participants (6)
-
Charles Marcus
-
Jeff Rice
-
Larry Rosenman
-
Reindl Harald
-
Timo Sirainen
-
Tobias Franzén