Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Postfix to only receive email from FORWARDING_EMAIL #39

Open
katefike opened this issue Sep 21, 2022 · 0 comments
Open

Configure Postfix to only receive email from FORWARDING_EMAIL #39

katefike opened this issue Sep 21, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@katefike
Copy link
Owner

katefike commented Sep 21, 2022

Goal

Solution

  1. Add header_checks = regexp:/etc/postfix/header_checks to main.cf
  2. Create the file /etc/postfix/header_checks
  3. Add !/^From:.+@(?!dev\.kfike\.gmail\.com$)/ REJECT You are not authorized :( to header_checks
  4. 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 :("
@katefike katefike self-assigned this Oct 3, 2022
@katefike katefike added the wontfix This will not be worked on label Oct 8, 2022
@katefike katefike removed their assignment May 1, 2023
@katefike katefike added enhancement New feature or request and removed wontfix This will not be worked on labels May 22, 2024
@katefike 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant