Sample Postfix main.cf SMTP Restrictions Settings

Mindwatering Incorporated

Author: Tripp W Black

Created: 07/20/2009 at 06:38 PM

 

Category:
Linux
Mail

Settings below are common settings for restricted mail. Saved as a quick reference for use/look-up when configuring new postfix servers.

Recipient restrictions:
- "sendto" restrictions - restrictions for the e-mail address being received.

Client restrictions:
- helo command restrictions and the client machine (server/client) connecting via SMTP.

Sender restrictions:
- from restrictions - restrictions of the sender e-mail address sending the mail.

________________________

disable_vrfy_command = yes
smtpd_helo_required = yes
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_pipelining,
reject_unknown_recipient_domain,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unauth_destination
smtpd_client_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_rbl_client relays.ordb.org,
reject_rbl_client ipwhois.rfc-ignorant.org
smtpd_sender_restrictions =
permit_mynetworks,
reject_rhsbl_sender dsn.rfc-ignorant.org,
permit_sasl_authenticated,
reject_sender_login_mismatch
# Setup a spam tarpit...
smtpd_error_sleep_time = 60
smtpd_soft_error_limit = 60
smtpd_hard_error_limit = 10
default_process_limit = 3

Note:
Some of these settings could also already be set in the server's master.cf file. Check before you add.


previous page

×