mgamboa avatar

CIDR format table in Postfix doesn't work.

mgamboa

Published: 02 Sept 2017 › Updated: 02 Sept 2017CIDR format table in Postfix doesn't work.

CIDR format table in Postfix doesn't work.

postfix.jpg

Postfix supports CIDR tables but it is not required to run postmap command on /etc/postfix/network_table file. CIDR format is just a text format. It is not required to transform it to another format. To enable a CIDR table, create a file with the network enties which should be allowed or denied access to the mail server

cat /etc/postfix/network_table 

Rule order matters. Put more specific whitelist entries

before more general blacklist entries.

127.0.0.0/8 OK
10.0.0.0/24 OK
192.168.0.0/24 OK
172.16.0.0/24 REJECT

Add following lines in /etc/postfix/main.cf

mynetworks = cidr:/etc/postfix/network_table
smtpd_client_restrictions = cidr:/etc/postfix/network_tabl

Restart postfix service

service postfix restart

For more information on cidr_table consult the man page man cidr_table.

Leave CIDR format table in Postfix doesn't work. to:

Written by

Read more #postfix posts


Best Posts From mgamboa

We have not curated any of mgamboa's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From mgamboa