doveconf
Rebuild the Dovecot configuration for the installed Dovecot version, including SSL certificates for the hostname and each domain
- Command:
/go/doveconf - Category: Mail
- Required option: None
- Output: None
- Last updated: 2026-11-20
On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also
Overview
/go/doveconf regenerates /etc/dovecot/dovecot.conf from scratch, using the settings GoAdmio needs for virtual mail accounts. It:
- detects the installed Dovecot version and writes the matching syntax (2.4 or older)
- picks the SSL certificate for the server hostname, or a self-signed fallback
- adds a certificate per domain for
imap.<domain>connections - sets up virtual mailboxes under
/home/<domain>/mail/, authentication, LMTP delivery, and ManageSieve - turns on the junk filter scripts when the junk filter is enabled
The call is appended to /var/log/go/doveconf.log. The command re-runs itself with sudo when started by a non-root user.
[!WARNING] The command replaces the whole file and does not restart Dovecot. It makes no backup and does not validate the result. See Troubleshooting.
Quick start
/go/doveconf
systemctl restart dovecot
Syntax
/go/doveconf
The command takes no arguments. Anything you pass is only written to the log.
Options
None. The result depends on the server, not on the command line:
| Input | Where it comes from |
|---|---|
| Dovecot version | dovecot --version |
| Hostname | /etc/hostname |
| Operating system | /usr/local/goadmio/linux/os.db |
| Junk filter on or off | GoAdmio's Config table (Junk) |
| Certificates | /etc/letsencrypt/live/ and /etc/postfix/ssl/ |
Output
The command prints nothing. Check the result yourself:
doveconf -n > /dev/null && echo OK
tail /var/log/dovecot.log
Examples
# Rebuild the configuration and apply it
/go/doveconf
systemctl restart dovecot
# Check that the generated file is valid
doveconf -n > /dev/null && echo OK
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Changes have no effect | Dovecot was not restarted. | Run systemctl restart dovecot. |
| Dovecot won't start after running the command | The generated file has an error. | Run doveconf -n and read /var/log/dovecot.log. On Dovecot 2.4, see the SSL note under Details. |
| Mail clients warn about the certificate | There is no Let's Encrypt certificate for the server hostname, so the self-signed one is used. | Install certificates with mailssl or ssl, then run doveconf again. |
| A domain's own certificate is not offered | The hostname has no Let's Encrypt certificate (per-domain certificates are only added when it does), the domain has no certificate files, or the hostname is imap.<domain>. |
Fix the certificates and run the command again. |
| Junk filter isn't applied | The junk filter is off, or the Sieve scripts are missing (see Junk filter). | Enable it with junk. |
| Postfix's SMTP port changed | The command updates it as part of the SSL step (see Details). | Expected behavior. |
| Custom Dovecot settings are gone | The file is overwritten on every run. | Re-add them after each run, or change the script. |
| Postfix can't authenticate through Dovecot | The OS isn't one of the supported ones, so no auth socket is written. | Use a supported OS. |
Details
What is generated
| Section | Content |
|---|---|
| Listening | listen = *, ssl = yes, log file /var/log/dovecot.log |
| Protocols | IMAP, POP3, LMTP, and Sieve (ManageSieve on port 4190) |
| Mailboxes | Virtual users stored in /home/<domain>/mail/<user>, owned by vmail (uid and gid 5000) |
| Authentication | plain and login; users from /etc/dovecot/passwd (SHA1) |
| Auth socket for Postfix | RHEL family: auth-client. Debian and Ubuntu: /var/spool/postfix/private/auth_dovecot. Other systems: none |
| Delivery | LMTP socket /var/spool/postfix/private/dovecot-lmtp, with one client at a time |
| Sieve | Per-user scripts from ~/.sieve, plus the junk filter scripts when enabled |
The file is built from scratch. The package's default settings and conf.d includes are not used.
Dovecot 2.4 and earlier
| Setting | Dovecot 2.3 and earlier | Dovecot 2.4 |
|---|---|---|
| Version lines | None | dovecot_config_version and dovecot_storage_version |
| Default certificate | ssl_cert, ssl_key |
ssl_server_cert_file, ssl_server_key_file |
| Mail location | mail_location = maildir:/home/%d/mail/%n |
mail_home, mail_uid, mail_gid |
| Protocols | protocols = imap pop3 lmtp sieve |
protocols { ... } block |
| Plain-text auth | disable_plaintext_auth = no |
Not set |
| Sieve | plugin { ... } block |
sieve_script blocks |
SSL certificates
| Case | Default certificate | Postfix SMTP port set in GoAdmio |
|---|---|---|
/etc/letsencrypt/live/<hostname>/fullchain.pem exists |
The hostname's Let's Encrypt certificate | 465 |
| It doesn't | The self-signed /etc/postfix/ssl/smtpd.crt and smtpd.key |
25 |
The command writes the new port to the PostfixSMTPPort setting in GoAdmio's configuration database.
When the hostname certificate exists, the command also adds a local_name imap.<domain> block for every folder in /home that has fullchain.pem and privkey.pem under /etc/letsencrypt/live/<name>/. Clients connecting to imap.<domain> then get that domain's certificate. A block is skipped when the server hostname is already imap.<domain>.
[!NOTE] The per-domain blocks use the
ssl_certandssl_keysetting names even on Dovecot 2.4, where the default certificate usesssl_server_cert_fileandssl_server_key_file. If Dovecot 2.4 rejects the file, check these blocks first.
Junk filter
When Junk is 1 in GoAdmio's configuration:
| Dovecot | Behavior |
|---|---|
| 2.3 and earlier | Both /usr/local/goadmio/junk/.sieve and .ip must exist. Then .sieve is the global script and .ip runs after it. |
| 2.4 | .sieve becomes the default script if it exists; .ip runs after other scripts if it exists. Each is checked on its own. |
See also
| Command | Description |
|---|---|
installmail |
Install and configure webmail services (Postfix and Dovecot) |
mailssl |
Install SSL certificates for SMTP and IMAP |
ssl |
Install an SSL certificate for a domain in GoAdmio |
junk |
Enable, disable, or rebuild the Sieve filters for the Junk folder |
vmail |
Rebuild the Postfix/Dovecot vmail maps |
checkimap |
Check the IMAP port and SSL certificate |