Hi,
For the last few weeks I've been building a network management system using Fedora 11, Nagios and Cacti. Everything is working fine apart from getting Nagios to send email notifications and I believe the problem is with the smtp relay config i've setup.
I started out trying to use sendmail. It worked with my ISP at home but when I moved to the production environment (using a different ISP) I wasn't able to get sendmail to send anything. After reading a few threads I thought i needed to use 'masquerading'. When I tried to set it up I managed to kill sendmail - wasn't even seeing anything in maillog. Tried reinstalling sendmail and sendmail-cf with no joy and didn't know what else to do to revert back to a 'vanilla' config (having not backed up the configs...)
So, I have moved over to postfix and at least getting maillog ok now. I can successfully send mail using telnet. I can get a message through when using the following line:
mailx -s test
destaddress@domain.com -r
sourceaddress@domain.com
but it sends an email with..
To:
sourceaddress@domain.com;
-r@localhost.localdomain;
destaddress@domain.com
From:
destaddress@domain.com
Is that the corrrect syntax? If so, why is the -r@ and sourceaddress included in the to field? And why is the From field the destaddress?
When I try to send with:
mailx -s test
destaddress@domain.com
I get nothing through. I suspect my ISP is silently dropping it due to the source address being from localhost.locadomain or the like as maillog shows its accepted by the ISP's smtp server. Hence why I tried the -r option.
I'm really confused. Any pointers would be greatly appreciated! I've been battling with this for 4 days now and not sure what else to try. I'm still fairly new to linux and learning curve has been just about vertical so might need spoonfeeding a bit.
Thanks in advance.