H_LIST_HELP = 26,
H_LIST_ARCHIVE = 27,
H_LIST_OWNER = 28,
+ H_RESENT_FROM = 29,
};
static HeaderEntry hentry_full[] = {{"Date:", NULL, FALSE},
{"List-Help:", NULL, TRUE},
{"List-Archive:", NULL, TRUE},
{"List-Owner:", NULL, TRUE},
+ {"Resent-From:", NULL, TRUE},
{NULL, NULL, FALSE}};
static HeaderEntry hentry_short[] = {{"Date:", NULL, FALSE},
if (msginfo->extradata->list_owner) break;
msginfo->extradata->list_owner = g_strdup(hp);
break;
+ case H_RESENT_FROM:
+ if (!msginfo->extradata)
+ msginfo->extradata = g_new0(MsgInfoExtraData, 1);
+ if (msginfo->extradata->resent_from) break;
+ msginfo->extradata->resent_from = g_strdup(hp);
+ break;
/* end list infos */
default:
break;
MEMBDUP(extradata->list_help);
MEMBDUP(extradata->list_archive);
MEMBDUP(extradata->list_owner);
+ MEMBDUP(extradata->resent_from);
}
refs = msginfo->references;
if (!msginfo->extradata->account_login && full_msginfo->extradata->account_login)
msginfo->extradata->account_login = g_strdup
(full_msginfo->extradata->account_login);
+ if (!msginfo->extradata->resent_from && full_msginfo->extradata->resent_from)
+ msginfo->extradata->resent_from = g_strdup
+ (full_msginfo->extradata->resent_from);
}
procmsg_msginfo_free(full_msginfo);
g_free(msginfo->extradata->partial_recv);
g_free(msginfo->extradata->account_server);
g_free(msginfo->extradata->account_login);
+ g_free(msginfo->extradata->resent_from);
g_free(msginfo->extradata);
}
slist_free_strings_full(msginfo->references);
memusage += strlen(msginfo->extradata->account_server);
if (msginfo->extradata->account_login)
memusage += strlen(msginfo->extradata->account_login);
+ if (msginfo->extradata->resent_from)
+ memusage += strlen(msginfo->extradata->resent_from);
if (msginfo->extradata->list_post)
memusage += strlen(msginfo->extradata->list_post);
gchar *dispositionnotificationto;
gchar *returnreceiptto;
+ gchar *resent_from;
+
/* used only for partially received messages */
gchar *partial_recv;
gchar *account_server;
* because it's editable. */
fp_pos = ftell(fp);
- tmp_msginfo = procheader_parse_stream(fp, flags, FALSE, FALSE);
+ tmp_msginfo = procheader_parse_stream(fp, flags, TRUE, FALSE);
fseek(fp, fp_pos, SEEK_SET);
-
- if (tmp_msginfo && tmp_msginfo->from) {
+
+ if (tmp_msginfo && tmp_msginfo->extradata && tmp_msginfo->extradata->resent_from) {
+ strncpy2(spec_from, tmp_msginfo->extradata->resent_from, BUFFSIZE-1);
+ extract_address(spec_from);
+ } else if (tmp_msginfo && tmp_msginfo->from) {
strncpy2(spec_from, tmp_msginfo->from, BUFFSIZE-1);
extract_address(spec_from);
} else {