Installing and Configuring Dovecot
Posted by Vanessa | Posted in Misc | Posted on March 26, 2010
0
Enabling Dovecot
You can convert a server from cppop or Courier IMAP to dovecot by running the following command:
/scripts/setupmailserver dovecot
Then set /var/cpanel/cpanel.config values:
maildir=1
mailserver=dovecot
Configuring Dovecot
Most relevant configurations can be made via WHM > Mailserver Configuration.
To customize the Dovecot configuration file in a way that the WHM configuration interface doesn’t allow, use one of the following methods:
If the directive you wish to change is already present in the template file, simply provide a value in the main datastore. For example, to change the “lock_method” to “dotlock” add a line like this to /var/cpanel/conf/dovecot/main:
lock_method: dotlock
After making this change run /scripts/builddovecotconf and the configuration file will be updated.
If the directives you want to use in the dovecot.conf file do not exist in the template, copy the /var/cpanel/templates/dovecot1.1/main.default (folder name may vary per version) template file to one named main.local. Make the modifications to main.local then run /scripts/builddovecotconf to regenerate the final configuration file. Your new template will be used each time the Dovecot configuration file is rebuilt in the future.
When using this method please note that updates to the dovecot binaries may require matching updates to the dovecot template file. The dovecot update system does not touch the main.local template in any way, and it is the responsibility of the administrator to reconcile cPanel’s template changes in main.default with the site specific main.local template.
A useful command when customizing the Dovecot configuration file is dovecot -n. This outputs the configuration being used by the current Dovecot process. Using this, you can verify that Dovecot is using all the directives you added to the configuration.






sending...