diff options
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/em-junk-filter.c | 16 |
2 files changed, 15 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index a06c791344..75dd8c0fea 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,10 @@ 2004-01-22 Jeffrey Stedfast <fejj@ximian.com> + * em-junk-filter.c (em_junk_sa_test_spamd): Oops, when calling + spamassassin rather than spamc, we need to invoke /bin/sh -c + since spamassassin is a shell script. + (em_junk_sa_check_junk): Same. + Fixes bug #53175. * em-junk-filter.c (pipe_to_sa): Don't need an argc (we don't even diff --git a/mail/em-junk-filter.c b/mail/em-junk-filter.c index c0f5a28824..8a5623b191 100644 --- a/mail/em-junk-filter.c +++ b/mail/em-junk-filter.c @@ -189,8 +189,9 @@ em_junk_sa_test_spamd (void) { int port = SPAMD_PORT; char *argv[6] = { - "spamassassin", - "--version", + "/bin/sh", + "-c", + "spamassassin --version", NULL, }; @@ -264,7 +265,7 @@ em_junk_sa_is_available (void) static gboolean em_junk_sa_check_junk (CamelMimeMessage *msg) { - char *argv[4], buf[12]; + char *argv[5], buf[12]; int i = 0; d(fprintf (stderr, "em_junk_sa_check_junk\n")); @@ -281,10 +282,13 @@ em_junk_sa_check_junk (CamelMimeMessage *msg) argv[i++] = buf; } } else { - argv[i++] = "spamassassin"; - argv[i++] = "--exit-code"; + argv[i++] = "/bin/sh"; + argv[i++] = "-c"; + if (mail_session_get_sa_local_only ()) - argv[i++] = "--local"; + argv[i++] = "spamassassin --exit-code --local"; + else + argv[i++] = "spamassassin --exit-code"; } argv[i] = NULL; |