Version 12 (modified by raimue (Rainer Müller), 16 years ago) (diff) |
---|
How to setup Dovecot
- Audience: Advanced E-Mail set-up
- Requires: MacPorts >= 1.6, mail/dovecot, shells/zsh-devel
Introduction
This How-to is part of the Fetchmail -> Postfix -> Dovecot advanced e-Mail set-up.
Dovecot is a simple IMAP server which uses the standard Maildir file format for storage.
Using an IMAP server will make your mail storage independent from you e-mail client. You cans set up multiple e-mail clients on multiple computers and access all you mail from each client. Unlike POP this is also true for mail sorted into folders.
Installation
Install dovecot and Z-Shelkl with
port install zsh-devel port install dovecot
Configuration
Note: Do not use any of the attached files without checking / changing them with your favourite text editor.
Step 1: create user
Dovecot will drop root privileges when they are not needed any more so you need to create an user and group for dovecot to run with. You can use the Make_Dovecot_Directories.command to do so.
Step 2: create directories
Dovecot need two directories to work with - one to store the run status, one where the mail is stored. See howto/SetupPostfix on how to set up postfix to make incoming mail available to dovecot. You can use the Make_Dovecot_Directories.command to create the directories.
Step 3: create certificates
Dovecot supports encrypted connections and while in a local network it might not be necessary you will still need to create certificate files. You can use Make_Dovecot_Directories.command together with dovecot-openssl.cnf to create the certificates. Remember to change dovecot-openssl.cnf - there should be no "my_" left in the file and both files need to be in the same directory.
Step 4: set-up configuration
Next you need to set up dovecot.conf. You find the file in /opt/local/etc
. As a starting point you can use dovecot.conf together with passwd.dovecot and userdb.dovecot. You will need to add all your mail user to the passwd.dovecot and userdb.dovecot.
The separate user and password files are needed since OSX does not use /etc/passwd and /etc/shadow.
Step 5: starting the server
Dovecot is started using launchd
and a needed control file (/Library/LaunchDaemons/org.macports.dovecot.plist
) is provides by MacPorts. The attached Restart_Dovecot.command command will stop and restart Dovecot which forces a re-read of the configuration files - quite helpful while debugging the system.
Step 6: testing the server
The first initial test should be done in the Terminal.
Optional Parts
Instead of using separate user and password files you can try set-up LDAP.
Attachments (8)
-
Make_Dovecot_Certificates.command (992 bytes) - added by martin.osx@… 16 years ago.
Z-Shell script to create dovecot certificate
-
Make_Dovecot_User.command (692 bytes) - added by martin.osx@… 16 years ago.
Z-Shell script to create dovecot user and group.
-
dovecot-openssl.cnf (634 bytes) - added by martin.osx@… 16 years ago.
OpenSLL configuration for dovcot
-
dovecot.conf (41.8 KB) - added by martin.osx@… 16 years ago.
Dovcot configuration file.
-
passwd.dovecot (27 bytes) - added by martin.osx@… 16 years ago.
Dovecot password file
-
userdb.dovecot (34 bytes) - added by martin.osx@… 16 years ago.
Dovcot user file
-
Restart_Dovecot.command (304 bytes) - added by martin.osx@… 16 years ago.
Z-Shell script to restart dovecot
-
Make_Dovecot_Directories.command (431 bytes) - added by jmroot (Joshua Root) 14 years ago.
Z-Shell script to create dovcot directories
Download all attachments as: .zip