Basic Postfix Setup
Below is a snippet which goes in your /etc/mail/main.cf file. This implements a good starting foundation for any of the specialized configurations specified in this section.
1. Set myhostname to the FQDN of your server. For example
myhostname=myserver.example.com
2. Add the following to your /etc/mail/main.cf file
# Allow only ourselves as mynetworks
mynetworks=127.0.0.1
# This disables the vrfy command which can be used by spammers to verify if an email addy exists
disable_vrfy_command=yes
# Be more strict about how many errors we can get before we give up on the client
smtpd_soft_error_limit=5
smtpd_hard_error_limit=10
smtpd_data_restrictions=
reject_multi_recipient_bounce,
reject_unauth_pipelining
smtpd_etrn_restrictions=
permit_mynetworks,
reject
# Require sending server helo to us
smtpd_helo_required=yes
smtpd_recipient_restrictions=
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
permit_mynetworks,
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_unauth_destination
smtpd_sender_restrictions=
reject_non_fqdn_sender,
reject_unknown_sender_domain
# Make sure envelope addies contain <>
strict_rfc821_envelopes=yes
- Login to post comments
