GSList *cur;
for (cur = mlist ; cur != NULL ; cur = cur->next) {
MsgInfo * msginfo = (MsgInfo *) cur->data;
- if (MSG_IS_LOCKED(msginfo->flags))
+ if (MSG_IS_LOCKED(msginfo->flags)) {
+ procmsg_msginfo_free(msginfo);
continue;
+ }
if (msginfo->total_size != 0 &&
msginfo->size != (off_t)msginfo->total_size)
partial_mark_for_delete(msginfo);
if (send_queue_lock) {
/* Avoid having to translate two similar strings */
- log_warning("%s\n", _("Already trying to send."));
+ log_warning(LOG_PROTOCOL, "%s\n", _("Already trying to send."));
if (errstr) {
if (*errstr) g_free(*errstr);
*errstr = g_strdup_printf(_("Already trying to send."));
while (node != NULL) {
int res = 0;
next = node->next;
+ send_queue_lock = FALSE;
res = procmsg_send_queue(FOLDER_ITEM(node->data), save_msgs, errstr);
+ send_queue_lock = TRUE;
if (res < 0)
err = -res;
else
}
if (msginfo != NULL) {
+ MsgPermFlags to_unset = 0;
+
+ if (prefs_common.mark_as_read_on_new_window)
+ to_unset = (MSG_NEW|MSG_UNREAD);
+
if (replymessageid != NULL) {
- procmsg_msginfo_unset_flags(msginfo, MSG_FORWARDED, 0);
+ procmsg_msginfo_unset_flags(msginfo, to_unset|MSG_FORWARDED, 0);
procmsg_msginfo_set_flags(msginfo, MSG_REPLIED, 0);
} else {
procmsg_msginfo_unset_flags(msginfo, MSG_REPLIED, 0);
mail_filtering_data.filtered = NULL;
mail_filtering_data.unfiltered = NULL;
mail_filtering_data.account = ac_prefs;
- if (hooks_invoke(MAIL_FILTERING_HOOKLIST, &mail_filtering_data)) {
+
+ if (!ac_prefs || ac_prefs->filterhook_on_recv)
+ if (hooks_invoke(MAIL_FILTERING_HOOKLIST, &mail_filtering_data))
return TRUE;
- }
/* filter if enabled in prefs or move to inbox if not */
if((filtering_rules != NULL) &&
- filter_message_by_msginfo(filtering_rules, msginfo, ac_prefs)) {
+ filter_message_by_msginfo(filtering_rules, msginfo, ac_prefs,
+ FILTERING_INCORPORATION, NULL)) {
return TRUE;
}
mail_filtering_data.unfiltered = NULL;
mail_filtering_data.account = ac;
+ if (!ac || ac->filterhook_on_recv)
hooks_invoke(MAIL_LISTFILTERING_HOOKLIST, &mail_filtering_data);
if (mail_filtering_data.filtered == NULL &&