On Wed, May 4, 2011 at 1:01 PM, Jeroen Geilman <jer...@adaptr.nl> wrote:
> On 05/04/2011 09:36 PM, Christopher Adams wrote:
>>
>> Hello,
>>
>> I am attempting to get Postfix working as a relay to an Exchange 2010
>> server in the same subnet. The incoming mail may originate from the
>> same subnet, but it all goes through a central server that is outside
>> the subnet. I am doing this for troubleshooting connections between
>> the central server and the Exchange server, so it is only temporary.
>>
>> The outside server would route mail through the server running
>> Postfix, which would then relay to the Exchange server.
>>
>> To get the results that I want, without planning for a permanent setup
>> to relay to Exchange, what Postfix configuration parameters do I need
>> to set?
>>
>> These are the parameters that I am guessing have to be tinkered with
>> and I have added some values, but am unsure about if I need to do
>> anything with the others. Since I don't want mail to be delivered
>> locally on the Postfix server, I am assuming that mydestination should
>> be empty?
>>
>
> When doing this sort of man-in-the-middle magic you need to consider all
> worst-case scenarios.
> These definitely include exchange being down and your postfix box queueing
> the external mail.
> Have you considered what should happen in that case ?
>
>> relay_domains = $mydestination, ip.of.outside.mailserver
>
> ...no, relay_domains contains the domains you wish to relay mail FOR.
> In this case, the domains configured on the Exchange server and coming in
> via the external MTA.
>
>> mydestination = (empty)
>
> You want mydestination set to the resolvable name of this postfix server,
> or, at a minimum, to "localhost".
>
> If you set it explicitly to empty then no mail can ever be delivered locally
> - including system mail to root or postmaster.
>
>> myorigin
>
> Is not directly involved in your setup, and defaults to $myhostname (which
> should be fine).
>
>> relayhost = [exchange.server.ip]
>
> Note that this will send ALL mail to Exchange, not just the mail you receive
> from the external MTA.
>
>> Thanks for getting me started in the right direction.
>
> Please start here, and work your way up:
>
> http://www.postfix.org/BASIC_CONFIGURATION_README.html
>
>
>
> --
> J.
>
>

Hello all,

I have tinkered with getting Postfix to relay mail from an external
(to the Exchange subnet) server to an Exchange 2010 server. I have not
done any real tests yet, as this mail is all our organization mail and
I want to get it right. Also, this is a temporary setup to try to
troubleshoot some issues between the external server and Exchange. I
have included the current output from postconf -n below.

FYI - the external mail server(s) are in the subnet 159.121.109.0/24,
the Exchange server accepts mail at 159.121.122.30 and 159.121.122.44,
and the Postfix server is 159.121.122.15/hpl.osl.state.or.us. I set up
a transport_map with the two ips for the Exchange server like this.
Not sure if that is correct, but then I have questions about much of
this. I would appreciate helpful comments that could get me further
along. Thanks.

Transport:
oslmail.osl.state.or.us relay:[159.121.122.30]
oslexchange.osl.state.or.us.local relay:[159.121.122.44]


postconf -n output:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 5
debug_peer_list = hpl.osl.state.or.us
default_privs = nobody
html_directory = no
inet_interfaces = $myhostname, localhost
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 10000000
mydestination = $myhostname, localhost.$mydomain, localhost, hpl.$mydomain
mydomain = osl.state.or.us
myhostname = hpl.osl.state.or.us
mynetworks = 159.121.122.0/24, 127.0.0.0/8, 159.121.109.41,
159.121.109.42, 159.121.109.43, 159.121.109.44, 159.121.105.151
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relay_domains = $mydestination, 159.121.122.30, 159.121.122.44,
159.121.109.41, 159.121.109.42, 150.121.109.43, 159.121.109.44,
159.121.105.151
relayhost =
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks,    check_relay_domains
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550



-- 
Christopher Adams
adam...@gmail.com

Reply via email to