I’d say 99% of my spam gets flagged at postscreen level, never making it to rspamd.
I have a dozen or so burned email addresses. These addresses were part of data breaches or otherwise made it to the internet shit list.
These are listed (one per each line) in data/conf/postfix/recipient_access
An example entry;
email@domain.com 550 Permanent failure for one or more recipients.
Once the file is created, you will have to run postmap on it (from within the postfix container).
docker exec -it mailcowdockerized-postfix-mailcow-1 bash
postmap /opt/postfix/conf/recipient_access
In data/conf/postfix/recipient_access/extra.cf I have the following to reference this file.
smtpd_recipient_restrictions =
check_recipient_access hash:/opt/postfix/conf/recipient_access,
check_recipient_mx_access proxy:mysql:/opt/postfix/conf/sql/mysql_mbr_access_maps.cf,
permit_sasl_authenticated,
permit_mynetworks,
check_recipient_access proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_in_policy.cf,
reject_invalid_helo_hostname,
reject_unauth_destination
Essentially added the check_recipient_access line to the top of what’s currently in main.cf.
Here’s an example of a spam attempt.
NOQUEUE: reject: RCPT from mail-eastus2azon11021117.outbound.protection.outlook.com[52.101.57.117]: 550 5.7.1 <email@domain.com>: Recipient address rejected: Permanent failure for one or more recipients.; from=<FBFjeWmcbVdIFQKwJBtVS@nosjkewqew4.onmicrosoft.com> to=<email@domain> proto=ESMTP helo=<BN8PR05CU002.outbound.protection.outlook.com>
The next log entry is a disconnect message.
As these are effectively burned email addresses, I never expect to receive any legit email on them ever again and shit canning them before they waste too many resources seems like a good way to go. I can’t remember when but many years ago (15 years?, maybe more) I started using different emails for everything. With the catchall, they still arrive in the same mailbox.
WARNING, using this method there is no quarantine, the message in its entirety is discarded because it’s never received.
As the admin I can do that 🙂. For other users there’s sub addressing option - https://docs.mailcow.email/manual-guides/mailcow-UI/u_e-mailcow_ui-sub_addressing/ . Mailbox_address+{sometag}@domain.com. Not exactly the same as a completely random email addr, but good enough.
My typical pattern is entityname_{epoch_time}@domain.com. Where entity name is the name of the business im interacting with, epochtime is epoch time that email address was generated.
Most other spam gets blocked also at postscreen by spamhaus scores. This was discussed in a different thread and I believe you already have this implemented.