/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2005 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "defs.h"
MEMBCOPY(folder);
MEMBCOPY(to_folder);
+ MEMBDUP(face);
MEMBDUP(xface);
MEMBDUP(dispositionnotificationto);
MEMBDUP(returnreceiptto);
* procheader.c::procheader_get_headernames() */
if (!msginfo->xface)
msginfo->xface = g_strdup(full_msginfo->xface);
+ if (!msginfo->face)
+ msginfo->face = g_strdup(full_msginfo->face);
if (!msginfo->dispositionnotificationto)
msginfo->dispositionnotificationto =
g_strdup(full_msginfo->dispositionnotificationto);
g_free(msginfo->returnreceiptto);
g_free(msginfo->dispositionnotificationto);
g_free(msginfo->xface);
+ g_free(msginfo->face);
g_free(msginfo->fromname);
memusage += strlen(msginfo->inreplyto);
if (msginfo->xface)
memusage += strlen(msginfo->xface);
+ if (msginfo->face)
+ memusage += strlen(msginfo->face);
if (msginfo->dispositionnotificationto)
memusage += strlen(msginfo->dispositionnotificationto);
if (msginfo->returnreceiptto)
MailFilteringData mail_filtering_data;
mail_filtering_data.msginfo = msginfo;
- if (hooks_invoke(MAIL_FILTERING_HOOKLIST, &mail_filtering_data))
+ if (hooks_invoke(MAIL_FILTERING_HOOKLIST, &mail_filtering_data)) {
+ hooks_invoke(MAIL_POSTFILTERING_HOOKLIST, msginfo);
return TRUE;
+ }
/* filter if enabled in prefs or move to inbox if not */
if((filtering_rules != NULL) &&
- filter_message_by_msginfo(filtering_rules, msginfo))
+ filter_message_by_msginfo(filtering_rules, msginfo)) {
+ hooks_invoke(MAIL_POSTFILTERING_HOOKLIST, msginfo);
return TRUE;
+ }
hooks_invoke(MAIL_POSTFILTERING_HOOKLIST, msginfo);
-
return FALSE;
}
fclose(fp);
if (tmp_msginfo != NULL) {
- tmp_msginfo->folder = src_msginfo->folder;
+ if (src_msginfo)
+ tmp_msginfo->folder = src_msginfo->folder;
tmp_msginfo->plaintext_file = g_strdup(tmpfile);
} else {
g_warning("procmsg_msginfo_new_from_mimeinfo(): Can't generate new msginfo");