Use o spamassassin
binário no modo de depuração.
Extraído deste Wiki do SpamAssassin: Usando o Pyzor
echo "test" | spamassassin -D pyzor 2>&1 | less
ou
spamassassin -t -D 2>&1 < /tmp/myspam| less
O primeiro comando foi enviar string "test" para o spamassassin. O segundo, envie a fonte completa do email em /tmp/myspam
para spamasassassin.
Este teste deve retornar uma saída semelhante a:
...
Oct 6 11:11:46.956 [10904] dbg: pyzor: network tests on, attempting Pyzor
Oct 6 11:11:52.055 [10904] dbg: pyzor: pyzor is available: /bin/pyzor
Oct 6 11:11:52.056 [10904] dbg: pyzor: opening pipe: /bin/pyzor --homedir /some/dir/.pyzor check < /tmp/.spamassassin10904BmyCb9tmp
Oct 6 11:11:52.344 [10904] dbg: pyzor: [10906] finished: exit 1
Oct 6 11:11:52.345 [10904] dbg: pyzor: check failed: no response
...
ou
...
Oct 6 19:34:05.896 [14864] dbg: pyzor: network tests on, attempting Pyzor
Oct 6 19:34:10.940 [14864] dbg: pyzor: pyzor is available: /bin/pyzor
Oct 6 19:34:10.942 [14864] dbg: pyzor: opening pipe: /bin/pyzor --homedir /some/dir/.pyzor check < /tmp/.spamassassin14864qX2Rmwtmp
Oct 6 19:34:11.248 [14864] dbg: pyzor: [14866] finished: exit 1
Oct 6 19:34:11.248 [14864] dbg: pyzor: got response: public.pyzor.org:24441 (200, 'OK') 0 0
...
Na mesma saída, você deve consultar a entrada também. No meu servidor, a saída é
...
Jun 3 16:00:13.133 [12436] dbg: razor2: results: spam? 0
Jun 3 16:00:13.133 [12436] dbg: razor2: results: engine 8, highest cf score: 0
Jun 3 16:00:13.134 [12436] dbg: razor2: results: engine 4, highest cf score: 0
...