diff options
author | Milan Crha <mcrha@redhat.com> | 2014-06-17 17:51:13 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2014-06-17 17:51:13 +0800 |
commit | cef3b32167f0b04f028767eceb3030eea81cabc9 (patch) | |
tree | de0301721a0f42c713fb330883dc905b28b4a76d /modules | |
parent | 5fca7d616970c1d96f35ebe898994f1d470d5a7b (diff) | |
download | gsoc2013-evolution-cef3b32167f0b04f028767eceb3030eea81cabc9.tar gsoc2013-evolution-cef3b32167f0b04f028767eceb3030eea81cabc9.tar.gz gsoc2013-evolution-cef3b32167f0b04f028767eceb3030eea81cabc9.tar.bz2 gsoc2013-evolution-cef3b32167f0b04f028767eceb3030eea81cabc9.tar.lz gsoc2013-evolution-cef3b32167f0b04f028767eceb3030eea81cabc9.tar.xz gsoc2013-evolution-cef3b32167f0b04f028767eceb3030eea81cabc9.tar.zst gsoc2013-evolution-cef3b32167f0b04f028767eceb3030eea81cabc9.zip |
Bug 702703 - Be able to overwrite domain in Message IDs
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mdn/evolution-mdn.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/modules/mdn/evolution-mdn.c b/modules/mdn/evolution-mdn.c index 07a68e204a..0a46204bb0 100644 --- a/modules/mdn/evolution-mdn.c +++ b/modules/mdn/evolution-mdn.c @@ -229,8 +229,7 @@ mdn_notify_sender (ESource *identity_source, const gchar *transport_uid; const gchar *self_address; const gchar *sent_folder_uri; - gchar *fake_msgid; - gchar *hostname; + const gchar *hostname; gchar *receipt_subject; gchar *disposition; gchar *recipient; @@ -275,13 +274,11 @@ mdn_notify_sender (ESource *identity_source, transport_uid = e_source_mail_submission_get_transport_uid ( E_SOURCE_MAIL_SUBMISSION (extension)); - /* We use camel_header_msgid_generate() to get a canonical - * hostname, then skip the part leading to '@' */ - fake_msgid = camel_header_msgid_generate (); - hostname = strchr (fake_msgid, '@'); - g_return_if_fail (hostname != NULL); - - hostname++; + hostname = self_address ? strchr (self_address, '@') : NULL; + if (hostname) + hostname++; + else + hostname = "localhost"; /* Create toplevel container. */ body = camel_multipart_new (); @@ -351,7 +348,6 @@ mdn_notify_sender (ESource *identity_source, g_free (ua); g_free (recipient); - g_free (fake_msgid); g_free (disposition); part = camel_mime_part_new (); |