Re: [Dovecot] Issues with Plus addressing and detail part of subaddress.
On Jul 15, 2012, at 4:34 AM, Charles Marcus wrote:
On 2012-07-15 4:50 AM, Sean Kamath kamath@moltingpenguin.com wrote:
Before I dive in and upgrade everything, am I missing something simple?
dovecot -n output maybe?
Certainly (wasn't on the list of "things to put in a post" on the web site, so I missed it):
# 2.0.13: /etc/dovecot/dovecot.conf
# OS: SunOS 5.10 sun4u
base_dir = /var/run/dovecot/
hostname = mail.enoent.net
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
lda_original_recipient_header = X-Original-To
lmtp_save_to_detail_mailbox = yes
mail_location = sdbox:~/Mail:INDEX=/var/dovecot/indices/%u
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date
passdb {
driver = pam
}
plugin {
recipient_delimiter = +
sieve = ~/.dovecot.sieve
sieve_dir = ~/.sieve
}
protocols = imap sieve
ssl_cert =
Sean
On 2012-07-15 6:24 PM, Sean Kamath kamath@moltingpenguin.com wrote:
On Jul 15, 2012, at 4:34 AM, Charles Marcus wrote:
On 2012-07-15 4:50 AM, Sean Kamathkamath@moltingpenguin.com wrote:
Before I dive in and upgrade everything, am I missing something simple?
dovecot -n output maybe
Certainly (wasn't on the list of "things to put in a post" on the web site, so I missed it):
Which website?
http://dovecot.org/bugreport.html
I have suggested that Timo put a short simple list of troubleshooting suggestions (ie, asking for dovecot -n output and basic non-verbose logs (unless/until asked for verbose logs)) in the welcome message when subscribing to the list (like postfix does)... but in all honesty, most people don't read those either.
Regardless, providing configuration details and logs exhibiting the problem is one the most basic requirements when asking for help on any email support list I've ever been on...
Not sure how anyone was supposed to guess that you were using sendmail either...
And even when you replied to toms message suggesting you provide some logs, you still didn't...
We'll be happy to try to help you, but we'll need your help in order to do that...
--
Best regards,
Charles
On Jul 16, 2012, at 3:44 AM, Charles Marcus wrote:
dovecot -n output maybe
Certainly (wasn't on the list of "things to put in a post" on the web site, so I missed it):
Which website?
http://www.dovecot.org/mailinglists.html
And I missed it, it says "use dovecot -n when showing your configuration".
I was sure it wasn't a bug, it was a screwup on my part in the configuration, so I didn't read the bugreport page.
I have suggested that Timo put a short simple list of troubleshooting suggestions (ie, asking for dovecot -n output and basic non-verbose logs (unless/until asked for verbose logs)) in the welcome message when subscribing to the list (like postfix does)... but in all honesty, most people don't read those either.
Well, there could also be a "dovecot-bugreport" script. Much as I hate 'em, sometimes they work...
Regardless, providing configuration details and logs exhibiting the problem is one the most basic requirements when asking for help on any email support list I've ever been on...
I really thought it would be a simple "here's what you missed", since the logs are relatively uninformative. . .
Not sure how anyone was supposed to guess that you were using sendmail either...
And even when you replied to toms message suggesting you provide some logs, you still didn't...
We'll be happy to try to help you, but we'll need your help in order to do that...
Thank you, I recall from years ago how responsive and kind people are on this mailing list. I certainly wasn't trying to be cryptic.
Here's the complete set of everything. I wrote a little script to do this repeatedly, to make it easy to make changes and try again.
Note that in the last test, it works. Simply adding "X-Original-To: rewards+test@enoent.net" and sending the same message with "/usr/lib/sendmail -t < msg" will do what's expected.
Sean
Dovecot -n output:
Command: dovecot -n
# 2.0.13: /etc/dovecot/dovecot.conf
# OS: SunOS 5.10 sun4u
base_dir = /var/run/dovecot/
hostname = mail.enoent.net
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
lda_original_recipient_header = X-Original-To
lmtp_save_to_detail_mailbox = yes
mail_location = sdbox:~/Mail:INDEX=/var/dovecot/indices/%u
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date
passdb {
driver = pam
}
plugin {
recipient_delimiter = +
sieve = ~/.dovecot.sieve
sieve_dir = ~/.sieve
}
protocols = imap sieve
ssl_cert =
Sendmail version:
Command: echo quit | /usr/lib/sendmail -bs | head -1
220 spector.dmz.enoent.net ESMTP Sendmail 8.14.5/8.14.5/Submit; Tue, 17 Jul 2012 00:26:52 -0700 (PDT)
Sieve Script
Command: cat /home/rewards/.dovecot.sieve
require ["fileinto", "envelope", "subaddress"];
if header :contains "subject" ["test"] { fileinto "subtest"; }
if envelope :detail "to" "test" { fileinto "plustest"; stop; }
Email Message
Command: cat /tmp/email.tst
From: rewards@enoent.net To: rewards+test@enoent.net Subject: sieve test
This is a test
Syslog Ouput
Command: sed 's/< //' /tmp/syslog.diff
4555,4568d4554 Jul 17 00:26:52 spector.dmz.enoent.net sendmail[7665]: [ID 801593 mail.info] q6H7Qqld007665: from=rewards, size=89, class=0, nrcpts=1, msgid=201207170726.q6H7Qqld007665@spector.dmz.enoent.net, relay=rewards@localhost Jul 17 00:26:53 spector.dmz.enoent.net sendmail[7667]: [ID 702911 mail.info] STARTTLS=server, relay=localhost [127.0.0.1], version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256 Jul 17 00:26:53 spector.dmz.enoent.net sendmail[7665]: [ID 702911 mail.info] STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256 Jul 17 00:26:53 spector.dmz.enoent.net milter-greylist: [ID 751742 mail.info] q6H7Qq2g007667: Sender IP 127.0.0.1 and address rewards@spector.dmz.enoent.net are SPF-compliant, bypassing greylist Jul 17 00:26:53 spector.dmz.enoent.net sendmail[7667]: [ID 801593 mail.info] q6H7Qq2g007667: from=rewards@spector.dmz.enoent.net, size=341, class=0, nrcpts=1, msgid=201207170726.q6H7Qqld007665@spector.dmz.enoent.net, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] Jul 17 00:26:54 spector.dmz.enoent.net amavis[6875]: [ID 702911 mail.notice] (06875) Passed CLEAN {AcceptedInternal}, AM.PDP-SOCK/MYNETS LOCAL [127.0.0.1] [127.0.0.1] rewards@spector.dmz.enoent.net -> rewards+test@enoent.net, Queue-ID: q6H7Qq2g007667, Message-ID: 201207170726.q6H7Qqld007665@spector.dmz.enoent.net, mail_id: 6WhbMXFoQ3DP, Hits: 0.248, size: 573, 813 ms Jul 17 00:26:54 spector.dmz.enoent.net sendmail[7667]: [ID 801593 mail.info] q6H7Qq2g007667: Milter insert (0): header: X-Spam-Status: No, score=0.248 tagged_above=-9999 required=6.2\n\ttests=[ALL_TRUSTED=-1, DATE_IN_FUTURE_24_48=1.248] autolearn=no Jul 17 00:26:54 spector.dmz.enoent.net sendmail[7667]: [ID 801593 mail.info] q6H7Qq2g007667: Milter insert (0): header: X-Spam-Level: Jul 17 00:26:54 spector.dmz.enoent.net sendmail[7667]: [ID 801593 mail.info] q6H7Qq2g007667: Milter insert (0): header: X-Spam-Score: 0.248 Jul 17 00:26:54 spector.dmz.enoent.net sendmail[7667]: [ID 801593 mail.info] q6H7Qq2g007667: Milter insert (0): header: X-Spam-Flag: NO Jul 17 00:26:54 spector.dmz.enoent.net sendmail[7667]: [ID 801593 mail.info] q6H7Qq2g007667: Milter add: header: X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (mail.enoent.net [127.0.0.1]); Tue, 17 Jul 2012 00:26:54 -0700 (PDT) Jul 17 00:26:54 spector.dmz.enoent.net sendmail[7665]: [ID 801593 mail.info] q6H7Qqld007665: to=rewards+test@enoent.net, ctladdr=rewards (1002/1), delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=30089, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q6H7Qq2g007667 Message accepted for delivery) Jul 17 00:26:54 spector.dmz.enoent.net dovecot: [ID 583609 mail.info] lda(rewards): sieve: msgid=201207170726.q6H7Qqld007665@spector.dmz.enoent.net: stored mail into mailbox 'subtest' Jul 17 00:26:54 spector.dmz.enoent.net sendmail[7670]: [ID 801593 mail.info] q6H7Qq2g007667: to=rewards+test@enoent.net, ctladdr=rewards@spector.dmz.enoent.net (1002/1), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30933, relay=test, dsn=2.0.0, stat=Sent
<this next line was printed out of order> sieve-test(rewards): Info: final result: success ---------------------------------------- Running sieve-test ---------------------------------------- Command: sieve-test /home/rewards/.dovecot.sieve /tmp/email.tst ----------------------------------------
Performed actions:
- store message in folder: subtest
- store message in folder: plustest
Implicit keep:
(none)
Email Message with X-Original-To
Command: cat /tmp/email+header
X-Original-To: rewards+test@enoent.net From: rewards@enoent.net To: rewards+test@enoent.net Subject: sieve test
This is a test
Syslog Ouput
Command: sed 's/< //' /tmp/syslog.diff
4569,4583d4568 Jul 17 00:27:00 spector.dmz.enoent.net sendmail[7686]: [ID 801593 mail.info] q6H7R0eS007686: from=rewards, size=128, class=0, nrcpts=1, msgid=201207170727.q6H7R0eS007686@spector.dmz.enoent.net, relay=rewards@localhost Jul 17 00:27:00 spector.dmz.enoent.net sendmail[7687]: [ID 702911 mail.info] STARTTLS=server, relay=localhost [127.0.0.1], version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256 Jul 17 00:27:00 spector.dmz.enoent.net sendmail[7686]: [ID 702911 mail.info] STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256 Jul 17 00:27:00 spector.dmz.enoent.net milter-greylist: [ID 751742 mail.info] q6H7R02o007687: Sender IP 127.0.0.1 and address rewards@spector.dmz.enoent.net are SPF-compliant, bypassing greylist Jul 17 00:27:01 spector.dmz.enoent.net sendmail[7687]: [ID 801593 mail.info] q6H7R02o007687: from=rewards@spector.dmz.enoent.net, size=380, class=0, nrcpts=1, msgid=201207170727.q6H7R0eS007686@spector.dmz.enoent.net, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] Jul 17 00:27:01 spector.dmz.enoent.net amavis[6862]: [ID 702911 mail.notice] (06862) Passed CLEAN {AcceptedInternal}, AM.PDP-SOCK/MYNETS LOCAL [127.0.0.1] [127.0.0.1] rewards@spector.dmz.enoent.net -> rewards+test@enoent.net, Queue-ID: q6H7R02o007687, Message-ID: 201207170727.q6H7R0eS007686@spector.dmz.enoent.net, mail_id: NQO5yujz1eQp, Hits: 0.248, size: 613, 794 ms Jul 17 00:27:01 spector.dmz.enoent.net sendmail[7687]: [ID 801593 mail.info] q6H7R02o007687: Milter insert (0): header: X-Spam-Status: No, score=0.248 tagged_above=-9999 required=6.2\n\ttests=[ALL_TRUSTED=-1, DATE_IN_FUTURE_24_48=1.248] autolearn=no Jul 17 00:27:01 spector.dmz.enoent.net sendmail[7687]: [ID 801593 mail.info] q6H7R02o007687: Milter insert (0): header: X-Spam-Level: Jul 17 00:27:01 spector.dmz.enoent.net sendmail[7687]: [ID 801593 mail.info] q6H7R02o007687: Milter insert (0): header: X-Spam-Score: 0.248 Jul 17 00:27:01 spector.dmz.enoent.net sendmail[7687]: [ID 801593 mail.info] q6H7R02o007687: Milter insert (0): header: X-Spam-Flag: NO Jul 17 00:27:01 spector.dmz.enoent.net sendmail[7687]: [ID 801593 mail.info] q6H7R02o007687: Milter add: header: X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (mail.enoent.net [127.0.0.1]); Tue, 17 Jul 2012 00:27:01 -0700 (PDT) Jul 17 00:27:01 spector.dmz.enoent.net sendmail[7686]: [ID 801593 mail.info] q6H7R0eS007686: to=rewards+test@enoent.net, ctladdr=rewards (1002/1), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30128, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q6H7R02o007687 Message accepted for delivery) Jul 17 00:27:02 spector.dmz.enoent.net dovecot: [ID 583609 mail.info] lda(rewards): sieve: msgid=201207170727.q6H7R0eS007686@spector.dmz.enoent.net: stored mail into mailbox 'subtest' Jul 17 00:27:02 spector.dmz.enoent.net dovecot: [ID 583609 mail.info] lda(rewards): sieve: msgid=201207170727.q6H7R0eS007686@spector.dmz.enoent.net: stored mail into mailbox 'plustest' Jul 17 00:27:02 spector.dmz.enoent.net sendmail[7689]: [ID 801593 mail.info] q6H7R02o007687: to=rewards+test@enoent.net, ctladdr=rewards@spector.dmz.enoent.net (1002/1), delay=00:00:02, xdelay=00:00:01, mailer=local, pri=30971, relay=test, dsn=2.0.0, stat=Sent
On 2012-07-17 3:32 AM, Sean Kamath kamath@moltingpenguin.com wrote:
I was sure it wasn't a bug, it was a screwup on my part in the configuration, so I didn't read the bugreport page.
Actually, although it is called 'bugreport', you get to it via the 'Troubleshooting' link on the wiki...
But no worries, you've now provided everything that should be needed (I know nothing about sendmail, and won't be much help for the rest, but someone else will likely be able to see what is happening)...
I really thought it would be a simple "here's what you missed", since the logs are relatively uninformative...
The point is, what may appear to be uninformative to you may tell Timo (or someone else who knows what to look for) all they need to know to pinpoint the problem.
I certainly wasn't trying to be cryptic.
I know, but as you can see, the dovecot -n output really tells a lot - like what version you're on, and even what OS and filesystem.
Here's the complete set of everything. I wrote a little script to do this repeatedly, to make it easy to make changes and try again.
One thing I did notice is that you are sending this mail from an internal IP... since most people use very different checks for such mail (bypassing many/most checks), maybe you should be testing from an external address (one that comes in from outside your network)?
Note that in the last test, it works. Simply adding "X-Original-To: rewards+test@enoent.net" and sending the same message with "/usr/lib/sendmail -t< msg" will do what's expected.
Command: dovecot -n
# 2.0.13: /etc/dovecot/dovecot.conf
Also, it is always recommended when setting up a new server to start with the latest version... for 2.0.x that would be 2.0.19, but the latest is 2.1.8...
lda_original_recipient_header = X-Original-To lmtp_save_to_detail_mailbox = yes
Ok, I think this is the problem...
Dovecot's LMTP currently does NOT preserve the x-original-to header... in fact, brought this up recently (I was one of the ones interested in Timo adding support for it) on this (and the postfix, which is what I use) on this very list:
http://www.dovecot.org/list/dovecot/2012-April/065075.html
Apparently, after Timo discussed this on the postfix list, he determined that it would not be a very significant change for him to make to add support for this header in LMTP and that he would get to it sooner than later, but as of now, it has not been added.
--
Best regards,
Charles
On 2012-07-17 6:18 AM, Charles Marcus CMarcus@Media-Brokers.com wrote:
lda_original_recipient_header = X-Original-To lmtp_save_to_detail_mailbox = yes
Ok, I think this is the problem...
Dovecot's LMTP currently does NOT preserve the x-original-to header... in fact, brought this up recently (I was one of the ones interested in Timo adding support for it) on this (and the postfix, which is what I use) on this very list:
http://www.dovecot.org/list/dovecot/2012-April/065075.html
Apparently, after Timo discussed this on the postfix list, he determined that it would not be a very significant change for him to make to add support for this header in LMTP and that he would get to it sooner than later, but as of now, it has not been added.
Ok, that's what I get for replying to an email like this before having at least my first cup of coffee... ;)
What Timo said was that LMTP doesn't currently have support for *adding* the headers, but it doesn't remove them either, so I misspoke when I said it doesn't *preserve* the headers - it does.
I had asked the question specifically because postfix's LMTP support does *not* provide the header, so Timo figured a way to add support for adding it in dovecot's LMTP implementation (but it currently doesn't have it).
So, since apparently sendmail *does* add it to its LMTP implementation, and apparently your sieve script works properly when it is present, you need it for it to work correctly.
Why, I do not know, but someone else with more knowledge can probably answer that one now.
--
Best regards,
Charles
participants (2)
-
Charles Marcus
-
Sean Kamath