dovecot-1.2: mbox: When generating envelope to From_-line, don't...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 14 15:53:38 EEST 2010


details:   http://hg.dovecot.org/dovecot-1.2/rev/f8c14abf52b4
changeset: 9590:f8c14abf52b4
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jul 14 13:53:34 2010 +0100
description:
mbox: When generating envelope to From_-line, don't append a second @owndomain if username already has one.

diffstat:

 src/lib-storage/index/mbox/mbox-save.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r 5c0265dba3d1 -r f8c14abf52b4 src/lib-storage/index/mbox/mbox-save.c
--- a/src/lib-storage/index/mbox/mbox-save.c	Thu Jul 08 13:48:10 2010 +0100
+++ b/src/lib-storage/index/mbox/mbox-save.c	Wed Jul 14 13:53:34 2010 +0100
@@ -120,8 +120,11 @@
 			struct mail_storage *storage =
 				&ctx->mbox->storage->storage;
 
-			from_envelope = t_strconcat(storage->ns->user->username,
-						    "@", my_hostdomain(), NULL);
+			from_envelope =
+				strchr(storage->ns->user->username, '@') != NULL ?
+				storage->ns->user->username :
+				t_strconcat(storage->ns->user->username,
+					    "@", my_hostdomain(), NULL);
 		}
 
 		/* save in local timezone, no matter what it was given with */


More information about the dovecot-cvs mailing list