0

Debian, Postfix, Spamassassin. When postfix receive spam, postfix sent answer: 550 5.7.1 Blocked by SpamAssassin.

I can't disable it. How to not reject, but silently drop spam message? I don't want inform spammers, that my mailserver receive evil mail.

/etc/postfix/master.cf:

...
spamassassin unix -     n       n       -       -       pipe
  user=debian-spamd argv=/usr/bin/spamc -f -e
  /usr/sbin/sendmail -oi -f ${sender} ${recipient}

/etc/postfix/main.cf

...
milter_default_action = accept
milter_protocol = 6
smtpd_milters = inet:localhost:8891,local:spamass/spamass.sock
non_smtpd_milters = $smtpd_milters
...

/etc/spamassassin/local.cf:

rewrite_header Subject *****SPAM*****
report_safe 0
required_score 5.0
use_bayes 1
bayes_auto_learn 1
skip_rbl_checks 0
use_razor2 0
use_pyzor 0

allow_user_rules 0

body LOCAL_DEMONSTRATION_RULE   /root-test-12345/i
score LOCAL_DEMONSTRATION_RULE 6.0
describe LOCAL_DEMONSTRATION_RULE       This is a simple test rule in body.

header LOCAL_DEMONSTRATION_SUBJECT      Subject =~ /\btestheader\b/i
score LOCAL_DEMONSTRATION_SUBJECT       6.0
describe LOCAL_DEMONSTRATION_SUBJECT       This is a simple test rule in header.

Before I install spamass-milter, Spamassassin only marks email Subject with SPAM.

Spam detect works, the problem how to disable auto notice.

Marvin
  • 61
  • 1
  • 3
  • 6
  • Why would you care for spammers? They certainly do not care for you. The only relevant people are those legitimate senders that your server mistakes for spammers. It is the service to them that your configuration must maximize. – anx Jun 21 '23 at 13:59
  • 1
    Silently dropping spam is nothing but an indication of accepting the message. _Connection stage rejection_ is the right thing to do. – Esa Jokinen Jun 21 '23 at 21:02
  • Thank you for responce. May be I don't understand you. Reject connection stage is when postfix do checks like reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_helo_hostname? If message body and headers is inspected with spamassasin, it is too late to reject connection, as I think. – Marvin Jun 23 '23 at 12:35

0 Answers0