2009/7/27 Magnus Bäck <mag...@dsek.lth.se>:
>> I am using postfix+mysql virtual domains/users+dovecot+sieve. I am
>> using virtual domains, users, and aliases in mysql. How can I create
>> a pipe to a program like "test: |/usr/local/bin/test". If I insert
>> an a record in aliases tables, postfix tries to deliver the mail to
>> "|/usr/local/bin/t...@mydomain.com" and passes the mail to dovecot
>> rejects it because it does not find it in the mailboxes table.
>
> Only local(8) supports delivery to programs. You can use a virtual alias
> to redirect the recipient in the virtual mailbox domain to an address in
> any local domain, and then put the desired alias in the local alias
> table.
>
> /etc/postfix/main.cf:
> alias_maps = hash:/etc/postfix/aliases
> virtual_alias_maps = hash:/etc/postfix/virtual_aliases
> mydestination = ..., localhost, localhost.$mydomain
>
> /etc/postfix/aliases:
> test: |/usr/local/bin/test
>
> /etc/postfix/virtual_aliases:
> t...@example.com                t...@localhost


Thank you very much. For the record, the solution was this:
1) in /etc/postfix/main.cf:

ensure  alias_maps = hash:/etc/postfix/aliases
ensure mydestination = localhost
transport_maps = hash:/etc/postfix/transport

2) in /etc/postfix/transport:
localhost       local:

3) in /etc/postfix/aliases
test: |/usr/local/bin/test

Then adding a virtual alias from t...@my.domain to t...@localhost

Reply via email to