Maybe I missed this before, but you have a firewall in between that is blocking the connection on port 25? If that is the case, this port needs to get opened, or it doesn't matter how much configuration on either nagios or exchange is done, it will never work.
@sreinhardt: Firewall blocks on port 25 because nagios tries to send mails through external mail address and i don't want this. I am at the same network with exchange server, i can ping and telnet to IP but not the name of the exchange server.
Just for clarity's sake: the emails are being routed externally, correct? While you need them to remain internal? Do the fqdn server names in your "destination" directive resolve to external ip addresses? If they do, they will be routed externally. Does your exchange server have an internal name/address?
@abrist: Yes, i need them to remain internal. I have the name of the server.
As i explain to sreinhardt, when i ping to the name of the server i have a result:
ping: unknown host
What i am missing?
Edit: Maybe this is useful: When i install postfix, i have install it as
Internet Site. Is this tight or not?
Thanks for your interesting guys
Edit 2: Finally works:
Code: Select all
myhostname = ubuntu_server_name
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mymailserver.mydomain.net, nagios.notify-gr, ubuntu_server_name, localhost.localdomain, localhost
relayhost = My_Exchange_IP
mynetworks = ***.***.***.***/24
mydomain = mydomain.net
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all