vacation script issue

fins svinz82 at gmail.com
Mon Dec 3 17:07:44 EET 2018


Hello,


I have a complete Postfix + Dovecot + openLDAP setup almost working, the
only issue I have is the vacation script auto-reply that doesn't work
properly.

If I send an email to a user with the vacation filter enabled, the
auto-reply is send to a local recipient with the same account name.

So for example if I send a mail from test at xyz.com to test at example.com, the
auto-reply is received on the test at example.com address instead of the
test at xyz.com who's the original sender.

Here's a log file:


Dec  3 13:52:48 imap dovecot: lda(test at example.com): Debug: sieve:
executing script from /var/mail/example.com/test/.dovecot.svbin
Dec  3 13:52:48 imap dovecot: lda(test at example.com): sieve: msgid=<
dovecot-sieve-1543841568-836314-0 at imap.example.com>: discarding vacation
response to auto-submitted message from <MAILER-DAEMON>
Dec  3 13:52:48 imap dovecot: lda(test at example.com): sieve: msgid=<
dovecot-sieve-1543841568-836314-0 at imap.example.com>: stored mail into
mailbox 'INBOX'
Dec  3 13:52:48 imap postfix/pipe[6663]: D835A300E05: to=<test at example.com>,
orig_to=<test at xyz.com>, relay=dovecot, delay=0.1, delays=0.03/0.01/0/0.06,
dsn=2.0.0, status=sent (delivered via dovecot service)


Can somebody help with this issue and/or point where to go for debugging?


Please find my dovecot configuration bellow:



dovecot -n
> # 2.2.10: /etc/dovecot/dovecot.conf
> # OS: Linux 3.10.0-862.11.6.el7.x86_64 x86_64 CentOS Linux release 7.5.1804 (Core)  xfs
> auth_debug = yes
> auth_mechanisms = plain login
> auth_verbose = yes
> lda_mailbox_autocreate = yes
> lda_mailbox_autosubscribe = yes
> mail_debug = yes
> mail_gid = mail
> mail_home = /var/mail/%d/%n
> mail_location = maildir:/var/mail/%d/%n/Maildir
> mail_plugins = " quota"
> mail_uid = vmail
> 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
> mbox_write_locks = fcntl
> namespace inbox {
>   inbox = yes
>   location =
>   mailbox Drafts {
>     special_use = \Drafts
>   }
>   mailbox Junk {
>     special_use = \Junk
>   }
>   mailbox Sent {
>     special_use = \Sent
>   }
>   mailbox "Sent Messages" {
>     special_use = \Sent
>   }
>   mailbox Trash {
>     special_use = \Trash
>   }
>   prefix =
> }
> passdb {
>   args = /etc/dovecot/dovecot-ldap.conf.ext
>   driver = ldap
> }
> plugin {
>   quota = maildir:User quota
>   quota_grace = 10%%
>   quota_rule2 = Trash:storage=+100M
>   quota_status_nouser = DUNNO
>   quota_status_overquota = 552 5.2.2 Mailbox is full
>   quota_status_success = DUNNO
>   quota_warning = storage=95%% quota-warning 95 %u it
>   quota_warning2 = storage=80%% quota-warning 80 %u it
>   sieve = ~/.dovecot.sieve
>   sieve_dir = ~/sieve
> }
> protocols = imap pop3 lmtp sieve
> service auth {
>   unix_listener /var/spool/postfix/private/auth {
>     group = postfix
>     mode = 0666
>     user = postfix
>   }
>   unix_listener auth-userdb {
>     group = mail
>     mode = 0600
>     user = vmail
>   }
> }
> service imap-login {
>   inet_listener imap {
>     port = 0
>   }
> }
> service managesieve-login {
>   inet_listener sieve {
>     port = 4190
>   }
> }
> service pop3-login {
>   inet_listener pop3 {
>     port = 0
>   }
>   inet_listener pop3s {
>     port = 0
>   }
> }
> service quota-status {
>   client_limit = 1
>   executable = quota-status -p postfix
>   inet_listener {
>     port = 12340
>   }
> }
> service quota-warning {
>   executable = script /usr/local/bin/quota-warning.sh
>   unix_listener quota-warning {
>     user = vmail
>   }
>   user = vmail
> }
> ssl = required
> ssl_cert = </etc/pki/tls/certs/imap.example.com.crt
> ssl_key = </etc/pki/tls/private/imap.example.com.key
> userdb {
>   args = /etc/dovecot/dovecot-ldap.conf.ext
>   driver = ldap
> }
> protocol lda {
>   mail_plugins = " quota sieve"
> }
> protocol imap {
>   mail_plugins = " quota imap_quota"
> }
>
>

dovecot-ldap.conf.ext


hosts =  example.com
> base = ou=People,dc=example,dc=com
> ldap_version = 3
> auth_bind = yes
> user_filter = (&(objectClass=posixAccount)(uid=%n))
> pass_filter = (&(objectClass=posixAccount)(uid=%n))
>
> user_attrs = \
>  mailRoutingAddress=user, \
>  =uid=vmail, \
>  =gid=mail, \
>  =home=/var/mail/%d/%n, \
>  =quota_rule=*:bytes=%{ldap:departmentNumber}
>
>
> pass_attrs= mailRoutingAddress=user
>
> tls = yes
>

My vacation script:


require ["date","relational","vacation"];
> # rule:[Vacation]
> if allof (currentdate :zone "+0100" :value "ge" "iso8601"
> "2018-12-02T02:00:00+01:00", currentdate :zone "+0100" :value "le"
> "iso8601" "2018-12-24T04:00:00+01:00")
> {
>     vacation :addresses "test at example.com" :subject "Away" "I'm away";
> }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20181203/0c87bf6f/attachment.html>


More information about the dovecot mailing list