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

How would I set up Dovecot and Postfix to use a different user database than passwd for the email accounts? I'd would like to have separate accounts for user, who can actually log in via ssh, and user who have a mail address, although those might be the same person.

Lets say I have a account A, who can connect to the server via ssh. Now I want to have an A@domain.com mail address, but with a different password than the A account for ssh. The emails should nonetheless being saved in A's home folder.

How can this be accomplished?

Until now I have a directory structure defined in /etc/skel so that each ssh Account will have the mail directory automatically included. Then I set up the mail addresses via Postfix within the virtual file and then running 'postmap'.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Postfix calls these types of accounts Virtual Domains. Dovecot calls them Virtual Users. Virtual domains (and users) are not tied to system accounts.

Postfix can store the virtual domain information in local look-up files or LDAP. Dovecot requires an SQL or LDAP database.

LDAP is a common choice for storing virtual user information because of it's level of support among email software and its fast look up times.

Searching for "postfix dovecot ldap" turns up pages and pages of how-to and tutorial links that will get you started.

share|improve this answer
    
Dovecot doesn't require SQL or LDAP. Those are overkill outside an enterprise system! A text file like passwd is fine. wiki2.dovecot.org/HowTo/SimpleVirtualInstall –  Chloe Oct 26 '12 at 3:57

The term of art is "virtual hosting". Here's a guide on how to do this on CentOS:

https://sites.google.com/site/ghidit/how-to-2/centos-mail-server-setup-postfix-dovecot-mysql-virtual-users-sasl-postfixadmin-tls

So, the email account info would be stored in MySQL, in that example. It can also be stored in LDAP, sasldb, etc., depending on what you want to do to.

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.