Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


working perfectly for the purpouse i set up ssmtp.conf so as:

i also edited the file /etc/ssmtp/revaliases so as:

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

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:<> 
Nov 22 17:47:03 certa-vm2 sSMTP[9099]: 550 You are not allowed to send mail from this address

it says and im not allowed to send mails claiming to be, its suppoused to be, what am i doing wrong? i ran out of tricks...

kind regards Adam xxxx

share|improve this question

You need to modify the nagios notification commands to pass in whatever CLI arguments mail/ssmtp is expecting to set the "from" address.

The specifics of how to do this vary by MTA, but I believe ssmtp implements a sendmail-compatible interface, so you should be able to just tack this on the end of your notification commands:

-- -f

Double-check the manpage for 'mail' to confirm that '--' lets you pass sendmail options through to the MTA, and then check the manpage for 'sendmail' to confirm that '-f' will set the "from" address.

share|improve this answer
I belive it was a PEBKAC, i didnt reboot the virtual machine after changing nagios group and it somehow started to work on its own. the -- -f option, revalaiases should replace it properly. – adam Nov 26 '12 at 7:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.