Changes

Dovecot and Postfix Hybrid Authentication Example

1,923 bytes added, 02:29, 14 February 2014
The following lines were added (+) and removed (-):
  touch /etc/postfix/virtual  touch [[/etc/postfix/virtual]]  touch /etc/postfix/domains  touch [[/etc/postfix/domains]]  touch /etc/postfix/vmailbox  touch [[/etc/postfix/vmailbox]]  touch /etc/auth/yourdomain.com/passwd  touch [[/etc/auth/yourdomain.com/passwd]] You will have to manually populate those files.  Click on each one for a sample.  Remember to change obvious things such as yourdomain.com to your actual domain name, and populate the users with your actual users.  virtual_mailbox_base = /var/spool/vmail  virtual_mailbox_base = /var/vmailNote the virtual_mailbox_base parameter.  This is where mail for virtual users is delivered to and stored.  This mail is kept separate from mail for system users.  Since we are using Maildir/ style mailboxes, for each user postfix will deliver to the proper Maildir structure under /var/spool/vmail .  The first time an email is delivered, and the structure under /var/spool/vmail does not yet exist for the user, postfix will create the directories.  It is important that postfix have write permission to the /var/spool/vmail folder.  Another important consideration is that later, when we configure dovecot so users can pop or imap in to read their mail, it use the same path for mail_location.The config files that begin with the word "hash" in the parameter, like virtual_alias_maps, /etc/postfix/domains, /etc/postfix/vmailbox are not directly read from by postfix.  These have to be processed by 'postmap' so they are made into a hash "lookup table" which is all of the data in your text file made optimized for faster parsing by postfix.  Use the command 'postmap' to make a hash AFTER you populate these files with your data. postmap /etc/postfix/virtual postmap /etc/postfix/domains postmap /etc/postfix/vmailbox== conclusion ==There are many guides on how to do this, with different structures in the files and locations, or even how the virtual user tables and mailbox are made distinct.  If you become familiar with how it works, then you can customize it to fit your system schema. If you find any errors on this page, please create a wiki account and correct them.These are the best references and related guides as of 2014 for postmap/dovecot virtual user configuration.
Bureaucrat, administrator
16,192
edits