cjameson74
asked on
Trying to send nagios messages to my exchange
I just finished setting up a Nagios server and configured it. I installed Postfix and setup relaying to the exchange 07 box. But I followed the instructions outlined in here http://msexchangeteam.com/archive/2006/12/28/432013.aspx
and I could not still send messages. How do I forward messages from root on Postfix to a particular user on exchange? What do I specify?
and I could not still send messages. How do I forward messages from root on Postfix to a particular user on exchange? What do I specify?
more on Postfix logs
http://postfixmail.com/blog/index.php/postfix-logs/
more on Postfix queues
http://postfixmail.com/blog/index.php/queue-management/
http://postfixmail.com/blog/index.php/postfix-logs/
more on Postfix queues
http://postfixmail.com/blog/index.php/queue-management/
ASKER
Maillog
Sep 13 12:36:40 Monitor postfix/error[9505]: 79C054AFB8: to=<cjameson@americanriski ns.com>, relay=none, delay=0.04, delays=0.02/0/0/0.01, dsn=5.0.0, status=bounced (americanriskins.com)
Sep 13 12:36:40 Monitor postfix/cleanup[9502]: 814714AFC3: message-id=<20100913173640 .814714AFC 3@Monitor. DomainServ er.net>
Sep 13 12:36:40 Monitor postfix/qmgr[1180]: 814714AFC3: from=<>, size=2251, nrcpt=1 (queue active)
Sep 13 12:36:40 Monitor postfix/bounce[9506]: 79C054AFB8: sender non-delivery notification: 814714AFC3
Sep 13 12:36:40 Monitor postfix/qmgr[1180]: 79C054AFB8: removed
Sep 13 12:36:40 Monitor postfix/local[9508]: 814714AFC3: to=<cjameson@Monitor.Domai nServer.ne t>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 13 12:36:40 Monitor postfix/qmgr[1180]: 814714AFC3: removed
I do see them coming in the queue but seems like they dont really go anywhere
PS I can telnet into exchange just fine on port 25
Sep 13 12:36:40 Monitor postfix/error[9505]: 79C054AFB8: to=<cjameson@americanriski
Sep 13 12:36:40 Monitor postfix/cleanup[9502]: 814714AFC3: message-id=<20100913173640
Sep 13 12:36:40 Monitor postfix/qmgr[1180]: 814714AFC3: from=<>, size=2251, nrcpt=1 (queue active)
Sep 13 12:36:40 Monitor postfix/bounce[9506]: 79C054AFB8: sender non-delivery notification: 814714AFC3
Sep 13 12:36:40 Monitor postfix/qmgr[1180]: 79C054AFB8: removed
Sep 13 12:36:40 Monitor postfix/local[9508]: 814714AFC3: to=<cjameson@Monitor.Domai
Sep 13 12:36:40 Monitor postfix/qmgr[1180]: 814714AFC3: removed
I do see them coming in the queue but seems like they dont really go anywhere
PS I can telnet into exchange just fine on port 25
add americanriskins.com to /etc/postfix/local-host-na mes and restart Postfix?
~~~
check your main.cf file...
Is your "smtpd_use_tls" set to "yes"? set it to "no" and save
" Whenever you make a change to the main.cf or master.cf file, execute the following command as root in order to refresh a running mail system:
# postfix reload
"
http://www.postfix.org/BASIC_CONFIGURATION_README.html
~~~
When using the telnet test from your server, were you able to generate a test email to "cjameson@americanriskins. com"?
use the following to test...
telnet <ip> 25
helo 1234
mail from: cjameson@Monitor.DomainSer ver.net
rcpt to: cjameson@americanriskins.c om
data
"test test test"
.
quit
~~~
in general, if you make a mistake on a line during telnet 25 test, don't use backspace to correct it; just start another line and try again
let us know
~~~
check your main.cf file...
Is your "smtpd_use_tls" set to "yes"? set it to "no" and save
" Whenever you make a change to the main.cf or master.cf file, execute the following command as root in order to refresh a running mail system:
# postfix reload
"
http://www.postfix.org/BASIC_CONFIGURATION_README.html
~~~
When using the telnet test from your server, were you able to generate a test email to "cjameson@americanriskins.
use the following to test...
telnet <ip> 25
helo 1234
mail from: cjameson@Monitor.DomainSer
rcpt to: cjameson@americanriskins.c
data
"test test test"
.
quit
~~~
in general, if you make a mistake on a line during telnet 25 test, don't use backspace to correct it; just start another line and try again
let us know
ASKER
I do not have a file called /etc/postfix/local-host-na mes
Is there another file I need to edit?
I am running on Ubuntu
Also the telnet test worked
Took a few minutes but ya worked ok...
Is there another file I need to edit?
I am running on Ubuntu
Also the telnet test worked
Took a few minutes but ya worked ok...
ASKER
How do I send a message to a certain email address to an exchange server. I know the sending part works fine from the Postfix end...but do I need to setup an alias from the root user? Or how does that work? Basically I just want anything from the nagios alert box to send directly to my email address.
ASKER
Can anyone tell me why sending an email its never getting to the destination seems it goes nowhere
Sep 14 12:03:06 Monitor postfix/cleanup[32667]: 5F7AD48031: message-id=<20100914170306 .5F7AD4803 1@Monitor. DomainServ er.net>
Sep 14 12:03:06 Monitor postfix/qmgr[1101]: 5F7AD48031: from=<>, size=2359, nrcpt=1 (queue active)
Sep 14 12:03:06 Monitor postfix/bounce[32671]: 533D547FD7: sender non-delivery notification: 5F7AD48031
Sep 14 12:03:06 Monitor postfix/qmgr[1101]: 533D547FD7: removed
Sep 14 12:03:06 Monitor postfix/error[331]: 5F7AD48031: to=<root@domainserver.net> , relay=none, delay=0.02, delays=0.01/0/0/0.01, dsn=5.0.0, status=bounced (domainserver.net)
Sep 14 12:03:06 Monitor postfix/qmgr[1101]: 5F7AD48031: removed
Sep 14 12:09:38 Monitor postfix/pickup[28220]: 89A0047FD7: uid=0 from=<root@Monitor.DomainS erver.net>
Sep 14 12:09:38 Monitor postfix/cleanup[933]: 89A0047FD7: message-id=<1284484178.926 @Monitor.D omainServe r.net>
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: 89A0047FD7: from=<root@Monitor.DomainS erver.net> , size=606, nrcpt=1 (queue active)
Sep 14 12:09:38 Monitor postfix/error[936]: 89A0047FD7: to=<cjameson@americanriski ns.com>, relay=none, delay=0.11, delays=0.06/0.01/0/0.03, dsn=5.0.0, status=bounced (americanriskins.com)
Sep 14 12:09:38 Monitor postfix/cleanup[933]: 9B24748031: message-id=<20100914170938 .9B2474803 1@Monitor. DomainServ er.net>
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: 9B24748031: from=<>, size=2444, nrcpt=1 (queue active)
Sep 14 12:09:38 Monitor postfix/bounce[937]: 89A0047FD7: sender non-delivery notification: 9B24748031
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: 89A0047FD7: removed
Sep 14 12:09:38 Monitor postfix/cleanup[933]: AA56647FC1: message-id=<20100914170938 .9B2474803 1@Monitor. DomainServ er.net>
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: AA56647FC1: from=<>, size=2593, nrcpt=1 (queue active)
Sep 14 12:09:38 Monitor postfix/local[940]: 9B24748031: to=<root@Monitor.DomainSer ver.net>, relay=local, delay=0.07, delays=0.01/0.05/0/0.01, dsn=2.0.0, status=sent (forwarded as AA56647FC1)
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: 9B24748031: removed
Sep 14 12:09:43 Monitor postfix/smtp[943]: AA56647FC1: to=<cjameson@exchange.doma inserver.n et>, orig_to=<root@Monitor.Doma inServer.n et>, relay=192.168.1.212[192.16 8.1.212]:2 5, delay=5.1, delays=0.01/0.06/0.02/5, dsn=5.7.1, status=bounced (host 192.168.1.212[192.168.1.21 2] said: 550 5.7.1 Unable to relay (in reply to RCPT TO command))
Sep 14 12:09:53 Monitor postfix/qmgr[1101]: AA56647FC1: removed
Sep 14 12:03:06 Monitor postfix/cleanup[32667]: 5F7AD48031: message-id=<20100914170306
Sep 14 12:03:06 Monitor postfix/qmgr[1101]: 5F7AD48031: from=<>, size=2359, nrcpt=1 (queue active)
Sep 14 12:03:06 Monitor postfix/bounce[32671]: 533D547FD7: sender non-delivery notification: 5F7AD48031
Sep 14 12:03:06 Monitor postfix/qmgr[1101]: 533D547FD7: removed
Sep 14 12:03:06 Monitor postfix/error[331]: 5F7AD48031: to=<root@domainserver.net>
Sep 14 12:03:06 Monitor postfix/qmgr[1101]: 5F7AD48031: removed
Sep 14 12:09:38 Monitor postfix/pickup[28220]: 89A0047FD7: uid=0 from=<root@Monitor.DomainS
Sep 14 12:09:38 Monitor postfix/cleanup[933]: 89A0047FD7: message-id=<1284484178.926
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: 89A0047FD7: from=<root@Monitor.DomainS
Sep 14 12:09:38 Monitor postfix/error[936]: 89A0047FD7: to=<cjameson@americanriski
Sep 14 12:09:38 Monitor postfix/cleanup[933]: 9B24748031: message-id=<20100914170938
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: 9B24748031: from=<>, size=2444, nrcpt=1 (queue active)
Sep 14 12:09:38 Monitor postfix/bounce[937]: 89A0047FD7: sender non-delivery notification: 9B24748031
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: 89A0047FD7: removed
Sep 14 12:09:38 Monitor postfix/cleanup[933]: AA56647FC1: message-id=<20100914170938
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: AA56647FC1: from=<>, size=2593, nrcpt=1 (queue active)
Sep 14 12:09:38 Monitor postfix/local[940]: 9B24748031: to=<root@Monitor.DomainSer
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: 9B24748031: removed
Sep 14 12:09:43 Monitor postfix/smtp[943]: AA56647FC1: to=<cjameson@exchange.doma
Sep 14 12:09:53 Monitor postfix/qmgr[1101]: AA56647FC1: removed
ASKER
Ok I answered my own question ...
550 5.7.1 Unable to relay (in reply to RCPT TO command))
The thing is I setup custom connectors on my exchange server 07 already...not sure why they wouldnt be working. Do I need to set this up on the default connnector? We have like 3 or 4 of them. I just dont want to open it all up (the default connector) and allow spam in thats all. Any suggestions?
550 5.7.1 Unable to relay (in reply to RCPT TO command))
The thing is I setup custom connectors on my exchange server 07 already...not sure why they wouldnt be working. Do I need to set this up on the default connnector? We have like 3 or 4 of them. I just dont want to open it all up (the default connector) and allow spam in thats all. Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You would create a new connector and set it to relay only for your specified linux server.
Is there any indication of errors or otherwise in the logs?
http://www.postfix.org/BASIC_CONFIGURATION_README.html#syslog_howto
Also, can you test using telnet?
telnet <ip of E2K7> 25
HELO 1234
does it connect to your Exchange server? Or is it blocked?
http://technet.microsoft.com/en-us/library/bb123686.aspx
http://www.messagingtalk.org/how-to-test-smtp-communication-using-telnet