dovecot conf-custom in wrong location of main config?

Discussion in 'Installation/Configuration' started by slagroom, Jul 9, 2024.

  1. slagroom

    slagroom Member

    I get this when I check the docevot config:
    Code:
    # doveconf 1>/dev/null
    doveconf: Warning: /etc/dovecot/conf.d/99-ispconfig-custom-config.conf line 15: Global setting postmaster_address won't change the setting inside an earlier filter at /etc/dovecot/dovecot.conf line 79 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/dovecot.conf line 79)
    doveconf: Warning: /etc/dovecot/conf.d/99-ispconfig-custom-config.conf line 19: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/dovecot.conf line 70 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/dovecot.conf line 70)
    doveconf: Warning: /etc/dovecot/conf.d/99-ispconfig-custom-config.conf line 15: Global setting postmaster_address won't change the setting inside an earlier filter at /etc/dovecot/dovecot.conf line 79 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/dovecot.conf line 79)
    doveconf: Warning: /etc/dovecot/conf.d/99-ispconfig-custom-config.conf line 19: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/dovecot.conf line 70 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/dovecot.conf line 70)
    
    Seems to me the custom conf settings do not overrule because the include that ispconfig has put in /etc/dovecot/dovecot.conf is at the bottom, but I'm not sure what is said here. And yes, this is *after* having reconfigured services using ispconfig update.
     
    Last edited: Jul 10, 2024
  2. slagroom

    slagroom Member

    Yes, putting it higher up fixes this error. Here's my dovecot.conf that does not yield the error, and uses my custom config as it should:
    Code:
    # cat /etc/dovecot/dovecot.conf
    # Do not change this file, as changes will be overwritten by any ISPConfig update.
    # Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master.
    # To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force)
    listen = *,[::]
    protocols = imap pop3 lmtp sieve
    auth_mechanisms = plain login
    disable_plaintext_auth = no
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_privileged_group = vmail
    ssl_cert = </etc/postfix/smtpd.cert
    ssl_key = </etc/postfix/smtpd.key
    ssl_dh = </etc/dovecot/dh.pem
    ssl_min_protocol = TLSv1.2
    ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
    ssl_prefer_server_ciphers = no
    mail_max_userip_connections = 100
    mail_plugins = quota
    passdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    }
    userdb {
      driver = prefetch
    }
    userdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    }
    plugin {
      quota = dict:user::file:/var/vmail/%d/%n/.quotausage
    
      # no longer needed, as 'sieve' is in userdb extra fields:
      sieve=/var/vmail/%d/%n/.sieve
    
      sieve_before=/var/vmail/%d/%n/.ispconfig-before.sieve
      sieve_after=/var/vmail/%d/%n/.ispconfig.sieve
      sieve_max_script_size = 2M
      sieve_max_actions = 100
      sieve_max_redirects = 25
    }
    service auth {
      unix_listener /var/spool/postfix/private/auth {
        group = postfix
        mode = 0660
        user = postfix
      }
      unix_listener auth-userdb {
        group = vmail
        mode = 0600
        user = vmail
      }
      user = root
    }
    service lmtp {
      unix_listener /var/spool/postfix/private/dovecot-lmtp {
       group = postfix
       mode = 0600
       user = postfix
       # For higher volume sites, it may be desirable to increase the number of active listener processes.
       # A range of 5 to 20 is probably good for most sites
    #   process_min_avail = 5
      }
    }
    lmtp_rcpt_check_quota = yes
    service imap-login {
      client_limit = 1000
      process_limit = 512
    }
    
    !include_try conf.d/99-ispconfig-custom-config.conf
    
    protocol imap {
      mail_plugins = $mail_plugins quota imap_quota
      auth_verbose = yes
    }
    protocol pop3 {
      pop3_uidl_format = %08Xu%08Xv
      mail_plugins = $mail_plugins quota
      auth_verbose = yes
    }
    protocol lda {
    postmaster_address = [email protected]
      mail_plugins = $mail_plugins sieve quota
    }
    protocol lmtp {
    postmaster_address = [email protected]
      mail_plugins = $mail_plugins quota sieve
    }
    
    service stats {
        unix_listener stats-reader {
            user = vmail
            group = vmail
            mode = 0660
        }
    
        unix_listener stats-writer {
            user = vmail
            group = vmail
            mode = 0660
        }
    }
    
    service quota-status {
      executable = quota-status -p postfix
      unix_listener /var/spool/postfix/private/quota-status {
        group = postfix
        mode = 0660
        user = postfix
      }
      client_limit = 1
    }
    plugin {
      quota_status_success = DUNNO
      quota_status_nouser = DUNNO
      quota_status_overquota = "552 5.2.2 Mailbox is full"
    }
    
    imap_capability=+SPECIAL-USE XLIST
    namespace inbox {
      inbox = yes
      separator = .
      mailbox Drafts {
        special_use = \Drafts
      }
      mailbox Junk {
        special_use = \Junk
      }
      mailbox Sent {
        special_use = \Sent
      }
      mailbox "Sent Messages" {
        special_use = \Sent
      }
      mailbox Trash {
        special_use = \Trash
      }
    }
    
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    You should ensure to make your setup update safe by putting a modified dovecot.conf template into the ISPConfig server/conf-custom/install/folder.
     
  4. slagroom

    slagroom Member

    Eeh, please explain. I already *have* a custom config file at:
    /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master
    when I run an ispconfig update --force, this file gets put as
    /etc/dovecot/conf.d/99-ispconfig-custom-config.conf
    correct?
    Then dovecot calls this config from the line
    !include_try conf.d/99-ispconfig-custom-config.conf
    in /etc/dovecot/dovecot.conf

    So how do I make that dovecot.conf file update safe?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    As with any other config file in ISPConfig that is used at install time, copy its template from install/tpl/ of the ISPConfig tar.gz to /usr/local/ispconfig/server/conf-custom/install/, and there you modify this template.
     
  6. slagroom

    slagroom Member

    You mean /usr/local/ispconfig/server/conf-custom/ (without /install/ ) ? Because it does not work..
     
  7. pyte

    pyte Well-Known Member HowtoForge Supporter

    No, "/usr/local/ispconfig/server/conf-custom/install" is the correct path and working just fine here. Can you show your dovecot_custom.conf.master?
     
  8. slagroom

    slagroom Member

    This has nothing to do with custom config, it's /etc/dovecot/dovecot.conf that has the problem mentioned in https://forum.howtoforge.com/thread...ng-location-of-main-config.92670/#post-458727 When I want the source of that file to change, I need the correct template file, which in my case, as far as I can see, is tpl/debian_dovecot2.conf.master When I put this under the /install dir, nothing happens with /etc/dovecot/dovecot.conf
     
    Last edited: Jul 24, 2024
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    I explained above what you must do and @pyte confirmed you that it works like that. Most likely you missed running an ISPConfig update then. Or you set the wrong config template, might be tpl/debian6_dovecot2.conf.master, you might have to try or look at the source which one is the right one.
     

Share This Page