Monday, June 1, 2026

Configure mailx and Send email alert from OS ubuntu

 

# apt install mailutils

# apt install sharutils

# vi /etc/postfix/main.cf

relayhost = email.mydomain.com.kh

 

# systemctl restart postfix

 

---- change @hostname to @email.mydomain.com.kh

# vi /etc/mailutils.conf

address {

  email-domain email.mydomain.com.kh;

};

 

echo "Hello World" | mailx -s " Subject Testing" hornrim@mydomain.com.kh

No comments:

Post a Comment