Date: Mon, 12 Jan 2004 09:22:18 +0800 From: Khairil Yusof <kaeru@pd.jaring.my> To: gnome@freebsd.org Subject: Re: Patch for spamassasin filter for evo 1.5.1 Message-ID: <1073870536.82307.17.camel@wolverine.home.net> In-Reply-To: <1073723889.95211.59.camel@wolverine.home.net> References: <1073666176.95211.7.camel@wolverine.home.net> <1073723889.95211.59.camel@wolverine.home.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-yy39AXZ6wkcVmXmtULsQ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I think I missed some more strings for em_check_junk. I've included an updated patched. I'm waiting for more spam to come in, but I'm not sure if em_check_junk is really working after this patch. Right now everything is still being marked falsely as clean (~350 spam emails have been trained) and some blacklists in ~/.spamassassin/user_prefs --- mail/em-junk-filter.c.orig Thu Nov 13 19:33:26 2003 +++ mail/em-junk-filter.c Mon Jan 12 07:32:17 2004 @@ -174,7 +174,7 @@ int retval; =20 d(fprintf (stderr, "test if spamd is running (port %d)\n", port);) - sac_args [2] =3D port > 0 ? g_strdup_printf ("spamc -x -p %d", port) : g_strdup_printf ("spamc -x"); + sac_args [2] =3D port > 0 ? g_strdup_printf ("'spamc -x -p %d'", port) : g_strdup_printf ("spamc -x"); =20 retval =3D pipe_to_sa (NULL, "From test@127.0.0.1", 3, sac_args) =3D=3D 0= ; g_free (sac_args [2]); @@ -189,7 +189,7 @@ static gchar *args [3] =3D { "/bin/sh", "-c", - "spamassassin --version" + "'spamassassin --version'" /* quoted command string */ }; =20 if (pipe_to_sa (NULL, NULL, 3, args)) @@ -225,7 +225,7 @@ for (i =3D 0; i < NPORTS; i ++) { d(fprintf (stderr, "trying to run spamd at port %d\n", port)); =20 - sad_args [2] =3D g_strdup_printf ("spamd --port %d --local -- daemonize", port); + sad_args [2] =3D g_strdup_printf ("'spamd --port %d --local -- daemonize'", port); /* quote command string */ if (!pipe_to_sa (NULL, NULL, 3, sad_args)) { g_free (sad_args [2]); em_junk_sa_use_spamc =3D TRUE; @@ -272,17 +272,19 @@ =20 args [2] =3D em_junk_sa_use_spamc ? (em_junk_sa_spamd_port =3D=3D -1 - ? g_strdup ("spamc -c") /* Exit with a non-zero exit code if the + ? g_strdup ("'spamc -c'") /* Exit with a non-zero exit code if the tested message was junk */ - : g_strdup_printf ("spamc" + : g_strdup_printf ("'" + "spamc" " -c" /* Exit with a non-zero exit code if the tested message was junk */ - " -p %d", em_junk_sa_spamd_port)) - : g_strdup ("spamassassin" + " -p %d'", em_junk_sa_spamd_port)) + : g_strdup ("'spamassassin" " --exit-code" /* Exit with a non-zero exit code if the tested message was junk */ - " --local"); /* Local tests only (no online tests) */ - + " --local" /* Local tests only (no online tests) */ + "'"=20 + ); =20 retval =3D pipe_to_sa (msg, NULL, 3, args); =20 g_free (args [2]); @@ -296,11 +298,13 @@ static gchar *args [3] =3D { "/bin/sh", "-c", + "'" /* begin quote */ "sa-learn" " --no-rebuild" /* do not rebuild db */ " --spam" /* report junk */ " --single" /* single message */ " --local" /* local only */ + "'" /* end quote */ }; =20 d(fprintf (stderr, "em_junk_sa_report_junk\n")); @@ -315,11 +319,13 @@ static gchar *args [3] =3D { "/bin/sh", "-c", + "'" /* begin quote */ "sa-learn" " --no-rebuild" /* do not rebuild db */ " --ham" /* report notjunk */ " --single" /* single message */ " --local" /* local only */ + "'" /* end quote */ }; =20 d(fprintf (stderr, "em_junk_sa_report_notjunk\n")); @@ -334,9 +340,11 @@ static gchar *args [3] =3D { "/bin/sh", "-c", + "'" /* begin quote */ "sa-learn" " --rebuild" /* do not rebuild db */ " --local" /* local only */ + "'" /* end quote */ }; =20 d(fprintf (stderr, "em_junk_sa_commit_reports\n");) --=-yy39AXZ6wkcVmXmtULsQ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAAfbIDAqnLW/+/X8RAl4IAKD0iGqaJV2m6EPvdlYvd/8xhZ8fEACcCrdY abTXIEV4R8saEFNt0jeQ0KU= =UKpH -----END PGP SIGNATURE----- --=-yy39AXZ6wkcVmXmtULsQ--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1073870536.82307.17.camel>