I setup postfix to run with virtual mailbox setup:
virtual_mailbox_domains = domaina.com domainb.com domainc.com
virtual_mailbox_base = /var/mail/virtualhosts
virtual_mailbox_maps = hash:/etc/postfix/virtual_mailbox
virtual_minimum_uid = 500
virtual_uid_maps = static:500
virtual_gid_maps = static:12
virtual_alias_maps = hash:/etc/postfix/virtual
/etc/postfix/virtual:
[email protected] postmaster
[email protected] postmaster
[email protected] postmaster
/etc/postfix/virtual_mailbox
[email protected] domaina.com/first.account
[email protected] domainb.com/second.account
@domainb.com domainb.com/catch-all
@domaina.com domaina.com/catch-all
@domainc.com domainc.com/catch-all
My question is; where should I set aliases for existing user accounts, forwarding to another email address or piping to a local file? For example; I want to set these three:
[email protected] /var/my_app/pipe_a.php
[email protected] /var/my_app/pipe_b.php
[email protected] [email protected]
[email protected] [email protected]
Should I set these in /etc/postfix/virtual or in /etc/postfix/virtual_mailbox file? I couldn't make them working.
Your help is appreciated. Thanks.
I found that pipes and aliases should be set in the
/etc/postfix/virtual
file.Virtual mailbox users can be set under the
/etc/postfix/virtual_mailbox
file.Postfix pipes are configured in main.cf as described in the manual.
Then you set transport_maps to map (some) recipients to transports you defined (for pipeing).
Whereas delivering to virtual users remains configured as usual.