I accidentally erased the other 2 paragraphs I had written here so. This one will be much shorter now I suppose (I'm staying away from the refresh button... :( )
I have SLES 11 (64bit) installed and fully functional. I have Nagios installed and humming along nicely. Fully configured except for notifications.
Server has postfix installed. I didn’t set it up or install it. Not sure how it got there but since it’s not configured, I need help with that. I need it to simply point to our GroupWise server and pass the messages from a fake email and have it get to my real internal email address when something bad happens in nagios. I know this is possible through our GroupWise server since I have pointed copiers to it before and given them a fake address such as ‘firstname.lastname@example.org’ and it works perfect when needing to send an email via SMTP unauthenticated. So I clearly needed to set up postfix to work with our GroupWise the same way those devices to. I thought to myself "Easy! Just set up postfix so this box can send out emails. Point this postfix at the SMTP (GroupWise) server. And it will bounce off of it internally no problem. HA!
Tried setting it up from this guide. All went fine. Then ran
rcpostfix restart. Tested it with a simple mailx command.
mailx email@example.com and typed it out. Ended it and it says it sent with no errors on the screen. Checked the /var/log/mail. The following is in there.
Nov 21 13:02:08 nagios postfix/pickup: 58906E2D2: uid=0 from=<root> Nov 21 13:02:08 nagios postfix/cleanup: 58906E2D2: message-id=<20121121180208.58906E2D2@nagios.domain.therest> Nov 21 13:02:08 nagios postfix/qmgr: 58906E2D2: from=<firstname.lastname@example.org>, size=380, nrcpt=1 (queue active) Nov 21 13:02:08 nagios postfix/local: 58906E2D2: to=<email@example.com>, relay=local, delay=0.05, delays=0.04/0/0/0.01, dsn=5.1.1, status=bounced (unknown user: "myemail") Nov 21 13:02:08 nagios postfix/cleanup: 5EA1DE2D3: message-id=<20121121180208.5EA1DE2D3@nagios.domain.therest> Nov 21 13:02:08 nagios postfix/cleanup: warning: 5EA1DE2D3: queue file size limit exceeded Nov 21 13:02:08 nagios postfix/qmgr: 58906E2D2: status=deferred (bounce failed)
So I said to myself. Well duh! I need to send it to the user that is created for nagios! The “admin” account. In /etc/nagios/objects/contacts.cfg, the user ‘admin’ is defined and then my email address is associated there. So I tried the command
mailx admin blah blah .. No change. No error message in the term windows but in the logs, same errors. So. I then said. Well. Clearly I need to have this server pointing to the SMTP server that I want right? Since this is trying to send these out, it needs something to send them through. So I put in this command
postconf -e 'relayhost = 10.50.X.X'. Tried again. No change. Still stating that user doesn’t exist. Clearly I’m missing something since I don’t want this darn thing to send it to a “user”, I want this thing to send whatever messages need to be sent out in just a general email format and have the GroupWise server pass it on! I know it can be done. I’ve seen it done!!
So I’m missing something. Any help would be wonderful guys! I can post some copies of my /etc/postfix/main.cf if needed. I can also post the output from ‘postconf’ if needed. Thanks guys!