First of all thank you for the quick responses.

Victor Duchovni wrote:
> On Tue, Nov 17, 2009 at 09:39:53AM -0500, Wietse Venema wrote:
>   
>>> if I configure my /etc/aliases to read:
>>> test: |/bin/false, u...@external-server
>>> owner-test: u...@external-server
>>>
>>> I correctly receive E-Mail to test and owner test at
>>> u...@external-server, but the error-message which is generated by
>>> /bin/false is send back to the original sender.
>>>       
>> Apparently, owner-foo works for email addresses but not commands.
>> That would be a bug.
>>     
>
> It is not easy to solve, since bounces are not sent by local(8), so
> we would need new a queue-file with "owner-test" as the new sender,
> but there is no secure mechanism to record a command as the recipient
> in the queue file.
>   
The documentation reads:
expand_owner_alias (default: no)
When delivering to an alias "aliasname" that has an "owner-aliasname"
companion alias, set the envelope sender address to the expansion of the
"owner-aliasname" alias. Normally, Postfix sets the envelope sender
address to the name of the "owner-aliasname" alias.
To me this means that owner-aliasname is the new sender.
I understand the trouble with a command as receiver, but the
documentation just omits this.
Also I am really sure nobody is interessted in my bad programming skills
if they send me an E-Mail - even if they know how to improve my programm
they just have no access to it.
Therefore I think this is one of the best ways one could use
owner-aliasname.

> So it seems to me that this is more of a feature than a bug, and
> the solution could be along the lines of:
>
>     aliases:
>       owner-test: test-bounce-reader
>       test: command-al...@indirect.invalid, u...@external-server
>       command-alias: /bin/false
>
>     master.cf:
>       lcl-clnup unix  n       -       n       -       0       cleanup
>           -o virtual_alias_maps=$local_valias_maps
>       local     unix  -       n       n       -       -       local
>           -o cleanup_service_name=lcl-clnup
>
>     lcl-virtual:
>       #
>       # Only addressable via indirect delivery in local(8)
>       # 
>       command-alias                   command-al...@localhost.invalid
>       command-al...@localhost.invalid command-al...@localhost.invalid
>       command-al...@indirect.invalid  command-al...@localhost.invalid
>
>     virtual:
>       # Special virtual mappings for restricted aliases
>       #
>       # Only addressable via indirect delivery in local(8)
>       # 
>       command-alias                   command-al...@restricted.invalid
>       command-al...@localhost.invalid command-al...@restricted.invalid
>       command-al...@indirect.invalid  command-al...@restricted.invalid
>
>       # ... Regular virtual mappings below
>
>     transport:
>       # Note: not a local domain in the sense of $mydestination!
>       localhost.invalid       local:localhost
>       restricted.invalid      error:5.1.1 Mailbox unavailable
>       .invalid                error:5.1.2 Invalid destination domain
>
>     main.cf:
>       indexed = ${default_database_type}:${config_directory}/
>
>       virtual_alias_maps = ${indexed}virtual
>       local_valias_maps = ${indexed}lcl-virtual, $virtual_alias_maps
>       transport_maps = ${indexed}transport
>       alias_database = ${indexed}aliases
>       alias_maps = $alias_database
>   
I guess I will try this, but as Wietse pointed out: I don't think this
is an obvious ("easy") solution.
Especially as this should be a common scenario with external commands,
the documentation could provide more hints.

Regards


Matthias

Reply via email to