Question:
Steps to configure local SMTP server for on-prem control hub (For CentOS/RHEL)
Answer:
yum remove sendmail -y
yum install postfix -y
alternatives --set mta /usr/sbin/postfix
alternatives --set mta /usr/sbin/sendmail.postfixWe need to update main.cf configuration file according to the system information
vi /etc/postfix/main.cf
myhostname = mail.tecadmin.net
mydomain = tecadmin.net
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost, $mydomain
mynetworks = 127.0.0.0/8, /32
relay_domains = $mydestination
home_mailbox = Maildir/Now we'll test the our SMTP using below command
echo "My message" | mail -s subject user@server.comNow we need to update common-to-all-apps.properties file
mail.transport.protocol=smtp
mail.smtp.host=server.example.com
mail.smtp.port=25
xmail.from.address=root@example.comIn last property we need to give the source or admin mail address who is going to send mail from the server and we need to restart the DPM service
