"Exim-convert" trying to be clever.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

"Exim-convert" trying to be clever.

Jan Johansson-7
I am trying to duplicate a solution from Exim in Postfix to "get to
know" postfix, but I am unsure to start.
What I have is a slightly unusual gateway platform, which relays mail to
external smart hosts from a few internal mail servers (Both exchange and
notes).

It also acts as an "inbound smart host" (the machine is running OpenVPN
to connect to a remote site, and the remote machine pushes mail for
Domain-A.com and Domain-B.com through that tunnel)

But there is a twist: I need to be able to route based on the IP of the
sending server.

I have figured out that usint transport mapping

Domain-A.com smtp:[192.168.0.201]
Domain-B.com smtp:[192.168.0.203]

Works fine for incoming mail.

BUT for outgoing, I would need to relay everything that comes from
192.168.0.203 to the smart host 172.31.254.68

Can this be done in Postfix?

--
Meddelandet har kontrollerats mot virus samt skadligt
innehåll av MailScanner och förmodas vara säkert.

Reply | Threaded
Open this post in threaded view
|

"Exim-convert" trying to be clever.

Jan Johansson-7
(If this becomes a double post, I am sorry, but I think I sent my
previous post before my subscription had been confirmed)

I am trying to duplicate a solution from Exim in Postfix to "get to
know" postfix, but I am unsure to start.
What I have is a slightly unusual gateway platform, which relays mail to
external smart hosts from a few internal mail servers (Both exchange and
notes).

It also acts as an "inbound smart host" (the machine is running OpenVPN
to connect to a remote site, and the remote machine pushes mail for
Domain-A.com and Domain-B.com through that tunnel)

But there is a twist: I need to be able to route based on the IP of the
sending server.

I have figured out that usint transport mapping

Domain-A.com smtp:[192.168.0.201]
Domain-B.com smtp:[192.168.0.203]

Works fine for incoming mail.

BUT for outgoing, I would need to relay everything that comes from
192.168.0.203 to the smart host 172.31.254.68

Can this be done in Postfix?

--
Meddelandet har kontrollerats mot virus samt skadligt
innehåll av MailScanner och förmodas vara säkert.

Reply | Threaded
Open this post in threaded view
|

Re: "Exim-convert" trying to be clever.

Victor Duchovni
In reply to this post by Jan Johansson-7
On Tue, Jun 03, 2008 at 10:44:16PM +0200, Jan Johansson wrote:

> I am trying to duplicate a solution from Exim in Postfix to "get to
> know" postfix, but I am unsure to start.
> What I have is a slightly unusual gateway platform, which relays mail to
> external smart hosts from a few internal mail servers (Both exchange and
> notes).
>
> It also acts as an "inbound smart host" (the machine is running OpenVPN
> to connect to a remote site, and the remote machine pushes mail for
> Domain-A.com and Domain-B.com through that tunnel)
>
> But there is a twist: I need to be able to route based on the IP of the
> sending server.
>
> I have figured out that usint transport mapping
>
> Domain-A.com smtp:[192.168.0.201]
> Domain-B.com smtp:[192.168.0.203]
>
> Works fine for incoming mail.
>
> BUT for outgoing, I would need to relay everything that comes from
> 192.168.0.203 to the smart host 172.31.254.68
>
> Can this be done in Postfix?

    smtpd_client_restrictions =
        check_client_access cidr:/etc/postfix/nexthop.cidr

nexthop.cidr:
        192.168.0.203 FILTER smtp:[172.31.254.68]

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[hidden email]?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
Reply | Threaded
Open this post in threaded view
|

RE: "Exim-convert" trying to be clever.

Jan Johansson-7
>> Can this be done in Postfix?
>
>    smtpd_client_restrictions =
> check_client_access cidr:/etc/postfix/nexthop.cidr
>
>nexthop.cidr:
> 192.168.0.203 FILTER smtp:[172.31.254.68]

So simple, so clean, so... perfect.

Thank you!

--
Meddelandet har kontrollerats mot virus samt skadligt
innehåll av MailScanner och förmodas vara säkert.