Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dedicated outbound ip for special incoming port

0 views
Skip to first unread message

Sven 'Darkman' Michels

unread,
Jul 9, 2005, 10:04:49 PM7/9/05
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

I've working on that for a while now, but haven't yet had
any success at all. What i want to do:
If mail arrives on Port 10234 use IP x.x.x.234 for all outgoing
connections. It would work if i use two postfix instances but
i would like to solve it with one. I tried using transports and
setting default_transport as option for the smtpd listening on
10234, but that doesn't work (cause default_transport isn't a
smtpd option... ;) - i played with serval configs but without
success. Could anyone give me a hint on how to do this?

Thanks and regards,
Sven Michels
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFC0IJBQoCguWUBzBwRArDdAJ93ZogFnlou5XsYU/lgs2UNKuHiLgCgjSvE
LyLCdwOKYjuDlLG2IgCnPjI=
=GdQe
-----END PGP SIGNATURE-----

Victor Duchovni

unread,
Jul 10, 2005, 9:34:50 AM7/10/05
to
On Sun, Jul 10, 2005 at 04:04:49AM +0200, Sven 'Darkman' Michels wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there,
>
> I've working on that for a while now, but haven't yet had
> any success at all. What i want to do:
> If mail arrives on Port 10234 use IP x.x.x.234 for all outgoing
> connections. It would work if i use two postfix instances but
> i would like to solve it with one. I tried using transports and
> setting default_transport as option for the smtpd listening on
> 10234, but that doesn't work (cause default_transport isn't a
> smtpd option... ;) - i played with serval configs but without
> success. Could anyone give me a hint on how to do this?
>

Your choices are content_filter, FILTER directives in access(5) tables
or address rewriting. You have not actually described the problem that
motivates your solution. My view is that multiple instances are simpler,
and one needs a good reason to *not* use them.

--
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:majo...@postfix.org?body=unsubscribe%20postfix-users>

Sven 'Darkman' Michels

unread,
Jul 10, 2005, 10:14:04 AM7/10/05
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Victor,

Victor Duchovni wrote:
| Your choices are content_filter, FILTER directives in access(5) tables
| or address rewriting. You have not actually described the problem that
| motivates your solution. My view is that multiple instances are simpler,
| and one needs a good reason to *not* use them.

Well, the setup is like that we've an application running on the box
which injects mail on a special port to the postfix system. Since the
mail should 'nearly' processed the same like all other messages on
the box, i would like to avoid the multiple instances setup. The only
thing we need is to use another ip on outgoing connections for
accounting issues (ip wise...).

Thanks for you reply, regards
Sven


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFC0S0rQoCguWUBzBwRAuE8AJwMtXgsEzGHQtmq5tgMCMh7dn2CRwCbBOYz
hZ6AHp0USl89ERDvUH9ZicU=
=hTF+
-----END PGP SIGNATURE-----

Wietse Venema

unread,
Jul 10, 2005, 1:05:52 PM7/10/05
to
Sven 'Darkman' Michels:

> Hi Victor,
>
> Victor Duchovni wrote:
> | Your choices are content_filter, FILTER directives in access(5) tables
> | or address rewriting. You have not actually described the problem that
> | motivates your solution. My view is that multiple instances are simpler,
> | and one needs a good reason to *not* use them.
>
> Well, the setup is like that we've an application running on the box
> which injects mail on a special port to the postfix system. Since the
> mail should 'nearly' processed the same like all other messages on
> the box, i would like to avoid the multiple instances setup. The only
> thing we need is to use another ip on outgoing connections for
> accounting issues (ip wise...).
>
> Thanks for you reply, regards
> Sven

In that case, configure the non-standard SMTPD process to
add a FILTER record:

/etc/postfix/master.cf:
12345 ... smtpd -o content_filter=foo:

where foo is a master.cf entry with a non-standard SMTP client:

/etc/postfix/master.cf:
foo ... smtp -o smtp_bind_address=1.2.3.4

However, this does not necessarily mean that the mail will leave
the machine via a specific network interface.

It only sets the source IP address; it does NOT specify the network
interface. The network interface is chosen by the kernel on the
basis of information in routing tables. If your default route points
to a different interface, then the packets will be sent there.

Wietse

0 new messages