Configure SMTP for on-prem control-hub (For CentOS/RHEL).

  • 27 January 2022
  • 0 replies
  • 26 views

Userlevel 3

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.postfix

We 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.com

 Now 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.com

In 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


0 replies

Be the first to reply!

Reply