Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Setting smtp_bind_address based on smtpd received address
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ronan Mullally  
View profile  
 More options Oct 2 2005, 10:47 am
Newsgroups: list.postfix.users
From: Ronan Mullally <ro...@iol.ie>
Date: Sun, 2 Oct 2005 15:47:59 +0100 (BST)
Local: Sun, Oct 2 2005 10:47 am
Subject: Setting smtp_bind_address based on smtpd received address
I've got a project coming up which needs some careful IP accounting for
traffic into/out of the system.  The trickiest part of this strikes me
as being differentiating outbound SMTP data so that traffic from
particular sources can be measured seperately.

Outbound SMTP traffic will be submitted to mail.abc.com, mail.def.com,
..., mail.xyz.com depending on user in question.  Mail.*.com will be a
virtual server.  The various mail.*.com virtual servers will all be
served by the same set of real hosts behind a load-balancer.

To keep traffic measurement simple I'd like to measure this traffic at
an IP level - either from individual (sub-)interfaces, or from the
load-balancer.  My preference is the latter.  In order to associate the
outbound traffic with the correct virtual-server I'll need the outbound
SMTP sessions, to originate connections from particular IP addresses.

I can accomplish this by running multiple instances of postfix, each
with its own configuration and queues, but I'd rather find a more elegant
approach.  What I ideally need is some may of setting the smtp_bind_address
for a relayed message based on the interface upon which smtpd received the
message.

I've had a look at using one postfix instance, and binding smtpd on
different addresses / ports, but I can't see how I can enfore a particular
source address for outbound messages.  I've tried '-o smtp_bind_address'
in the master.cf definition of each smtpd listener, but it doesn't appear
to work (not surprisingly, it's an SMTP client option, not a daemon
option).

Another possibility might be to try and put messages from each of the
various smtpd listeners into different queues, which are then delivered
by smtp clients configured with queue-specific source addresses, but I
haven't looked into that properly yet.

Just to complicate matters even more, content filtering will be thrown
into the loop as well, but that's another story...

Has anybody done this before?  Are multiple postfix instances the only
way to achieve it?  Might something other than postfix be a better fit?

Thanks in advance,

-Ronan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Magnus Bäck  
View profile  
 More options Oct 2 2005, 2:40 pm
Newsgroups: list.postfix.users
From: Magnus Bäck <mag...@dsek.lth.se>
Date: Sun, 2 Oct 2005 20:40:36 +0200
Local: Sun, Oct 2 2005 2:40 pm
Subject: Re: Setting smtp_bind_address based on smtpd received address
On Sunday, October 02, 2005 at 16:47 CEST,
     Ronan Mullally <ro...@iol.ie> wrote:

[...]

> I can accomplish this by running multiple instances of postfix, each
> with its own configuration and queues, but I'd rather find a more
> elegant approach.  What I ideally need is some may of setting the
> smtp_bind_address for a relayed message based on the interface upon
> which smtpd received the message.

Not possible with a single Postfix instance. Postfix supports routing
based on the recipient address, nothing else.

But sure, it might theoretically be possible with one or two Postfix
instances using some really gross access map hacks, but then you'd be
way better off with one instance per domain.

> I've had a look at using one postfix instance, and binding smtpd on
> different addresses / ports, but I can't see how I can enfore a
> particular source address for outbound messages.  I've tried '-o
> smtp_bind_address' in the master.cf definition of each smtpd listener,
> but it doesn't appear to work (not surprisingly, it's an SMTP client
> option, not a daemon option).

Exactly.

> Another possibility might be to try and put messages from each of
> the various smtpd listeners into different queues, which are then
> delivered by smtp clients configured with queue-specific source
> addresses, but I haven't looked into that properly yet.

Do you by any chance have a sendmail background? Postfix doesn't have
such a concept of multiple queues, so you don't have to look into it.

[...]

--
Magnus Bäck
mag...@dsek.lth.se


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ronan Mullally  
View profile  
 More options Oct 3 2005, 4:25 am
Newsgroups: list.postfix.users
From: Ronan Mullally <ro...@iol.ie>
Date: Mon, 3 Oct 2005 09:25:25 +0100 (BST)
Local: Mon, Oct 3 2005 4:25 am
Subject: Re: Setting smtp_bind_address based on smtpd received address

On Sun, 2 Oct 2005, MagnusBäck wrote:
> But sure, it might theoretically be possible with one or two Postfix
> instances using some really gross access map hacks, but then you'd be
> way better off with one instance per domain.

Given a choice between gross hacks and multiple instances I'll be going
with multiple instances (or extracting the info from the mail logs).

> > Another possibility might be to try and put messages from each of
> > the various smtpd listeners into different queues, which are then
> > delivered by smtp clients configured with queue-specific source
> > addresses, but I haven't looked into that properly yet.

> Do you by any chance have a sendmail background? Postfix doesn't have
> such a concept of multiple queues, so you don't have to look into it.

I cut my teeth on sendmail 10+ years ago - last time I looked it didn't
support multiple queues.  Having re-looked, the multi-queue functionality
it has does not support what I'm after - I'd still need to run multiple
instances to ensure each domain's queue is processed with a different
source IP address.

-Ronan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »