2006-08-29 [wwp] 2.4.0cvs110
[claws.git] / src / plugins / spamassassin / spamassassin.c
index e370303a3b4cba9600bd47451de49a148d5399a9..23085ac19e9033323e3c3503021806b5aa1c5e95 100644 (file)
@@ -271,13 +271,20 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
        }
        
        if (error) {
-               if (!warned_error) {
-                       alertpanel_error(_("The SpamAssassin plugin couldn't filter "
+               gchar *msg = _("The SpamAssassin plugin couldn't filter "
                                           "a message. The probable cause of the error "
                                           "is an unreachable spamd daemon. Please make "
-                                          "sure spamd is running and accessible."));
+                                          "sure spamd is running and accessible.");
+               if (!prefs_common.no_recv_err_panel) {
+                       if (!warned_error) {
+                               alertpanel_error(msg);
+                       }
+                       warned_error = TRUE;
+               } else {
+                       gchar *tmp = g_strdup_printf("%s\n", msg);
+                       log_error(tmp);
+                       g_free(tmp);
                }
-               warned_error = TRUE;
        }
        
        return FALSE;