section: mail
before_queue_filtering 1
dnsbl_sites zen.spamhaus.org,surbl.com
dnsbl_threshold 1
pmgconfig sync --restart 1
before_queue_filtering 1
That should happen, if your rulesystem 'BLOCK's mails with a high spam-scoreis there a way to make it REJECT the mail instead (with a 5xx error-code)?
Dec 2 13:01:27 mailgate postfix/smtpd[4953]: connect from anotherdomain.test[89.106.215.196]
Dec 2 13:01:27 mailgate postfix/smtpd[4953]: 5944420014: client=anotherdomain.test[89.106.215.196]
Dec 2 13:01:27 mailgate postfix/cleanup[5040]: 5944420014: message-id=<E1ibkOM-0004C4-Sp@anotherdomain.test>
Dec 2 13:01:27 mailgate postfix/qmgr[3907]: 5944420014: from=<me@anotherdomain.test>, size=793, nrcpt=1 (queue active)
Dec 2 13:01:27 mailgate pmg-smtp-filter[5152]: 205BA5DE4FD175CDA3: new mail message-id=<E1ibkOM-0004C4-Sp@anotherdomain.test>#012
Dec 2 13:01:27 mailgate postfix/smtpd[4953]: disconnect from anotherdomain.test[89.106.215.196] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Dec 2 13:01:27 mailgate pmg-smtp-filter[5152]: 205BA5DE4FD175CDA3: SA score=1000/5 time=0.483 bayes=0.15 autolearn=no autolearn_force=no hits=AWL(-0.136),BAYES_20(-0.001),GTUBE(1000),KAM_LAZY_DOMAIN_SECURITY(1),SPF_HELO_NONE(0.001),SPF_NONE(0.001),TVD_SPACE_RATIO(0.001)
Dec 2 13:01:27 mailgate pmg-smtp-filter[5152]: 205BA5DE4FD175CDA3: block mail to <me@somedomain.test> (rule: Block Spam (Level 10))
Dec 2 13:01:27 mailgate pmg-smtp-filter[5152]: 205BA5DE4FD175CDA3: processing time: 0.531 seconds (0.483, 0.033, 0)
Dec 2 13:01:27 mailgate postfix/lmtp[5091]: 5944420014: to=<me@somedomain.test>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.56, delays=0.02/0/0.01/0.54, dsn=2.7.0, status=sent (250 2.7.0 BLOCKED (205BA5DE4FD175CDA3))
Dec 2 13:01:27 mailgate postfix/qmgr[3907]: 5944420014: removed
2019-12-02 13:01:26 1ibkOM-0004C4-Sp <= me@anotherdomain.test U=me P=local S=485
2019-12-02 13:01:27 1ibkOM-0004C4-Sp => me@somedomain.test R=dnslookup T=remote_smtp H=mailgate.somedomain.test [193.170.191.178] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no DN="CN=mailgate.somedomain.test" C="250 2.0.0 Ok: queued as 5944420014"
2019-12-02 13:01:27 1ibkOM-0004C4-Sp Completed
the Block action results in a 500 (if all recipients block the mail) when configured in before-queue filtering modeand fwiw: there is a "Block" rule in my "#pmgRuleConfiguration" which runs the pre-defined "block" action an any mail with spamscore>10. (i don't see a "reject" action)
Currently this is not done yet - but we're working on it - see also the release notes for PMG 6.1 : https://pmg.proxmox.com/wiki/index.php/Release_History#Proxmox_Mail_Gateway_6.1And would be great, to see the logs in the tracking center as milter doesn't log there.
Currently this is not done yet - but we're working on it - see also the release notes for PMG 6.1 : https://pmg.proxmox.com/wiki/index.php/Release_History#Proxmox_Mail_Gateway_6.1
- it has the same caveats as the milter-solution: no logging
to be sure: i would *love* to see the rejected emails in my log-files.
journalctl
and /var/log/mail.info
are full of lines like:Dec 4 04:46:31 proxmox postfix/smtpd[11581]: proxy-reject: END-OF-MESSAGE: 554 5.7.1 Rejected for policy reasons; from=<soraya@failmayor.icu> to=<user@example.com> proto=ESMTP helo=<failmayor.icu>