<div dir="ltr">Hey,<div><br></div><div>I have an issue with misformatted vacation emails. Part of the initial mail ends up in the vacation response and the headers of the vacation response end up in the body. Which also leads to the wrong charset being used by (some) MUAs. (Should be utf-8 but the inital mal was ascii only).</div><div><br></div><div>I think I narrowed the trigger of the bug down to a long Reference: header line. It only happens if the long line is not the first one.</div><div><br></div><div>In the attached example I sent to the mangled mailbox <a href="mailto:mymailbox@example.com">mymailbox@example.com</a>. The sieve rule triggered is this one ("äöü" are only there to demonstrate the breaking charset):</div><div><br>if true<br>{<br>vacation :days 7 :addresses ["<a href="mailto:mymailbox@example.com">mymailbox@example.com</a>"] text:<br>This is an automated reply; I am away and will not be able to reply to you immediately.I will get back to you as soon as I return.äöüß<br>.<br>;<br>}<br></div><div><br></div><div><br></div><div>Christian</div><div>--</div><div><br></div><div>$ dovecot --version<br>2.2.13<br>$ dovecot -n<br># 2.2.13: /etc/dovecot/dovecot.conf<br># OS: Linux 3.16.0-9-amd64 x86_64 Debian 8.11 <br>disable_plaintext_auth = no<br>dotlock_use_excl = no<br>mail_debug = yes<br>mail_fsync = always<br>mail_nfs_index = yes<br>mail_nfs_storage = yes<br>mail_plugins = acl lazy_expunge listescape mail_log notify<br>managesieve_notify_capability = mailto<br>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 imapflags notify<br>mmap_disable = yes<br>namespace expunged {<br>  hidden = yes<br>  list = no<br>  location = maildir:~/expunged<br>  prefix = EXPUNGED.<br>  separator = /<br>}<br>namespace inbox {<br>  inbox = yes<br>  location = maildir:~/maildir<br>  prefix = <br>  separator = /<br>}<br>passdb {<br>  args = username_format=%n /etc/passwd<br>  driver = passwd-file<br>}<br>plugin {<br>  acl = vfile<br>  lazy_expunge = EXPUNGED.<br>  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename<br>  mail_log_fields = uid box msgid size<br>  recipient_delimiter = +<br>  sieve = ~/sieve/dovecot.sieve<br>  sieve_dir = ~/sieve/<br>  sieve_extensions = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave imapflags notify<br>  sieve_max_redirects = 20<br>}<br>protocols = imap pop3 sieve lmtp<br>service imap-login {<br>  client_limit = 40<br>  process_limit = 50<br>  service_count = 0<br>  vsz_limit = 512 M<br>}<br>service imap {<br>  process_limit = 2000<br>  vsz_limit = 512 M<br>}<br>service lmtp {<br>  process_limit = 200<br>  vsz_limit = 1 G<br>}<br>service managesieve-login {<br>  inet_listener sieve {<br>    port = 2000<br>  }<br>  vsz_limit = 512 M<br>}<br>service pop3-login {<br>  client_limit = 40<br>  process_limit = 50<br>  service_count = 0<br>  vsz_limit = 512 M<br>}<br>shutdown_clients = no<br>ssl_cert = </etc/ssl/certs/cert.crt<br>ssl_key = </etc/ssl/private/key.key<br>userdb {<br>  args = username_format=%n /etc/passwd<br>  driver = passwd-file<br>}<br>verbose_proctitle = yes<br>protocol imap {<br>  mail_max_userip_connections = 150<br>  mail_plugins = acl lazy_expunge listescape mail_log notify imap_acl<br>}<br>protocol lmtp {<br>  lmtp_save_to_detail_mailbox = yes<br>  mail_plugins = acl lazy_expunge listescape mail_log notify sieve<br>}<br></div><div><br></div></div>