Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

postmaster@domaina.com postmaster
postmaster@domainb.com postmaster
postmaster@domainc.com postmaster

/etc/postfix/virtual_mailbox

first.account@domaina.com domaina.com/first.account
second.account@domainb.com 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:

pipe@domaina.com /var/my_app/pipe_a.php
pipe@domainb.com /var/my_app/pipe_b.php
email@domainc.com domainc@gmail.com
email@domaina.com domaina@gmail.com

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.

share|improve this question

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.