You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add header_checks = regexp:/etc/postfix/header_checks to main.cf
Create the file /etc/postfix/header_checks
Add !/^From:.+@(?!dev\.kfike\.gmail\.com$)/ REJECT You are not authorized :( to header_checks
Restart postfix sudo systemctl restart postfix
DONE WHEN
The MX rejects (rather than discards) any emails sent by anything other than the FORWARDING_EMAIL. The MX gives a reply like "User is not authorized :("
The text was updated successfully, but these errors were encountered:
katefike
changed the title
Configure Postfix to only receive email from one address
Configure Postfix to only receive email from FORWARDING_EMAIL
May 22, 2024
Goal
FORWARDING_EMAIL
https://www.postfix.org/header_checks.5.html
https://serverfault.com/questions/780473/postfix-header-check-regex-does-not-match-issue
Solution
header_checks = regexp:/etc/postfix/header_checks
to main.cf/etc/postfix/header_checks
!/^From:.+@(?!dev\.kfike\.gmail\.com$)/ REJECT You are not authorized :(
to header_checkssudo systemctl restart postfix
DONE WHEN
FORWARDING_EMAIL
. The MX gives a reply like "User is not authorized :("The text was updated successfully, but these errors were encountered: