Solved

Trying to send nagios messages to my exchange

Posted on 2010-09-13
10
1,371 Views
Last Modified: 2012-05-10
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?
0
Comment
Question by:cjameson74
  • 5
  • 5
10 Comments
 
LVL 7

Expert Comment

by:CompanionCube
ID: 33666333
Can you tell us whether or not if the postfix queue is holding the email messages?
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
0
 
LVL 7

Expert Comment

by:CompanionCube
ID: 33666361
0
 
LVL 1

Author Comment

by:cjameson74
ID: 33666490
Maillog

Sep 13 12:36:40 Monitor postfix/error[9505]: 79C054AFB8: to=<cjameson@americanriskins.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.814714AFC3@Monitor.DomainServer.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.DomainServer.net>, 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
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 7

Expert Comment

by:CompanionCube
ID: 33666776
add americanriskins.com to /etc/postfix/local-host-names 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.DomainServer.net
rcpt to: cjameson@americanriskins.com
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
0
 
LVL 1

Author Comment

by:cjameson74
ID: 33667121
I do not have a file called  /etc/postfix/local-host-names
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...
0
 
LVL 1

Author Comment

by:cjameson74
ID: 33674371
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.
0
 
LVL 1

Author Comment

by:cjameson74
ID: 33674581
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.5F7AD48031@Monitor.DomainServer.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.DomainServer.net>
Sep 14 12:09:38 Monitor postfix/cleanup[933]: 89A0047FD7: message-id=<1284484178.926@Monitor.DomainServer.net>
Sep 14 12:09:38 Monitor postfix/qmgr[1101]: 89A0047FD7: from=<root@Monitor.DomainServer.net>, size=606, nrcpt=1 (queue active)
Sep 14 12:09:38 Monitor postfix/error[936]: 89A0047FD7: to=<cjameson@americanriskins.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.9B24748031@Monitor.DomainServer.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.9B24748031@Monitor.DomainServer.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.DomainServer.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.domainserver.net>, orig_to=<root@Monitor.DomainServer.net>, relay=192.168.1.212[192.168.1.212]:25, 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.212] 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
0
 
LVL 1

Author Comment

by:cjameson74
ID: 33674634
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?
0
 
LVL 7

Accepted Solution

by:
CompanionCube earned 500 total points
ID: 33674905
Creating a Receive Connector that Grants Anonymous Relay to Specific Source IP Addresses
http://technet.microsoft.com/en-us/library/bb232021%28EXCHG.80%29.aspx

0
 
LVL 7

Expert Comment

by:CompanionCube
ID: 33674914
You would create a new connector and set it to relay only for your specified linux server.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question