[Dovecot] Sieve vacation reply problem (Dovecot+Sieve/Sendmail/Horde)

megodin at inboxalias.com megodin at inboxalias.com
Wed Aug 21 20:51:50 EEST 2013


Hello Dovecot community,

I have an annoying problem with successfully activating Sieve vacation replies - on which I have been working hard the last days without success :(
I'm using Dovecot 2.2 + Sendmail + Sieve connected with Horde web-mailer IMP H3 which is generally working fine.

BUT: Whenever I activate vacation script in Horde (via Ingo) and send a test-mail to this account, the mail itself arrives but the auto-vacation-reply failes:

[mail.err] dovecot: lda(exampleuser): Error: sieve: original envelope recipient address 'exampleuser at dovecot_localhost' is unparsable
[mail.warning] dovecot: lda(exampleuser): Warning: sieve: msgid=: vacation action aborted: envelope recipient is <>

The Sieve Script which is generated and executed:
# Sieve Filter produced by Ingo (http://www.horde.org/ingo/) (20.08.2013, 16:10)

require ["vacation", "regex"];
# Abwesenheit
if allof ( not exists ["list-help", "list-unsubscribe", "list-subscribe", "list-owner", "list-post", "list-archive", "list-id", "Mailing-List"], not header :comparator "i;ascii-casemap" :is "Precedence" ["list", "bulk", "junk"], not header :comparator "i;ascii-casemap" :matches "To" "Multiple recipients of*" ) {
    vacation :days 7 :addresses "example.user at example.com" :subject "vacation" "I am on vacation until xxxx. Please refer all urgent business to devnull at example.com .";
}



I understand that Sieve is trying to send vacation replies to the envelope sender - apparently it gets it on the wrong line somewhere from the sendmail config. To get sendmail working along with Dovecot, I had to do some modifications:

in /etc/mail/virtusertable (Alias with domain-path)
@vlmail.example.com     %1 at dovecot_localhost

in /etc/mail/access (allows relaying)
to:dovecot_localhost    RELAY

in /etc/mail/mailertable (where to be relayed)
dovecot_localhost       dovecot:vlmail.example.com

in /etc/mail/sendmail.cf (relevant part for the Dovecot Mailer specification):
Mdovecot,   P=/usr/libexec/dovecot/dovecot-lda, F=lDFMPhnu59,
            S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP,
            U=vmail:vmail,
            T=DNS/RFC822/X-Unix,
            A=/usr/libexec/dovecot/dovecot-lda -d $u

After several hours playing with sendmail's config I came to the end that sendmail's part must be already over when sieve is getting the original envelope recipient - it seems like it gets it from dovecot-lda. Though, when playing with the Dovecot Mailer specifications in sendmail.cf I can get different error message if I add   A=/usr/libexec/dovecot/dovecot-lda -d $u -a $n (adding username part in destination address):

[mail.info] dovecot: lda(exampleuser): sieve: msgid=: discarding vacation response for implicitly delivered message; no known (envelope) recipient address found in message headers (recipient=, and additional `:addresses' are specified)


BTW, the original mails arriving have a valid Return-Path in header...
I am thinking of writing global Sieve scripts (executing before the user's private sieve script), telling Sieve to use the TO: field  instead of the Envelope sender but I'm not sure if this is possible, and if, which commands are needed specifically.

I really start getting desperate... Can somebody get me some clue what is wrong in my config / where I should put modifications to get sieve vacation replys working properly?!

Thanks in advance!!
Megodin


My Setup:
- Dovecot EE 2.2.5.3 + pigeonhole Sieve 0.4.1
- Sendmail Version 8.14.4 (compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
        MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
        NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
        TCPWRAPPERS USERDB USE_LDAP_INIT)
- Horde 3.3.13 (Ingo H3 1.2.6)

doveconf -n
# 2.2.5.3 (f54f8c8f5502): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-279.22.1.el6.x86_64 x86_64 CentOS release 6.4 (Final) nfs
auth_cache_size = 10 M
auth_cache_ttl = 10 mins
auth_debug = yes
auth_master_user_separator = *
auth_username_format = %n
auth_verbose = yes
disable_plaintext_auth = no
listen = *
lock_method = dotlock
mail_debug = yes
mail_fsync = always
mail_gid = vmail
mail_home = /mnt/vmails/%u
mail_location = sdbox:/mnt/vmails/%u/mailstore
mail_plugins = " quota fts fts_lucene"
mail_privileged_group = mail
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
mmap_disable = yes
passdb {
  args = /etc/dovecot/users.blocked
  deny = yes
  driver = passwd-file
}
passdb {
  args = /etc/dovecot/passwd.masterusers
  driver = passwd-file
  master = yes
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  fts = lucene
  fts_lucene = whitespace_chars=@.
  quota = dict:User quota::file:%h/dovecot-quota
  quota_rule = *:storage=100M
  quota_rule2 = Trash:storage=+50M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=98%% quota-warning 98 %u
  sieve = /mnt/vmails/%u/.dovecot.sieve
  sieve_dir = /mnt/vmails/%u/sieve
  sieve_global_dir = /var/lib/dovecot/sieve/global/
  sieve_global_path = /var/lib/dovecot/sieve/default.sieve
}
postmaster_address = postmaster at example.com
protocols = imap pop3 sieve
service auth {
  unix_listener auth-userdb {
    group = vmail
    user = vmail
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  unix_listener quota-warning {
    user = vmail
  }
  user = vmail
}
ssl_cert = 



---
Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! http://email.freenet.de/basic/Informationen

_________________________________________________________________
Send and receive anonymous emails to your inbox with InboxAlias.
http://www.inboxalias.com



More information about the dovecot mailing list