[Rspamd-Users] Methods of ignoring local sent/received system emails

Cody Millard cmillard at email.broker
Mon Jul 1 12:09:57 UTC 2024


Hi List.


I have a daily report that is sent via cronjob to my postmaster email.

Occasionally, the summary contains information that is being recognized 
as spam and thus the subject is re-written with ***SPAM***.


How could I configure rspamd so that internal emails from root/cronjob 
are ignored?



I have attached the scripting that handles the summary email if anyone 
was curious.
-------------- next part --------------
#!/bin/bash

# Set the recipient email address
RECIPIENT="postmaster at email.broker"

T_DATE=$(date -d "yesterday" +%Y-%m-%d)


# Run pflogsum to generate the report
gen_report() {
/usr/bin/echo \## Mail dir size! \##
/usr/bin/du -d0 -h '/var/vmail'
/usr/bin/echo
/usr/bin/echo \## Memory Stats \##
/usr/bin/free -h --mega
/usr/bin/echo
/usr/bin/echo \## Activate IMAP Users \##
/usr/bin/doveadm who
/usr/bin/echo
/usr/bin/journalctl --since yesterday --until today -u postfix at - | /usr/sbin/pflogsumm --mailq --zero-fill --verbose-msg-detail
}

gen_report > /etc/postfix/mail_reports/$T_DATE.txt

# Send the report via email using sendmail
cat /etc/postfix/mail_reports/$T_DATE.txt | /usr/sbin/sendmail -t <<EOF
To: $RECIPIENT
Subject: $T_DATE Postfix Log Summary

$(cat /etc/postfix/mail_reports/$T_DATE.txt)

## THIS EMAIL IS AUTOMATED ##
EOF


exit


More information about the Users mailing list