Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restrict incoming delivery to whitelist

Status
Not open for further replies.

agjones

Technical User
Apr 25, 2003
4
US
I have an external service that is acting as MX/SPAM/Virus filter and store /forward when our internet connection is down. I want my postfix rig to only receive delivery from the list of servers that the external service runs.

How do I create a restriction that allows inbound connection only from my list of IPs?

Thanks
 
You want to use smtpd_client_restrictions. See the example in /etc/postfix/access for more information.
 
Thanks for the tip. I am a total postfix noob. So I don't think the /etc/postfix/access is clearing things up for me! ;->

I did some reading here:
that helped clarify too.

I don't want any machine in the world to successfully connect for inbound delivery...except:

1.1.1.1 OK
2.2.2.2 OK
3.3.3.3 OK

but how do I say REJECT everythings else

and do I have to do something w/ postmap to make it happen?

Big Thanks.
 
Yes, you should postmap /etc/postfix/access to generate /etc/postfix/access.db. Main.cf should have a line like the following:

smtpd_client_restrictions = check_client_access hash:/etc/postfix/access, reject

This will allow those hosts listed as OK in access.db, while denying everything else.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top