Rejecting invalid mail for outgoing

smileluo

Member
Jan 16, 2021
41
4
13
45
1: Local exchange server connect to Proxmox Internal SMTP port: 26 for outgoing emails.
2: At /etc/postfix/invalidemail,i have such content and run postmap for /etc/postfix/invalidemail
dsfcdsf@gmail.com REJECT No such user found on the system.
sdsff@gmail.com REJECT No such user found on the system.
3: At main.cf,i add check_recipient_access hash:/etc/postfix/invalidemail to smtpd_recipient_restrictions,but it never reject emails to dsfcdsf@gmail.com
All are accepted by default,how to make it works to reject emails in the list of /etc/postfix/invalidemail
 
* why not just use the rule system for this functionality?
** create a who object with the desired destination-mail addressess
** create a rule with this object as To object and Block as action object

if you want to use the postfix solution:
3: At main.cf,i
in PMG you need to use the templateing system to change the postfix configuration:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

if this does not help/lead to the solution please post:
* the complete and rendered /etc/postfix/main.cf
* the log of such a mail passing through
 
* why not just use the rule system for this functionality?
** create a who object with the desired destination-mail addressess
** create a rule with this object as To object and Block as action object

if you want to use the postfix solution:

in PMG you need to use the templateing system to change the postfix configuration:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

if this does not help/lead to the solution please post:
* the complete and rendered /etc/postfix/main.cf
* the log of such a mail passing through
Great,it is working,tks!
 
  • Like
Reactions: Stoiko Ivanov