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

rewrite envelope-sender but *not* from address

833 views
Skip to first unread message

Jonathan Engbrecht

unread,
May 2, 2014, 4:45:11 PM5/2/14
to
I'm working on a generic postfix configuration for servers.  I want messages to have a From: address of <user>@<server fqdn>, but an envelope-sender/bounce address that's different.


canonical_maps=hash:/etc/postfix/canonical
canonical_classes = envelope_sender


in canonical:
@<server fqdn>     <some other address>


Messages sent from this server have the right envelope-sender (rewritten), but the header From: is also rewritten (as if canonical_classes is being ignored).

What am I missing?  Is there a different way I should be doing this?

Wietse Venema

unread,
May 2, 2014, 5:17:00 PM5/2/14
to
Jonathan Engbrecht:
> I'm working on a generic postfix configuration for servers. I want
> messages to have a From: address of <user>@<server fqdn>, but an
> envelope-sender/bounce address that's different.

Please describe your problem, instead of your solution.

Wietse

Jonathan Engbrecht

unread,
May 2, 2014, 5:26:02 PM5/2/14
to
I want a configuration with the following characteristics:

this server does not receive email.  it only sends.

messages from the server come with a From: of <user>@<server fqdn>

messages from the server have an envelope sender of <some valid, routeable address> (not the same as above).

Ideally, messages would also have a Reply-To of noreply@<domain>, but that's not my main issue here and is less important.

I'd like the From: to indicate the process/user that generated the message as well as the server that originated the email, but these addresses aren't deliverable (as there's no local delivery on the server itself).  I want message bounces to go to a valid email address so that they get read instead of disappearing.

postfix 2.3.3

Viktor Dukhovni

unread,
May 2, 2014, 5:47:52 PM5/2/14
to
On Fri, May 02, 2014 at 05:26:02PM -0400, Jonathan Engbrecht wrote:

> I want a configuration with the following characteristics:
>
> this server does not receive email. it only sends.
>
> messages from the server come with a From: of <user>@<server fqdn>
>
> messages from the server have an envelope sender of <some valid, routeable
> address> (not the same as above).

The MULTI_INSTANCE_README file describes an approach where routable
addresses are tagged with extensions that identify the sending user.

Assuming a recipient delimiter of "+", rewrite (in the headers and
envelope):

us...@bogus.example -> user+bogu...@routable.example

If the user is also a fantasy, the variant described in
MULTI_INSTANCE_README is:

lu...@bogus.example -> user+luser=bogus....@routable.example

where "luser" is fiction, but "user" recieves mail.

This does not require leaving bogus addresses intact in headers.

--
Viktor.

/dev/rob0

unread,
May 2, 2014, 11:15:45 PM5/2/14
to
On Fri, May 02, 2014 at 05:26:02PM -0400,
Jonathan Engbrecht wrote:
> postfix 2.3.3

Note that Viktor's suggestion of multiple instances assumes a
slightly less ancient Postfix version; postmulti(1) began with
Postfix 2.6. Time to upgrade?
--
http://rob0.nodns4.us/
Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Viktor Dukhovni

unread,
May 2, 2014, 11:30:02 PM5/2/14
to
On Fri, May 02, 2014 at 10:15:45PM -0500, /dev/rob0 wrote:
> On Fri, May 02, 2014 at 05:26:02PM -0400,
> Jonathan Engbrecht wrote:
> > postfix 2.3.3
>
> Note that Viktor's suggestion of multiple instances assumes a
> slightly less ancient Postfix version; postmulti(1) began with
> Postfix 2.6. Time to upgrade?

I was not suggesting multiple instances, merely the rewriting
methodology of the nullclient configuration described in the
document. This said Postfix 2.3 is rather old, and if the OP gets
a chance, running something more recent (2.9 or later) is not a
bad idea.

--
Viktor.

Jonathan Engbrecht

unread,
May 5, 2014, 1:37:52 PM5/5/14
to
This seemed initially promising, but  one of our primary internal mail systems won't validate the +/=-style address extension, and with the Return-path/envelope-sender encoded as <host-tag>+<user>=<valid address>@<valid domain>, any bounces just die with recipient unknown.


(postfix 2.3.3 is unfortunately the most recent version provided in Red Hat's enterprise repository.  I could update it, of course, but we try to stick with core packages where possible).


0 new messages