SLES 15
Sponsored Link

Postfix : Install
2019/01/24
 
Install Postfix to configure SMTP server.
[1] Install Postfix.
mail:~ #
zypper -n install postfix
[2] This example shows to configure SMTP-Auth to use Dovecot's SASL function.
# rename to disable because

mail:~ #
mv /etc/sysconfig/postfix /etc/sysconfig/postfix.org
mail:~ #
vi /etc/postfix/main.cf
# line 110: uncomment and specify domain name

mydomain =
srv.world
# line 126: uncomment

myorigin = $mydomain
# line 287: uncomment and specify local network

mynetworks = 127.0.0.0/8,
10.0.0.0/24
# line 442: uncomment to move Maildir

home_mailbox = Maildir/
# line 705: change

inet_interfaces =
all
# line 710: add

mydestination = $myhostname, localhost.$mydomain
, localhost, $mydomain
# line 711: specify hostname

myhostname =
mail.srv.world
# line 725,726

# limit mailbox size if need (example below means 1G limit)

mailbox_size_limit =
1073741824

# limit message size if need (example below means 10M limit)

message_size_limit =
10485760
# line 738: change

smtpd_recipient_restrictions =
permit_mynetworks, permit_auth_destination, permit_sasl_authenticated, reject

# line 744: change and add

smtpd_sasl_auth_enable =
yes

smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
mail:~ #
systemctl start postfix

mail:~ #
systemctl enable postfix

[3] If Firewalld is running, allow SMTP service. SMTP uses 25/TCP.
mail:~ #
firewall-cmd --add-service=smtp --permanent

success
mail:~ #
firewall-cmd --reload

success
Matched Content