Centos 5.xx Nagios sSMTP mail cannot be sent from nagios server, but works great from console
- by adam
I spent last 3 hours of reasearch on how to get nagios to work with email notifications,
i need to send emails form work where the only accesible smtp server is the company's one.
i managed to get it done from the console using:
mail [email protected]
working perfectly
for the purpouse i set up ssmtp.conf so as:
[email protected]
mailhub=smtp.company.com:587
[email protected]
AuthPass=mypassword
FromLineOverride=YES
useSTARTTLS=YES
rewriteDomain=company.pl
hostname=nagios
UseTLS=YES
i also edited the file /etc/ssmtp/revaliases so as:
root:[email protected]:smtp.company.com:587
nagios:[email protected]:smtp.company.com:587
nagiosadmin:[email protected]:smtp.company.com:587
i also edited the file permisions for /etc/ssmtp/* so as:
-rwxrwxrwx 1 root nagios 371 lis 22 15:27 /etc/ssmtp/revaliases
-rwxrwxrwx 1 root nagios 1569 lis 22 17:36 /etc/ssmtp/ssmtp.conf
and i assigned to proper groups i belive:
cat /etc/group |grep nagios
mail:x:12:mail,postfix,nagios
mailnull:x:47:nagios
nagios:x:2106:nagios
nagcmd:x:2107:nagios
when i send mail manualy, i recieve it on my priv box, but when i send mail from nagios the mail log says:
Nov 22 17:47:03 certa-vm2 sSMTP[9099]: MAIL FROM:<[email protected]>
Nov 22 17:47:03 certa-vm2 sSMTP[9099]: 550 You are not allowed to send mail from this address
it says [email protected] and im not allowed to send mails claiming to be [email protected], its suppoused to be [email protected], what am i doing wrong? i ran out of tricks...
kind regards
Adam xxxx