On 30.4.2013, at 0.12, Timo Sirainen tss@iki.fi wrote:
On 29.4.2013, at 21.40, Mike Abbott michael.abbott@apple.com wrote:
Dovecot-2.2.1 allows empty messages to be APPENDed when using CATENATE: b1 append inbox catenate (text {0+}
) b1 OK [APPENDUID 1366726248 12] Append completed.Contrast this with regular APPEND: b2 append inbox {0+} b2 NO Can't save a zero byte message.
Note that zero-size literals are OK but zero-size messages are not. So while "b1" above should fail like "b2", this should continue to succeed: b3 append inbox catenate (text {0+} text {8+} foobar ) b3 OK [APPENDUID 1366726248 13] Append completed.
This could be changed I guess, but I don't think it's a bug. I don't see anything in RFC 3501 prohibiting saving empty messages. Only the MULTIAPPEND RFC says:
A zero-length message literal argument is an error, and MUST return a NO. This can be used to cancel the append.
But that doesn't prohibit zero-length CATENATE parameters.
Also another way to generate empty message is to give URL to an empty MIME part. Should such APPENDs also fail? I think if there's no good reason to disallow empty messages I'll just keep the code as it is and allow them.