On Sun, Mar 09, 2014 at 06:00:20PM +0000, Eino Tuominen wrote:
> I'm transitioning our mail routing system from Oracle Messaging Server.
> It has a feature similar in purpose to postfix's owner-aliases. That is,
> if a mail group has an LDAP attribute mgrpErrorsTo, the server uses it to
> resolve the envelope sender address to use when delivering to the list.
> If I understand correctly, the exact same functionality is not (at least
> easily) possible with Postfix. I have tried to configure corresponding
> owner-aliases in ldap, but I have only been able to do this with local
> delivery. I searched through the sources and it seems that owner-name
> -mechanism is only implemented in src/local/alias.c.
>
> Can someone give me an example on how to do the same with virtual aliases,
> please.
What you want is impossible for architectural reasons. The rewriting
performed by virtual(5) is performed on input (when mail is received
and stored in the queue), when a has multiple recipients. When
one of those recipients is a list, but there are other recipients
(other users, or perhaps even other lists) it would be wrong to
change the envelope sender to be the owner of just a particular list.
The local(8) delivery agent injects a new message into the queue
when expanding lists with an owner-alias, this message has the list
owner as envelope sender and the list members as recipients.
The handling of such lists with Postfix is best performed via the
local(8) delivery agent. With LDAP, you can use "terminal_result_attribute"
http://www.postfix.org/LDAP_README.html#example_group
to defer virtual(5) expansion of groups that require moderation,
or other special processing (e.g. owner-alias envelope sender
substitution).
--
Viktor.