Sieve: vacation from: parameter with display-name

Edda letters001 at
Thu Mar 10 08:12:11 EST 2016

Am 08.03.16 um 14:19 schrieb Edda via Info-cyrus:
> From: <My Name <>>
> To my understanding of RFC 5322 this is not a valid „mailbox“, because 
> of the outer angle brackets around. sendmail rewrites it internally to 
> the resulting valid but ugly form:
> From: "<My Name" <myaddr at>
I looked at RFC 5322 a bit further. It states that address header fields 
are (finally) of the form "mailbox":

    mailbox         =   name-addr / addr-spec


    name-addr       =   [display-name] angle-addr

(addr-spec has no angle brackets around).

MTAs mostly tolerate the forms with angle brackets, but they are not 
compliant to RFC... as far as I see...

Sieve vacation already uses name-addr or addr-spec, so I would suggest 
this simple patch:

diff -Naur cyrus-imapd-2.4.18.orig/imap/lmtp_sieve.c 
--- cyrus-imapd-2.4.18.orig/imap/lmtp_sieve.c    2015-07-06 
05:38:29.000000000 +0200
+++ cyrus-imapd-2.4.18/imap/lmtp_sieve.c    2016-03-10 
13:44:04.173224594 +0100
@@ -650,8 +650,8 @@
      fprintf(sm, "Date: %s\r\n", datestr);

      fprintf(sm, "X-Sieve: %s\r\n", SIEVE_VERSION);
-    fprintf(sm, "From: <%s>\r\n", src->fromaddr);
-    fprintf(sm, "To: <%s>\r\n", src->addr);
+    fprintf(sm, "From: %s\r\n", src->fromaddr);
+    fprintf(sm, "To: %s\r\n", src->addr);
      /* check that subject is sane */
      sl = strlen(src->subj);
      for (i = 0; i < sl; i++)

Best regards,

More information about the Info-cyrus mailing list