From: Barney Barumba on
Hi,

I'm trying to redirect outbound mail based on the from address. I've seen a
few things that say sender based routing is not supported, but I'm not sure if
that is what I need or not.

The problem is that I want to use my local mail client to send mail from my
work address, which is running MS Exchange. I don't want to simply replace the
from address on the outbound email - I want to actually have the mail sent
from the Exchange server.

The only external access to this server is via WebDav, so I've written a
client that accepts an email message from its standard input, logs on to the
server, and sends the message. All I need to do now is configure my postfix
server to pipe selected messages to this client (or better still, to maildrop
which can also store a local copy).

Ideally, all I'd like to do is select my work address as the from address in
my original message and have the server do the rest. Is this possible? Or is
there any other way of routing selected outbound messages to a local program?

Thanks,

Barney

From: Victor Duchovni on
On Mon, Nov 02, 2009 at 11:33:56PM +1100, Barney Barumba wrote:

> I'm trying to redirect outbound mail based on the from address. I've seen a
> few things that say sender based routing is not supported, but I'm not sure if
> that is what I need or not.

Postfix has:

http://www.postfix.org/SOHO_README.html#client_sasl_sender

which selects a per-sender next-hop address, when the recipient is remote
(delivered via SMTP).

Choosing per-sender transports has no reasonable semantics when some
recipients are local and some remote. This feature is not offered.

> The problem is that I want to use my local mail client to send mail from my
> work address, which is running MS Exchange. I don't want to simply replace the
> from address on the outbound email - I want to actually have the mail sent
> from the Exchange server.
>
> The only external access to this server is via WebDav, so I've written a
> client that accepts an email message from its standard input, logs on to the
> server, and sends the message. All I need to do now is configure my postfix
> server to pipe selected messages to this client (or better still, to maildrop
> which can also store a local copy).

If you turn your submission script into a local SMTP service, or deploy
a Postfix smtpd(8) on an alternate port with content_filter set to your
script, you can cause mail to remote recipients and the appropriate sender
address to flow through your script.

--
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:majordomo(a)postfix.org?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.