]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mbox: Write empty From_-line envelope as MAILER-DAEMON
authorTimo Sirainen <tss@iki.fi>
Wed, 14 Jul 2010 12:58:21 +0000 (13:58 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 14 Jul 2010 12:58:21 +0000 (13:58 +0100)
src/lib-storage/index/mbox/mbox-save.c

index 9aa98044cd9d3169d8bd5c9e57224edda7cff497..1e963afb67d0d2b2fe00336bde70ce59fbd5e054 100644 (file)
@@ -126,6 +126,9 @@ static int write_from_line(struct mbox_save_context *ctx, time_t received_date,
                                storage->user->username :
                                t_strconcat(storage->user->username,
                                            "@", my_hostdomain(), NULL);
+               } else if (*from_envelope == '\0') {
+                       /* can't write empty envelope */
+                       from_envelope = "MAILER-DAEMON";
                }
 
                /* save in local timezone, no matter what it was given with */