=== modified file 'mail/mail-ops.c'
--- mail/mail-ops.c	2009-11-17 20:06:11 +0000
+++ mail/mail-ops.c	2009-12-02 14:45:30 +0000
@@ -501,8 +501,31 @@
 	if (resent_from) {
 		camel_address_decode (from, resent_from);
 	} else {
-		iaddr = camel_mime_message_get_from (message);
-		camel_address_copy (from, CAMEL_ADDRESS (iaddr));
+		/* Don't get the 'from' from the headers */
+		/* See https://bugzilla.gnome.org/show_bug.cgi?id=585577 */
+		gchar *fake_msgid;
+		gchar *hostname;
+		EAccount *account;
+		const gchar *str;
+		gchar *res;
+
+		/* We use camel_header_msgid_generate () to get a canonical
+		 * hostname, then skip the part leading to '@' */
+		hostname = strchr ((fake_msgid = camel_header_msgid_generate ()), '@');
+		hostname++;
+
+		account = mail_config_get_default_account (); /* wfm but it should probably be getpwent->pw_name instead */
+		if (!account)
+			str = g_strdup ("fake"); /* not sure what we should do here */
+		else {
+			gchar *p;
+			str = g_strdup (e_account_get_string (account, E_ACCOUNT_ID_ADDRESS));
+			p = strchr (str, '@');
+			*p = '\0';
+		}
+		res = g_strconcat (str, "@", hostname, NULL);
+		g_free (fake_msgid);
+		camel_address_decode (from, res);
 	}
 
 	recipients = (CamelAddress *) camel_internet_address_new ();

