Sieve: vacation from: parameter with display-name

Edda letters001 at
Tue Mar 8 08:19:30 EST 2016


I’m referring back to a post from 2009 for which I can’t find an answer:

According to sieve/vacation RFCs 5228/5230 it is possible to add a 
display-name in the :from parameter, for example:

vacation :from "My Name <>"

This entry in a cyrus sieve script results in the following From: header 
in the auto-reply (via sendmail):

From: "<My Name" <myaddr at>

Please see the first unbalanced „<„ in the display-name.

In cyrus source code  (2.4.18 in our case but the same in 2.5.7), file 
../imap/lmtp_sieve.c, function send_response we have:

static int send_response(void *ac,
                          void *ic __attribute__((unused)),
                          void *sc, void *mc, const char **errmsg)
     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);

cyrus always adds <> to the fromaddr, even if the vacation :from 
parameter contains a display-name like in the example above:

vacation :from "My Name <>"

In this case cyrus provides the following From: header to the mta:

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>

Looks like a bug in cyrus to me or am I missing something, maybe an 
answer to the original post ;-) ?

Best regards,

More information about the Info-cyrus mailing list