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 have configured a Postfix mail server for two domains: domain1.com and domain2.com.

In my configuration domain1 has both virtual users with Maildirs and aliases to forward mail to local users (eg. root, webmaster) and some small mailing lists. It also has some virtual mappings to non-local domains.

Domain2 on the other hand has only virtual alias mappings, mainly to corresponding 'users' at domain1 (eg. mails to root@domain2.com should be forwarded to root@domain1.com).

My problem is that currently Postfix accepts mail even for those users that don't exist in the system. Mail to existing users and /etc/aliases works fine. Postfix documentation states that the same domain should never be specified in both mydestination and virtual_mailbox_maps, but If I specify mydestination as blank then postfix validates recipients against virtual_mailbox_maps but rejects mail for local aliases of domain1.com.

/etc/postfix/main.cf:

myhostname = domain1.com
mydomain = domain1.com
mydestinations = $myhostname, localhost.$mydomain, localhost

virtual_mailbox_domains = domain1.com
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_mailbox_base = /home/vmail/domains

virtual_alias_domains = domain2.com
virtual_alias_maps = hash:/etc/postfix/virtual

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

virtual_transport = dovecot

/etc/postfix/virtual:

domain1.com right-hand-content-does-not-matter
firstname.lastname user1
[more aliases..]

domain2.com right-hand-content-does-not-matter
@domain2.com @domain1.com

/etc/postfix/vmailbox:

user1@domain1.com user1/Maildir
user2@domain1.com user2/Maildir

/etc/aliases:

root: :include:/etc/postfix/aliases/root
webmaster: :include:/etc/postfix/aliases/webmaster
[etc..]

Is this approach correct or is there some other way to configure Postfix with Dovecot (virtual) Maildirs and Postfix aliases?

share|improve this question
add comment

1 Answer

You can have a look at http://workaround.org/ispmail

share|improve this answer
add comment

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.