From 48a7a688f2bd5253805ad6525b57a4ec464dbecd Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 22 Jan 2004 20:46:29 +0000 Subject: Oops, when calling spamassassin rather than spamc, we need to invoke 2004-01-22 Jeffrey Stedfast * 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. svn path=/trunk/; revision=24372 --- mail/em-junk-filter.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'mail/em-junk-filter.c') 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; -- cgit v1.2.3