cjameson74
asked on
How to setup a Postfix server to forward to Exchange server
I have already asked this but I still cannot get it to work. What Im trying to do is forward alerts from my nagios server to my exchange server. The Nagios server has postfix installed and configured but I keep getting this message when sending
<cjameson@exchange.domains erver.net> : host 192.168.1.212[192.168.1.21 2] said:
550 5.7.1 Unable to relay (in reply to RCPT TO command)
I followed these steps
http://technet.microsoft.com/en-us/library/bb232021(EXCHG.80).aspx
But I still cannot get a relay setup correctly for some reason. Can anyone give me a headsup as to what I may be doing wrong?
<cjameson@exchange.domains
550 5.7.1 Unable to relay (in reply to RCPT TO command)
I followed these steps
http://technet.microsoft.com/en-us/library/bb232021(EXCHG.80).aspx
But I still cannot get a relay setup correctly for some reason. Can anyone give me a headsup as to what I may be doing wrong?
ASKER
No I havent tried setting it as a client, but here are the results of the conf file. I have tried to telnet to the exchange server and send a test email msg and that went thru....its only when im using mailx it gets bounced
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
default_transport = error
local_recipient_maps =
mailbox_size_limit = 0
mydestination = Monitor.DomainServer.net, localhost.DomainServer.net , localhost
myhostname = Monitor.DomainServer.net
mynetworks = 127.0.0.0/8 192.168.1.212/24
myorigin = domainserver.net
readme_directory = no
recipient_delimiter = +
relay_domains = domainserver.net
relay_transport = error
smtp_tls_session_cache_dat abase = btree:${data_directory}/sm tp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-sn akeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert- snakeoil.k ey
smtpd_tls_session_cache_da tabase = btree:${data_directory}/sm tpd_scache
smtpd_use_tls = no
transport_maps = hash:/etc/postfix/transpor t
root@Monitor:~#
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
default_transport = error
local_recipient_maps =
mailbox_size_limit = 0
mydestination = Monitor.DomainServer.net, localhost.DomainServer.net
myhostname = Monitor.DomainServer.net
mynetworks = 127.0.0.0/8 192.168.1.212/24
myorigin = domainserver.net
readme_directory = no
recipient_delimiter = +
relay_domains = domainserver.net
relay_transport = error
smtp_tls_session_cache_dat
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-sn
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-
smtpd_tls_session_cache_da
smtpd_use_tls = no
transport_maps = hash:/etc/postfix/transpor
root@Monitor:~#
in your transport file, make sure you the the following line:
exchange.domainserver.net: smtp:[ip address of your exchange server]
exchange.domainserver.net:
Also, run the following from your postfix server and post the results (replace italicized text with valid info):
-------------------------- ---------- ---------
telnet YourExchangeServer 25
helo PostfixServer
mail from: root@PostFixServer
rcpt to: YourExternal@EmailAddress. com (like gmail or yahoo)
data
From: Root
To: You
Subject: Testing Relay
message content
.
-------------------------- ---------- ---------
Make sure you don't miss that last line. (single period)
If you receive the message at your external address, then relaying is working fine and it is a postfix issue. Otherwise it should give you an error.
--------------------------
telnet YourExchangeServer 25
helo PostfixServer
mail from: root@PostFixServer
rcpt to: YourExternal@EmailAddress.
data
From: Root
To: You
Subject: Testing Relay
message content
.
--------------------------
Make sure you don't miss that last line. (single period)
If you receive the message at your external address, then relaying is working fine and it is a postfix issue. Otherwise it should give you an error.
Oh... typing too slow.
Here's a thought... do you have an MX record setup for your domain internally? If postfix is trying to use your public MX, that might be the problem.
Here's a thought... do you have an MX record setup for your domain internally? If postfix is trying to use your public MX, that might be the problem.
ASKER
I have the transport file configured like that already....
Telnet is working just fine
I received the email so it must be something else in postfix config
Telnet is working just fine
I received the email so it must be something else in postfix config
ASKER
No the MX record is at our hosted site.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Just for reference
I did get a reply here on exchange
root@Monitor:/etc/postfix# telnet exchange.domainserver.net 25
Trying 192.168.1.212...
Connected to exchange.domainserver.net.
Escape character is '^]'.
220 exchange.DomainServer.net Microsoft ESMTP MAIL Service ready at Tue, 14 Sep 2010 14:24:55 -0500
helo
250 exchange.DomainServer.net Hello [192.168.1.100]
mail from:root@monitor.domainse rver.net
250 2.1.0 Sender OK
rcpt to:cjameson@americanriskin s.com
250 2.1.5 Recipient OK
data
354 Start mail input; end with <CRLF>.<CRLF>
Testing relay
.
250 2.6.0 <a9c76d0e-9ef5-4f64-9e19-b 2a94e1eebe b@exchange .DomainSer ver.net> Queued mail for delivery
I did get a reply here on exchange
root@Monitor:/etc/postfix#
Trying 192.168.1.212...
Connected to exchange.domainserver.net.
Escape character is '^]'.
220 exchange.DomainServer.net Microsoft ESMTP MAIL Service ready at Tue, 14 Sep 2010 14:24:55 -0500
helo
250 exchange.DomainServer.net Hello [192.168.1.100]
mail from:root@monitor.domainse
250 2.1.0 Sender OK
rcpt to:cjameson@americanriskin
250 2.1.5 Recipient OK
data
354 Start mail input; end with <CRLF>.<CRLF>
Testing relay
.
250 2.6.0 <a9c76d0e-9ef5-4f64-9e19-b
You need the following (2) entries on your transport file:
.domainserver.net: smtp:[ip address of your exchange server]
domainserver.net: smtp:[ip address of your exchange server]
dont forget to postmap that transport file, restart postfix and try again.
.domainserver.net: smtp:[ip address of your exchange server]
domainserver.net: smtp:[ip address of your exchange server]
dont forget to postmap that transport file, restart postfix and try again.
It's been 4 days, how did it go?
Have you tried setting postfix to behave as a simple client?
http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client