Comments
 
posted on September 28th 2011, at 12:23
by lunarg
If you wish to restrict SMTP access via IP addresses or a network range, one way to do it would be via Postfix configuration. You can set up restrictions using a Postfix hash-table or via a cidr file. You can choose one or both methods to perform the restrictions. The end-result will be the same.

Create a text file with the addresses you would like to reject. You can choose whatever file name you wish. E.g.: /etc/postfix/smtp_client_access

Its content should be something like:

192.168.0.1 REJECT Stop mailing us192.168.0.2 REJECT Stop mailing us192.168.1 REJECT Stop mailing us

Next, postmap it by running:

postmap /etc/postfix/smtp_client_access

Then add/edit this in your main.cf:

smtpd  ...
Add a new comment
 
Your name:
Your e-mail:
Your comment:
 
Basic BBcode is supported.
Captcha:
Type the letters and numbers as shown.
/get/captcha/1713533735
Not readable? Get another.
 
 
 
 
« April 2024»
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    
 
Links
 
Quote
« When a bird does poo poo in your eye, be happy elephants don't fly. »