...
You can do everything in PMG that you can do with plain postfix - you just need to use the templateing system to adapt the postfix configuration:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine
I hope this helps!
Thanks, that seemed to work.
A recap of the steps involved for anyone interested.
I created the
/etc/pmg/templates directory as the docs said to.
Copied
/var/lib/pmg/templates/main.cf.in to it
Edited
main.cf.in as follows
Code:
smtpd_sender_restrictions =
permit_mynetworks
reject_non_fqdn_sender
check_client_access cidr:/etc/postfix/clientaccess
check_sender_access hash:/etc/postfix/access
# check_sender_access regexp:/etc/postfix/senderaccess
I disabled
/etc/postfix/senderaccess which only had one line in it anyway and replaced it with my
/etc/postfix/access table which has 1,363 lines in it.
Then I did
postmap hash /etc/postfix/access to build the access.db database, (which you have to after each time you alter the access file).
Finally ran
pmgconfig sync --restart 1 to make the new main.cf.in template take effect.
So now in /etc/postfix/access I have a bunch of REJECT lines for most of these newer TLDs the spam is coming from.
eg.
Code:
aaa REJECT
aarp REJECT
abarth REJECT
abb REJECT
abbott REJECT
abbvie REJECT
etc.
In /var/log/mail.log I see entries that contain
Sender address rejected: Access denied instead of
Recipient address rejected: Service is unavailable (try later) which was what it was saying previously with just the blacklist regexp working, that suggests it's hitting the access.db first which is good.
If you read the Postfix access(5) man page, it's got a lot of features!
http://www.postfix.org/access.5.html