Spamassassin logs

gtech1

New Member
Feb 21, 2025
1
0
1
Anyone knows where the spamassassin logs are or how they can be enabled ?

I modified /usr/bin/pmg-smtp-filter to enable debugging in the SA call, like so:
$self->{sa} = Mail::SpamAssassin->new ({
debug => 'mail',
local_tests_only => $opt_testmode || !$rbl_checks,
home_dir_for_helpers => '/root',
userstate_dir => '/root/.spamassassin',
dont_copy_prefs => 1,
stop_at_threshold => 0,
});

but it doesn't log anything extra under /var/log/mail.log , or maybe I'm looking at the wrong place ?

Long story short, I want to whitelist all e-mails coming from 192.168.3.0/24. I added these options in /etc/mail/spamassassin/custom.cf and restarted pmg-smtp-filter service


internal_networks 192.168.3.0/24
trusted_networks 192.168.3.0/24
score ALL_TRUSTED -200.0

it seems to have no effect


Code:
2025-02-21T10:45:40.037549-05:00 pmg1 postfix/postscreen[4972]: CONNECT from [192.168.3.173]:51209 to [192.168.3.174]:25
2025-02-21T10:45:40.037848-05:00 pmg1 postfix/postscreen[4972]: WHITELISTED [192.168.3.173]:51209
2025-02-21T10:45:40.037954-05:00 pmg1 postfix/postscreen[4972]: using backwards-compatible default setting respectful_logging=no for client [192.168.3.173]:51209
2025-02-21T10:45:40.070776-05:00 pmg1 postfix/smtpd[4973]: connect from unknown[192.168.3.173]
2025-02-21T10:45:40.107729-05:00 pmg1 postfix/smtpd[4973]: 1A3F73E1270: client=unknown[192.168.3.173]
2025-02-21T10:45:40.109770-05:00 pmg1 postfix/cleanup[4977]: 1A3F73E1270: message-id=<embaf47153-b51a-48b0-bcec-469d3bd7873a@9371159b.com>
2025-02-21T10:45:40.111248-05:00 pmg1 postfix/qmgr[794]: 1A3F73E1270: from=<test@localmail.com>, size=28154, nrcpt=1 (queue active)
2025-02-21T10:45:40.111733-05:00 pmg1 postfix/smtpd[4973]: disconnect from unknown[192.168.3.173] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
2025-02-21T10:45:40.151826-05:00 pmg1 pmg-smtp-filter[4965]: 2025/02/21-10:45:40 CONNECT TCP Peer: "[127.0.0.1]:46376" Local: "[127.0.0.1]:10024"
2025-02-21T10:45:40.210335-05:00 pmg1 pmg-smtp-filter[4965]: 3E127367B89FA42FFC0: new mail message-id=<embaf47153-b51a-48b0-bcec-469d3bd7873a@9371159b.com>#012
2025-02-21T10:45:40.459095-05:00 pmg1 pmg-smtp-filter[4965]: 3E127367B89FA42FFC0: SA score=5/5 time=0.179 bayes=undefined autolearn=disabled hits=HTML_FONT_LOW_CONTRAST(0.713),HTML_IMAGE_ONLY_24(2.799),HTML_IMAGE_RATIO_04(0.001),HTML_MESSAGE(0.001),RDNS_NONE(2.399),UNPARSEABLE_RELAY(0.001)
2025-02-21T10:45:40.463989-05:00 pmg1 pmg-smtp-filter[4965]: 3E127367B89FA42FFC0: moved mail for <diego@custdomain.com> to spam quarantine - 3E127467B89FA470742 (rule: Quarantine/Mark Spam (Level 3))


when I run spamassassin -D --lint <file> it shows that it's reading custom.cf just fine, no errors:

Feb 21 10:50:04.979 [5011] dbg: config: read file /etc/mail/spamassassin/custom.cf
Feb 21 10:50:04.979 [5011] dbg: config: read file /etc/mail/spamassassin/local.cf
Feb 21 10:50:04.979 [5011] dbg: config: read file /etc/mail/spamassassin/pmg-scores.cf

I just need to know what happens when there is a network request and/or why my trusted network isn't applied