Install Postfix to configure SMTP server. SMTP uses 25/TCP
Postfix is a free and open-source mail transfer agent (MTA) that routes and delivers electronic mail, intended as an alternative to the widely used Sendmail MTA.
Postfix is installed even if CentOS system was installed with [Minimal Install], but if Postfix is not, Install it first like follows.

[root@mail ~]# yum -y install postfix
Postfix Configuration.
[root@mail ~]# vi /etc/postfix/

# line 75: uncomment and specify hostname
myhostname =

# line 83: uncomment and specify domain name
mydomain =

# line 99: uncomment
myorigin = $mydomain

# line 116: change
inet_interfaces = all

# line 164: add
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

# line 264: uncomment and specify your local network
mynetworks =,

# line 419: uncomment (use Maildir)
home_mailbox = Maildir/

# line 574: add
smtpd_banner = $myhostname ESMTP

# add follows to the end
# limit an email size for 10M
message_size_limit = 10485760
# limit a mailbox for 1G
mailbox_size_limit = 1073741824

# for SMTP-Auth
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject

[root@mail ~]# systemctl restart postfix 
[root@mail ~]# systemctl enable postfix 

About Author:

I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Newer Post
Older Post


Post a Comment