Sieve vacation address problem
Hi,
it seams I have a problem with the vacation script.
The problem is that the vacation answers to a address that is not listed in the sieve script. I checked the postfix master.conf which delivers to lda correct parameter.
In the logfile you can see that that office@example.com received a message that get delivered to user@example.com (with the sievescipt) and to office@example.com (another user without script).
The sieve script has the :addresses parameter only set to user@example.com
Is something wrong with my setup?
We use roundcube + sievemanage to create sieve scripts.
Sievescript:
## Generated by Roundcube Webmail SieveRules Plugin ## require ["date","relational","vacation"];
# rule:[Urlaub] if allof (currentdate :zone "+0200" :value "gt" "date" "2016-07-22", currentdate :zone "+0200" :value "lt" "date" "2016-08-08") { vacation :days 1 :addresses ["user@example.com"] :subject "Abwesenheitsnotiz" text: Thx i'm not here . ; }
postfix master.conf dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -a ${original_recipient} -d ${user}@${nexthop} -e
Logfile: Postfix: 2016-07-27T11:44:30+02:00 mailstore1 postfix/smtpd[5037]: connect from unknown[172.20.20.229]:15677 2016-07-27T11:44:30+02:00 mailstore1 postfix/smtpd[5037]: 3rzqp64klWzF: client=unknown[172.20.20.229]:15677 2016-07-27T11:44:30+02:00 mailstore1 postfix/cleanup[5040]: 3rzqp64klWzF: message-id=019301d1e7eb$76b26a70$64173f50$@example.org 2016-07-27T11:44:30+02:00 mailstore1 postfix/qmgr[704]: 3rzqp64klWzF: from=user@example.org, size=7337, nrcpt=2 (queue active) 2016-07-27T11:44:30+02:00 mailstore1 postfix/smtpd[5037]: disconnect from unknown[172.20.20.229]:15677 2016-07-27T11:44:30+02:00 mailstore1 postfix/pipe[5157]: 3rzqp64klWzF: to=office@example.com, relay=dovecot, delay=0.12, delays=0.02/0.03/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service) 2016-07-27T11:44:30+02:00 mailstore1 postfix/pipe[5042]: 3rzqp64klWzF: to=user@example.com, orig_to=office@example.com, relay=dovecot, delay=0.12, delays=0.02/0.03/0/0.07, dsn=2.0.0, status=sent (delivered via dovecot service) 2016-07-27T11:44:30+02:00 mailstore1 postfix/qmgr[704]: 3rzqp64klWzF: removed
dovecot lda 2016-07-27T11:44:30+02:00 mailstore1 dovecot: lda(user@example.com): sieve: msgid=019301d1e7eb$76b26a70$64173f50$@example.org: sent vacation response to user@example.org 2016-07-27T11:44:30+02:00 mailstore1 dovecot: lda(office@example.com): msgid=019301d1e7eb$76b26a70$64173f50$@example.org: saved mail to INBOX 2016-07-27T11:44:30+02:00 mailstore1 dovecot: lda(user@example.com): sieve: msgid=019301d1e7eb$76b26a70$64173f50$@example.org: stored mail into mailbox 'INBOX'
doveocot conf # 2.2.devel (d81a83b): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.devel (3f51b82) # OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.5 auth_cache_negative_ttl = 1 secs auth_cache_size = 10 M auth_cache_ttl = 1 secs auth_mechanisms = PLAIN LOGIN DIGEST-MD5 SCRAM-SHA-1 CRAM-MD5 APOP auth_verbose = yes default_client_limit = 600 default_vsz_limit = 512 M dict { lastlogin = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext sqlacl = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no first_valid_gid = 1001 first_valid_uid = 1001 hostname = mailstore1@itronic.at imap_hibernate_timeout = 1 mins imap_id_log = * imap_id_send = * imap_idle_notify_interval = 10 mins instance_name = mailstore1 last_valid_gid = 1001 last_valid_uid = 1001 lda_original_recipient_header = X-LDA-Original-To lmtp_rcpt_check_quota = yes login_greeting = ITronic Mail Store login_trusted_networks = 172.22.14.0/24 mail_attachment_dir = /srv/storage1/vmail_sis mail_attachment_hash = %{sha512} mail_attachment_min_size = 64 k mail_cache_min_mail_count = 5 mail_gid = vmail mail_location = mdbox:~/mdbox mail_plugins = zlib lazy_expunge stats acl quota mail_prefetch_count = 100 mail_server_admin = mailto:postmaster@itronic.at mail_server_comment = ITronic Mail System mail_shared_explicit_inbox = yes mail_uid = vmail mailbox_list_index = yes 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 index ihave duplicate mime foreverypart extracttext mdbox_preallocate_space = yes namespace { hidden = yes list = no location = mdbox:~/mdbox:MAILBOXDIR=expunged prefix = "#EXPUNGED/" subscriptions = no type = private } namespace { list = children location = mdbox:%%h/mdbox prefix = "#Users/%%u/" separator = / subscriptions = yes type = shared } namespace inbox { hidden = no inbox = yes location = mailbox Archvie { special_use = \Archive } mailbox Drafts { special_use = \Drafts } mailbox Sent { special_use = \Sent } mailbox Spam { special_use = \Junk } mailbox Trash { special_use = \Trash } prefix = separator = / subscriptions = yes type = private } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { acl = vfile acl_shared_dict = proxy::sqlacl last_login_dict = proxy::lastlogin last_login_key = last-login/%u lazy_expunge = "#EXPUNGED/" lazy_expunge_only_last_instance = no quota = dict:User quota::proxy::sqlquota quota_grace = 10%% quota_rule = *:storage=1024M quota_rule2 = "#EXPUNGED:storage=+100M" quota_warning = storage=100%% quota-warning 100 %u quota_warning2 = storage=95%% quota-warning 95 %u quota_warning3 = storage=80%% quota-warning 80 %u recipient_delimiter = + sieve = file:~/sieve;active=~/.dovecot.sieve sieve_global = /etc/dovecot/sieve sieve_max_actions = 64 sieve_max_redirects = 8 sieve_max_script_size = 2M sieve_quota_max_scripts = 0 sieve_quota_max_storage = 64M stats_refresh = 30 secs stats_track_cmds = yes zlib_save = gz zlib_save_level = 6 } pop3_uidl_duplicates = rename protocols = imap lmtp sieve pop3 sieve service auth-worker { user = $default_internal_user } service auth { inet_listener { port = 4180 } unix_listener auth-userdb { mode = 0666 } } service dict { unix_listener dict { group = vmail mode = 0666 } } service imap-hibernate { unix_listener imap-hibernate { group = vmail mode = 0666 } } service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } process_min_avail = 1 service_count = 0 } service imap { process_limit = 1024 unix_listener imap-master { user = dovecot } unix_listener imap { group = vmail mode = 0666 } vsz_limit = 512 M } service lmtp { inet_listener lmtp { address = 172.22.14.135 port = 24000 } unix_listener lmtp { mode = 0666 } } service managesieve-login { inet_listener sieve { port = 4190 } process_min_avail = 0 service_count = 1 vsz_limit = 64 M } service managesieve { process_limit = 50 } service pop3-login { inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 ssl = yes } process_min_avail = 20 service_count = 1 vsz_limit = 64 M } service pop3 { process_limit = 1024 } service quota-warning { executable = script /opt/scripts/quota-warning.sh unix_listener quota-warning { user = vmail } user = dovecot } service stats { fifo_listener stats-mail { mode = 0600 user = vmail } } shutdown_clients = no ssl_cert =
-- Harald Leithner
ITronic Wiedner Hauptstraße 120/5.1, 1050 Wien, Austria Tel: +43-1-545 0 604 Mobil: +43-699-123 78 4 78 Mail: leithner@itronic.at | itronic.at
Op 7/27/2016 om 12:46 PM schreef Harald Leithner:
Hi,
it seams I have a problem with the vacation script.
The problem is that the vacation answers to a address that is not listed in the sieve script. I checked the postfix master.conf which delivers to lda correct parameter.
In the logfile you can see that that office@example.com received a message that get delivered to user@example.com (with the sievescipt) and to office@example.com (another user without script).
The sieve script has the :addresses parameter only set to user@example.com
Is something wrong with my setup?
We use roundcube + sievemanage to create sieve scripts.
[...]
postfix master.conf dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -a ${original_recipient} -d ${user}@${nexthop} -e
First of all, the ":addresses" argument is not an exclusive list of which addresses the vacation action will respond for. It is a list of alternative addresses, for when the message headers have no address that is recognized as the envelope recipient. So, even when ":addresses" does not list a particular recipient address, the vacation action will still respond for it if the message is addressed at that recipient explicitly in the headers. Read https://tools.ietf.org/html/rfc5230#section-4.5 for more info.
Due to the way you invoke dovecot-lda, Sieve only gets to see the original recipient address, which is "office@example.com". I am assuming, that is what is in either the "To" or "Cc" headers of the message, which means that vacation will respond.
This problem is probably fixed by using a -r ${recipient} parameter for dovecot-lda, in addition to the existing -a argument. This way, vacation will use the final recipient address instead. LDA parameters are documented here: http://wiki2.dovecot.org/LDA#Parameters .
There is additional info in the description of the sieve_vacation_use_original_recipient setting (http://wiki2.dovecot.org/Pigeonhole/Sieve/Extensions/Vacation#Configuration). Leave this at the default "no" though, as "yes" would negate the fix described above.
Regards,
Stephan.
Hi,
now it works perfect, thx for your answer. I miss understood this dovecot-lda option.
regards,
Harald
Am 27.07.2016 um 21:23 schrieb Stephan Bosch:
Op 7/27/2016 om 12:46 PM schreef Harald Leithner:
Hi,
it seams I have a problem with the vacation script.
The problem is that the vacation answers to a address that is not listed in the sieve script. I checked the postfix master.conf which delivers to lda correct parameter.
In the logfile you can see that that office@example.com received a message that get delivered to user@example.com (with the sievescipt) and to office@example.com (another user without script).
The sieve script has the :addresses parameter only set to user@example.com
Is something wrong with my setup?
We use roundcube + sievemanage to create sieve scripts.
[...]
postfix master.conf dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -a ${original_recipient} -d ${user}@${nexthop} -e
First of all, the ":addresses" argument is not an exclusive list of which addresses the vacation action will respond for. It is a list of alternative addresses, for when the message headers have no address that is recognized as the envelope recipient. So, even when ":addresses" does not list a particular recipient address, the vacation action will still respond for it if the message is addressed at that recipient explicitly in the headers. Read https://tools.ietf.org/html/rfc5230#section-4.5 for more info.
Due to the way you invoke dovecot-lda, Sieve only gets to see the original recipient address, which is "office@example.com". I am assuming, that is what is in either the "To" or "Cc" headers of the message, which means that vacation will respond.
This problem is probably fixed by using a -r ${recipient} parameter for dovecot-lda, in addition to the existing -a argument. This way, vacation will use the final recipient address instead. LDA parameters are documented here: http://wiki2.dovecot.org/LDA#Parameters .
There is additional info in the description of the sieve_vacation_use_original_recipient setting (http://wiki2.dovecot.org/Pigeonhole/Sieve/Extensions/Vacation#Configuration). Leave this at the default "no" though, as "yes" would negate the fix described above.
Regards,
Stephan.
-- Harald Leithner
ITronic Wiedner Hauptstraße 120/5.1, 1050 Wien, Austria Tel: +43-1-545 0 604 Mobil: +43-699-123 78 4 78 Mail: leithner@itronic.at | itronic.at
participants (2)
-
Harald Leithner
-
Stephan Bosch