Skip to main content

Dovecot Custom Configuration.

Comments

9 comments

  • Infopro
    Have you seen the settings located here: WHM " Service Configuration " Mailserver Configuration
    0
  • mpkapadia
    Oops . My bad. It lets me do exactly what I wanted to . Thanks a lot.
    0
  • Infopro
    You're welcome.
    0
  • visualmtb
    Hi I'm having a similar issue, but the settings I need to change in the /etc/dovecot/dovecot.conf are not in WHM " Service Configuration " Mailserver Configuration and every time there are updates or if I make a change using WHM " Service Configuration " Mailserver Configuration then any advanced setting made in dovecot.conf get put back to default values. How can I set the following settings [pop3_uidl_format = %08Xu%08Xv and pop3_client_workarounds = outlook-no-nuls oe-ns-eoh] in dovecot.conf without worrying they will default back. Thanks
    0
  • cPanelMichael
    Hello :) You can edit the following file for local modifications to the Dovecot configuration: /var/cpanel/templates/dovecot2.2/main.local
    Note: You can copy this file from /var/cpanel/templates/dovecot2.2/main.default if it does not exist. After making the custom modifications, you must run: /scripts/builddovecotconf
    Thank you.
    0
  • visualmtb
    Hi Michael, Thank you, that works! :) But I'm a bit confused about something, in the main.default file the 2 settings I want to change seem to have a check to see if they are already defined in dovecot.conf: [%- IF protocol_pop3.pop3_uidl_format.defined %] pop3_uidl_format = [% protocol_pop3.pop3_uidl_format %] [%- ELSE %] #pop3_uidl_format = UID%u-%v [%- END %]
    and [%- IF protocol_pop3.pop3_client_workarounds.defined %] pop3_client_workarounds = [% protocol_pop3.pop3_client_workarounds %] [%- ELSE %] #pop3_client_workarounds = [%- END %]
    But for some reason they were overwritten when the system updated, shouldn't this code skip the pop3_client_workarounds and pop3_uidl_format settings if they were already defined in dovecot.conf? Thanks
    0
  • visualmtb
    Hi Michael, My mistake, the /var/cpanel/templates/dovecot2.2/main.default is combined with the /var/cpanel/conf/dovecot/main file during build not the dovecot.conf file. Knowing this, can I just add the settings in the /var/cpanel/conf/dovecot/main instead of creating a main.local file, will that do the same thing? Thanks again for the help!
    0
  • cPanelMichael
    You will need to use the /var/cpanel/templates/dovecot2.2/main.local file so that changes are preserved during updates. Thank you.
    0
  • visualmtb
    Actually from my research if the directives you want to change in the dovecot.conf file exist in the template file: /var/cpanel/templates/dovecot2.2/main.default then the changes you wish to make should be added to the /var/cpanel/conf/dovecot/main. If you create a main.local file in the template folder and dovecot updates, and adds new directives that never existed before the update, then you have to manually update the main.local file you created which is a pain to remember. Since the changes I want to make already exist in the dovecot.conf and template file /var/cpanel/templates/dovecot2.2/main.default I only have to add my changes to the /var/cpanel/conf/dovecot/main.cf This is from the Dovecot manual: 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 lock_method: dotlock to /var/cpanel/conf/dovecot/main: If the directives you want to use in the dovecot.conf file do not exist in the template, copy the main.default template file to one named main.local Warning 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.
    0

Please sign in to leave a comment.