Skip to content
Discussion options

You must be logged in to vote

This is probably something you can more easily control by using a reverse proxy like Traefik, or placing both systems within a VPN (perhaps Tailscale?).

Postfix

For Postfix, you'll need to edit the /etc/postfix/master.cf config for the submission (port 587) and submissions (port 465) entries.

Restricting client by IP

There should be a line like -o smtpd_client_restrictions, you'll need to modify it to instead look like this:

-o { smtpd_client_restrictions=check_client_access cidr:{{172.16.42.10 OK}},reject }
  • The { } wrapping around most of the line there permits spaces, which AFAIK is required for check_client_access to provide the CIDR table.
  • Any other client IP would not have provided OK

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by polarathene
Comment options

You must be logged in to vote
1 reply
@polarathene
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants