sa-stats.pl

perl /usr/local/bin/sa-stats.pl --logdir /var/log --filename *

Filename must be a regex, and as you passed it the * was detected as GLOB by the shell, you could try:

perl /usr/local/bin/sa-stats.pl --logdir /var/log --filename '.*'
(note the single quotes and the dot)
 
Better, but still no results :-(
root@stl-mx:~# perl /usr/local/bin/sa-stats.pl --logdir /var/log --filename '.*'
/var/log/. not found..
/var/log/.. not found..
/var/log/avast not found..
/var/log/pmgproxy not found..
/var/log/private not found..
/var/log/postgresql not found..
/var/log/apt not found..
/var/log/letsencrypt not found..
/var/log/clamav not found..
/var/log/pve not found..


Email: 0 Autolearn: 0 AvgScore: 0.00 AvgScanTime: 0.00 sec
Spam: 0 Autolearn: 0 AvgScore: 0.00 AvgScanTime: 0.00 sec
Ham: 0 Autolearn: 0 AvgScore: 0.00 AvgScanTime: 0.00 sec

Time Spent Running SA: 0.00 hours
Time Spent Processing Spam: 0.00 hours
Time Spent Processing Ham: 0.00 hours

TOP SPAM RULES FIRED
----------------------------------------------------------------------
RANK RULE NAME COUNT %OFMAIL %OFSPAM %OFHAM
----------------------------------------------------------------------
----------------------------------------------------------------------

TOP HAM RULES FIRED
----------------------------------------------------------------------
RANK RULE NAME COUNT %OFMAIL %OFSPAM %OFHAM
----------------------------------------------------------------------
----------------------------------------------------------------------


root@stl-mx:~#
 
I think that the script would need (quite) some modification - as it seems to parse 'spamd' logs
spamd is a daemon shipped with SpamAssassin, which analyzes mails submitted to it with spamc and writes its own log-file.

PMG does not use spamd - it creates a SpamAssassin perl object, which is used for scanning inside 'pmg-smtp-filter'
you can get which rules hit from pmg-smtp-filter's logs - but would need to do the parsing yourself.

I hope this explains it!
 
Yes. Thank you, I was afraid that would be the answer to the question.
Of course that raises the next question: How can I get a similar report?

Specifically: what rules are firing, how often, % of ham, % of spam
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!