dovecot-2.0: mbox: When generating envelope to From_-line, don't...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jul 14 15:52:52 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/c34681558f46
changeset: 11812:c34681558f46
user: Timo Sirainen <tss at iki.fi>
date: Wed Jul 14 13:52:47 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 3972e896865d -r c34681558f46 src/lib-storage/index/mbox/mbox-save.c
--- a/src/lib-storage/index/mbox/mbox-save.c Tue Jul 13 21:04:55 2010 +0100
+++ b/src/lib-storage/index/mbox/mbox-save.c Wed Jul 14 13:52:47 2010 +0100
@@ -121,8 +121,11 @@
struct mail_storage *storage =
&ctx->mbox->storage->storage;
- from_envelope = t_strconcat(storage->user->username,
- "@", my_hostdomain(), NULL);
+ from_envelope =
+ strchr(storage->user->username, '@') != NULL ?
+ storage->user->username :
+ t_strconcat(storage->user->username,
+ "@", my_hostdomain(), NULL);
}
/* save in local timezone, no matter what it was given with */
More information about the dovecot-cvs
mailing list