[Dovecot] Vacation messages come from POSTMASTER, not user
Problem : All vacation autoreplies come from the postmaster address. Expected behavior : vacation notice comes from the user who set the vacation. Platform : Dovecot 2.1.7 on Debian Squeeze ( See below for example reply, sieve script and dovecot -n output)
Any help appreciated!
Sieve script used:
if true { vacation :days 2 :subject "Out of Office" "I am currently out of the office"; stop; }
Return-Path: <> X-Original-To: teststff@mydomain.com Delivered-To: teststff@mydomain.com Received: from localhost (localhost [127.0.0.1]) by quicksilver.mydomain.com (Postfix) with ESMTP id 12591BE16 for <teststff@mydomain.com>; Mon, 26 Nov 2012 16:54:16 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at mydomain.com X-Spam-Flag: NO X-Spam-Score: -0.501 X-Spam-Level: X-Spam-Status: No, score=-0.501 required=5 tests=[BAYES_05=-0.5, NO_RELAYS=-0.001] autolearn=no Received: from quicksilver.mydomain.com ([127.0.0.1]) by localhost (quicksilver.mydomain.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DNM8HKzR4d0t for <teststff@mydomain.com>; Mon, 26 Nov 2012 16:54:06 +0000 (GMT) Received: by quicksilver.mydomain.com (Postfix, from userid 15099) id DA3DABE1B; Mon, 26 Nov 2012 16:54:06 +0000 (GMT) X-Sieve: Pigeonhole Sieve 0.3.0 Message-ID: <dovecot-sieve-1353948846-837692-0@quicksilver.mydomain.com> Date: Mon, 26 Nov 2012 16:54:06 +0000 From: Postmaster <root@mydomain.com> To: <teststff@mydomain.com> Subject: Out of Office In-Reply-To: <ac0fe0e6de81129e7499aba9aa67697a@localhost> References: <ac0fe0e6de81129e7499aba9aa67697a@localhost> Auto-Submitted: auto-replied (vacation) Precedence: bulk MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit
I am currently out of the office
# 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.6 ext3 auth_debug = yes auth_debug_passwords = yes auth_verbose = yes listen = *, [::] log_timestamp = "%Y-%m-%d %H:%M:%S " mail_location = maildir:/var/maildirs/%n/Maildir mail_privileged_group = mail 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 ihave passdb { args = /etc/dovecot/dovecot-ldap.conf driver = ldap } plugin { home = /var/maildirs/%u mail_debug = yes sieve = /var/maildirs/%u/deliver.sieve sieve_dir = /var/maildirs/%n/sieve sieve_global_dir = /etc/sieve/ sieve_global_path = /etc/sieve/deliver.sieve sieve_vacation_dont_check_recipient = yes } protocols = imap pop3 sieve service auth { unix_listener /var/spool/postfix/private/dovecot-auth { group = postfix mode = 0660 user = postfix } unix_listener auth-master { mode = 0600 } user = root } service imap-login { client_limit = 256 process_min_avail = 16 service_count = 0 vsz_limit = 256 M } service managesieve-login { client_limit = 256 process_min_avail = 16 service_count = 0 vsz_limit = 256 M } service pop3-login { client_limit = 256 process_min_avail = 16 service_count = 0 vsz_limit = 256 M } ssl_cert = </var/certs/wildcard.mydomain.ie-including-chain.pem ssl_key = </var/certs/wildcard.mydomain.ie.key userdb { args = /etc/dovecot/dovecot-ldap.conf driver = ldap } protocol imap { imap_client_workarounds = delay-newmail mail_max_userip_connections = 20 } protocol pop3 { pop3_uidl_format = %08Xu%08Xv } protocol lda { auth_socket_path = /var/run/dovecot/auth-master mail_debug = yes mail_plugins = sieve postmaster_address = root@mydomain.ie }
Am 26.11.2012 18:31, schrieb cfowler:
Problem : All vacation autoreplies come from the postmaster address.
<> is not really the postmaster address, its special for the mailer daemon
Expected behavior : vacation notice comes from the user who set the vacation.
at my knowledge, does not work that way ,yet, guess what you want, might work with invoking external script via sieve
wait for other responses , special stefan might give better answer about sieve
Platform : Dovecot 2.1.7 on Debian Squeeze ( See below for example reply, sieve script and dovecot -n output)
Any help appreciated!
Sieve script used:
if true { vacation :days 2 :subject "Out of Office" "I am currently out of the office"; stop; }
Return-Path: <> X-Original-To: teststff@mydomain.com Delivered-To: teststff@mydomain.com Received: from localhost (localhost [127.0.0.1]) by quicksilver.mydomain.com (Postfix) with ESMTP id 12591BE16 for <teststff@mydomain.com>; Mon, 26 Nov 2012 16:54:16 +0000 (GMT)
Best Regards MfG Robert Schetterer
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich
At 5PM +0000 on 26/11/12 you (cfowler) wrote:
Problem : All vacation autoreplies come from the postmaster address. Expected behavior : vacation notice comes from the user who set the vacation. Platform : Dovecot 2.1.7 on Debian Squeeze ( See below for example reply, sieve script and dovecot -n output) <snip>
sieve_vacation_dont_check_recipient = yes
Why have you set this? Normally vacation will refuse to respond to a message which doesn't have your address in one of the recipient header fields; in fact the standard says that it MUST NOT respond unless this is the case. This setting turns that check off, in which case Pigeonhole will send a vacation response (despite the standard) but sends it from Postmaster. I assume this is done for privacy reasons, since the person the vacation response is being sent to doesn't necessarily know the user who set the vacation exists, or what their address might be.
If you send a message with the user's email address in To:, do you get a vacation response From: the correct address?
Ben
On 26-11-2012 17:59, Ben Morrow wrote:
At 5PM +0000 on 26/11/12 you (cfowler) wrote:
Problem : All vacation autoreplies come from the postmaster address. Expected behavior : vacation notice comes from the user who set the vacation. Platform : Dovecot 2.1.7 on Debian Squeeze ( See below for example reply, sieve script and dovecot -n output) <snip>
sieve_vacation_dont_check_recipient = yes
Why have you set this? Normally vacation will refuse to respond to a message which doesn't have your address in one of the recipient header fields; in fact the standard says that it MUST NOT respond unless this is the case. This setting turns that check off, in which case Pigeonhole will send a vacation response (despite the standard) but sends it from Postmaster. I assume this is done for privacy reasons, since the person the vacation response is being sent to doesn't necessarily know the user who set the vacation exists, or what their address might be.
This feature is the reason I've upgraded to 2.1.7 from 1.2.15
Our users have addresses like bmorrow@foo.com We also store aliases for them in LDAP like ben.morrow@foo.com. Postfix knows of these aliases and accepts mail for them. Most of our users prefer to hand out this alias as their email address
Mails to bmorrow@foo.com were receiving vacation auto-replies as you'd expect in 1.2.15 Mails to ben.morrow@foo.com were not due to the infamous "discarding vacation response for message implicitly delivered to bmorrow@foo.com" message.
I know the correct behavior is for the users to write a correct sieve script with an addresses: line, but that's not going to happen unfortunately. The users just want "Push button to make vacation go".
If you send a message with the user's email address in To:, do you get a vacation response From: the correct address?
No, mails to bmorrow@foo.com also get Postmaster replies. With 1.2.15 we were at least getting autoreplies from bmorrow@foo.com when a mail was sent to bmorrow@foo.com.
Ben
At 6PM +0000 on 26/11/12 you (cfowler) wrote:
On 26-11-2012 17:59, Ben Morrow wrote:
At 5PM +0000 on 26/11/12 you (cfowler) wrote:
Problem : All vacation autoreplies come from the postmaster address. Expected behavior : vacation notice comes from the user who set the vacation. Platform : Dovecot 2.1.7 on Debian Squeeze ( See below for example reply, sieve script and dovecot -n output) <snip>
sieve_vacation_dont_check_recipient = yes
Why have you set this? Normally vacation will refuse to respond to a message which doesn't have your address in one of the recipient header fields; in fact the standard says that it MUST NOT respond unless this is the case.
(Stephan has explained that I am wrong here: that's what comes from reading the code rather than running it...)
This feature is the reason I've upgraded to 2.1.7 from 1.2.15
Our users have addresses like bmorrow@foo.com We also store aliases for them in LDAP like ben.morrow@foo.com. Postfix knows of these aliases and accepts mail for them. Most of our users prefer to hand out this alias as their email address
Mails to bmorrow@foo.com were receiving vacation auto-replies as you'd expect in 1.2.15 Mails to ben.morrow@foo.com were not due to the infamous "discarding vacation response for message implicitly delivered to bmorrow@foo.com" message.
I know the correct behavior is for the users to write a correct sieve script with an addresses: line, but that's not going to happen unfortunately. The users just want "Push button to make vacation go".
I see... this is a little tricky, yes, and I think you're right this is the only straightforward solution at the moment. You do want to be a little careful about enabling this, though: the restriction is there in the standard to prevent automated replies from being sent for messages to mailing lists and group aliases and such, where the sender does not (and should not) know the list of final delivery addresses, and certainly doesn't want vacation replies from all of them. Since most mailing lists now set the List-* headers (which prevent vacation replies anyway), they should be OK, so this is probably only a problem if you use internal aliases which expand to lists of users.
Ideally pigeonhole would take advantage of this paragraph in the standard
An email address is considered to belong to the recipient if it is
one of:
1. an email address known by the implementation to be associated
with the recipient,
and allow you to specify a dict in which to lookup a default :addresses list for each recipient. That way you could turn this parameter back off, but instead give Dovecot the information it needs to determine that a message To: <ben.morrow@foo.com> was in fact directly addressed to this user. I wonder how difficult that would be...
If you send a message with the user's email address in To:, do you get a vacation response From: the correct address?
No, mails to bmorrow@foo.com also get Postmaster replies. With 1.2.15 we were at least getting autoreplies from bmorrow@foo.com when a mail was sent to bmorrow@foo.com.
Stephan said xthread that this has now been fixed.
Ben
On 11/26/2012 6:59 PM, Ben Morrow wrote:
At 5PM +0000 on 26/11/12 you (cfowler) wrote:
This setting turns that check off, in which case Pigeonhole will send a vacation response (despite the standard) but sends it from Postmaster.
Actually, this shouldn't have happened. Originally, it would only use 'Postmaster' when the recipient address is unknown, but that situation would never occur. With the addition of the dont_check_recipient setting, this got changed unintentionally.
I assume this is done for privacy reasons, since the person the vacation response is being sent to doesn't necessarily know the user who set the vacation exists, or what their address might be.
Interesting notion, but the real reason is of a more stupid nature as explained above. :) Do you think this is something people would want to configure? Since this particular feature deviates from the standard to begin with, nothing is specified about what should be done. I think the added anonymity would often be useless, because the content of the vacation message can contain all sorts of information on the recipient, including the mail address, e.g. in the signature.
If you send a message with the user's email address in To:, do you get a vacation response From: the correct address?
Since the recipient check is not performed, the recipient address used for the reply remained NULL and the reply code would revert to Postmaster at all times. This is fixed now.
Regards,
Stephan.
On 11/26/2012 6:31 PM, cfowler wrote:
Problem : All vacation autoreplies come from the postmaster address. Expected behavior : vacation notice comes from the user who set the vacation. Platform : Dovecot 2.1.7 on Debian Squeeze ( See below for example reply, sieve script and dovecot -n output)
Any help appreciated!
This should fix that:
http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/b56711807edc
Regards,
Stephan.
On 26/11/12 20:17, Stephan Bosch wrote:
On 11/26/2012 6:31 PM, cfowler wrote:
Problem : All vacation autoreplies come from the postmaster address. Expected behavior : vacation notice comes from the user who set the vacation. Platform : Dovecot 2.1.7 on Debian Squeeze ( See below for example reply, sieve script and dovecot -n output)
Any help appreciated!
This should fix that:
http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/b56711807edc
Regards,
Stephan.
Sorry for the late reply. I've been off work sick :( Excellent Work Stephan! Thank you so much. do you know if this patch will make it into 2.1.11?
regards, Colin
participants (5)
-
Ben Morrow
-
cfowler
-
Colin Fowler
-
Robert Schetterer
-
Stephan Bosch