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'm setting up Dovecot and postfix for the first time, and I'm a little stuck. I'm sharing a virtual server with a few other people and I want a separate user account file (passwd file) for each domain, so that everyone can administer their email accounts themselves. I've created a directory for each domain in the /srv/mail directory, and put a passwd file inside.

I've set up Dovecot as follows. I believe the important parts are the userdb and passdb sections, but I've included the rest because I'm not entirely sure.

# 1.2.1: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.18.8-x86_64-linode7 x86_64  ext3
ssl_cert_file: /etc/ssl/certs/mail.crt
ssl_key_file: /etc/ssl/private/mail.key
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/imap-login
login_user: mail
mail_access_groups: mail
mail_location: maildir:/srv/mail/%d/%n
imap_client_workarounds: delay-newmail tb-extra-mailbox-sep
auth default:
  mechanisms: plain login
  passdb:
    driver: passwd-file
    args: username_format=%n /srv/mail/%d/passwd
  userdb:
    driver: passwd-file
    args: username_format=%n /srv/mail/%d/passwd
  socket:
    type: listen
    client:
      path: /var/run/dovecot/auth-client
      mode: 432
      user: mail
      group: mail

This isn't exactly working - I can connect, but I can't retrieve mail. I have a feeling it's to do with the lack of mail directories, but I have no idea how to convince Dovecot to create those.

I also want to set up postfix to send and receive email using the same user accounts, and notify dovecot that new mail is coming in. I found a guide using Google that told me to insert this into the config file:

smtpd_sasl_type = dovecot
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

This sort of makes sense to me. I can't find anything, however, on using a different passwd file for each domain. Can anyone assist me with this?

Thanks.

-- Samir.

share|improve this question

1 Answer 1

up vote 2 down vote accepted
  1. Dovecot doesn't create mailboxes; Postfix does that on mail receipt. If you want mailboxes up-front, it's best to send a test message to new mail accounts as they're created.
  2. You don't have to explicitly tell Postfix about the multiple password files; smtpd_sasl_type = dovecot tells Postfix to pass all authentication requests to Dovecot's passwork auth subsystem, which knows what it has to do.
share|improve this answer
    
Awesome. This has been on hold for a few days, but I'll mess around with it and see what happens soon. –  Samir Talwar Nov 6 '09 at 12:40

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.