DoveCot users + multiple domains

0

Hi I am trying to get dovecot to work with multiple domains

My /etc/aliases looks like this

# See man 5 aliases for format
postmaster:    root
shop: shop
ben: ben

When I try changing it to

ben@mydomain.com: ben

and then run

newaliases

It tells me

postalias: warning: /etc/aliases, line 3: name must be local

Here is my dovecot config

http://178.62.83.203/dovecot.conf

postfix main.cf

http://178.62.83.208/postfix.cf

What do I need to do to get it working?

Ben Shepherd

Posted 2015-05-23T13:46:15.443

Reputation: 107

Answers

0

As far as I understand, the idea of multiple domains implies that mail users will be virtual. they should not be available in /etc/aliases

instead, you setup Dovecot userdb/passdb somewhere in /etc/dovecot/users or even /etc/dovecot/%d/users

in a similar manner define mail_location so that it uses %d.

in case you need aliases, define them in postfix

# /etc/postfix/main.cf
virtual_alias_maps = hash:/etc/postfix/virtual_alias_map

and populate the map

# /etc/postfix/virtual_alias_map
allusers@domain.org user1@domain.org user2@domain.org ben

above ben is a local user that exists on the system (in /etc/passwd) and the mail will (hopefully) be delivered to user's local mailbox (/var/mail/ben)

Nik O'Lai

Posted 2015-05-23T13:46:15.443

Reputation: 191