Topic: Dovecot config mess after upgrade from Ubuntu 18.04 to 20.04
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.4.2
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: Ubuntu 20.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? N/A
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I went ahead and updated my iRedMail Ubuntu server from 18.04 to 20.04, thinking it would be pain free
I followed the update guide on the iRedMail page
I followed: https://docs.iredmail.org/upgrade.dovecot.2.2-2.3.html
Following those steps things got a bit dicey, I applied the perl scripts, added the new settings into the dovecot.conf. No matter what I do dovecot won't start, now I am in a contant battle of config settings, and errors that have me lost. I never got to the next steps, so I have not changed the mysql backend settings.
I wound up running doveconf -Pn to generate a new config file, and I now get errors about line 45 in the file, that does not make any sense as I can not find the offending 'ssl_protocols' in the file anywhere. I think I have most the errors ironed out, now it just mentions the phantom line 45 in the config and the ssl_dh error. It also mentions files that don't exist with doveconf -n see below the log output.
Not sure what direction to head now, just reinstall everything? Just dovecot? I am following along on the wiki page : https://wiki2.dovecot.org/Upgrading/2.3
More lost than ever at this point, so taking a break. It all seems to center on the dovecot config file, and the mystery files it mentions. So dovecot is totally hosed at this point. My old config just makes matters worse, when I run the new config process it doesn't add all the settings, I still see ssl_min_porotocol is missing, so I have to add it back each time. So I am stuck between version 2.2 and 2.3.
Here is the last log output:
Dec 26 19:40:33 iRedMail2 dovecot: master: Dovecot v2.3.7.2 (3c910f64b) starting up for pop3, imap, sieve, lmtp (core dumps disabled)
Dec 26 19:40:33 iRedMail2 dovecot: doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -Pn > dovecot-new.conf
Dec 26 19:40:33 iRedMail2 dovecot: doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:45: ssl_protocols has been replaced by ssl_min_protocol
Dec 26 19:40:33 iRedMail2 dovecot: config: Warning: NOTE: You can get a new clean config file with: doveconf -Pn > dovecot-new.conf
Dec 26 19:40:33 iRedMail2 dovecot: config: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:45: ssl_protocols has been replaced by ssl_min_protocol
Dec 26 19:40:33 iRedMail2 dovecot: config: Warning: please set ssl_dh=</etc/dovecot/dh.pem
Dec 26 19:40:33 iRedMail2 dovecot: config: Warning: You can generate it with: dd if=/var/lib/dovecot/ssl-parameters.dat bs=1 skip=88 | openssl dhparam -inform der > /etc/dovecot/dh.pem
Dec 26 19:41:11 iRedMail2 dovecot: stats: Error: conn stats-reader (127.0.0.1:55196): didn't reply with a valid VERSION line: EXPORT#011global
Dec 26 19:41:49 iRedMail2 dovecot: master: Dovecot v2.3.7.2 (3c910f64b) starting up for pop3, imap, sieve, lmtp (core dumps disabled)
Dec 26 19:41:49 iRedMail2 dovecot: doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -Pn > dovecot-new.conf
Dec 26 19:41:49 iRedMail2 dovecot: doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:45: ssl_protocols has been replaced by ssl_min_protocol
Dec 26 19:41:49 iRedMail2 dovecot: config: Warning: NOTE: You can get a new clean config file with: doveconf -Pn > dovecot-new.conf
Dec 26 19:41:49 iRedMail2 dovecot: config: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:45: ssl_protocols has been replaced by ssl_min_protocol
Dec 26 19:41:49 iRedMail2 dovecot: config: Warning: please set ssl_dh=</etc/dovecot/dh.pem
Dec 26 19:41:49 iRedMail2 dovecot: config: Warning: You can generate it with: dd if=/var/lib/dovecot/ssl-parameters.dat bs=1 skip=88 | openssl dhparam -inform der > /etc/dovecot/dh.pem
Dec 26 19:41:53 iRedMail2 dovecot: stats: Error: conn stats-reader (127.0.0.1:56582): didn't reply with a valid VERSION line: EXPORT#011global
Dec 26 19:41:53 iRedMail2 dovecot: stats: Error: conn stats-reader (127.0.0.1:56584): didn't reply with a valid VERSION line: EXPORT#011global
Dec 26 19:42:14 iRedMail2 dovecot: lda: Fatal: Plugin 'stats' not found from directory /usr/lib/dovecot/modules
Dec 26 19:42:14 iRedMail2 dovecot: lda: Fatal: Plugin 'stats' not found from directory /usr/lib/dovecot/modules
Here are the mystery files mentioned with doveconf -n
root@iRedMail2:/etc/dovecot# doveconf -n | head -n 1
# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf
doveconf: Error: t_readlink(/var/run/dovecot/dovecot.conf) failed: readlink() failed: No such file or directory
doveconf: Error: duplicate listener: /var/run/dovecot/stats-reader
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: duplicate listener: /var/run/dovecot/stats-reader
root@iRedMail2:/etc/dovecot#
and the most recent config file:
# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.7.2 ()
# OS: Linux 5.4.0-91-generic x86_64 Ubuntu 20.04.3 LTS
# Hostname: iRedMail2
auth_master_user_separator = *
auth_mechanisms = PLAIN LOGIN
deliver_log_format = from=%{from}, envelope_sender=%{from_envelope}, subject=%{subject}, msgid=%m, size=%{size}, delivery_time=%{delivery_time}ms, %$
dict {
acl = mysql:/etc/dovecot/dovecot-share-folder.conf
lastlogin = mysql:/etc/dovecot/dovecot-last-login.conf
quotadict = mysql:/etc/dovecot/dovecot-used-quota.conf
}
first_valid_uid = 2000
last_valid_uid = 2000
listen = * [::]
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k session=<%{session}>
mail_gid = 2000
mail_location = maildir:%Lh/Maildir/:INDEX=%Lh/Maildir/
mail_plugins = quota mailbox_alias acl mail_log notify old_stats
mail_uid = 2000
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
namespace {
inbox = yes
location =
mailbox Archive {
auto = no
special_use = \Archive
}
mailbox Archives {
auto = no
special_use = \Archive
}
mailbox "Deleted Messages" {
auto = no
special_use = \Trash
}
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = subscribe
special_use = \Junk
}
mailbox "Junk E-mail" {
auto = no
special_use = \Junk
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox "Sent Items" {
auto = no
special_use = \Sent
}
mailbox "Sent Messages" {
auto = no
special_use = \Sent
}
mailbox Spam {
auto = no
special_use = \Junk
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix =
separator = /
type = private
}
namespace {
list = children
location = maildir:%%Lh/Maildir/:INDEX=%%Lh/Maildir/Shared/%%Ld/%%Ln
prefix = Shared/%%u/
separator = /
subscriptions = yes
type = shared
}
passdb {
args = /etc/dovecot/dovecot-mysql.conf
driver = sql
}
passdb {
args = /etc/dovecot/dovecot-master-users
driver = passwd-file
master = yes
}
plugin {
acl = vfile
acl_shared_dict = proxy::acl
last_login_dict = proxy::lastlogin
last_login_key = last-login/%s/%u/%d
mail_log_events = delete undelete expunge copy mailbox_create mailbox_delete mailbox_rename
mail_log_fields = uid box msgid size from subject flags
mailbox_alias_new = Sent Messages
mailbox_alias_new2 = Sent Items
mailbox_alias_old = Sent
mailbox_alias_old2 = Sent
old_old_old_old_old_old_stats_refresh = 30 secs
old_old_old_old_old_old_stats_track_cmds = yes
quota = dict:user::proxy::quotadict
quota_grace = 10%%
quota_status_nouser = DUNNO
quota_status_overquota = 552 5.2.2 Mailbox is full
quota_status_success = DUNNO
quota_warning = storage=100%% quota-warning 100 %u
quota_warning2 = storage=95%% quota-warning 95 %u
quota_warning3 = storage=90%% quota-warning 90 %u
quota_warning4 = storage=85%% quota-warning 85 %u
sieve = ~/sieve/dovecot.sieve
sieve_before = /var/vmail/sieve/dovecot.sieve
sieve_dir = ~/sieve
sieve_global_dir = /var/vmail/sieve
sieve_max_redirects = 30
sieve_vacation_send_from_recipient = yes
}
protocols = pop3 imap sieve lmtp
service auth {
unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-master {
group = vmail
mode = 0666
user = vmail
}
unix_listener auth-userdb {
group = vmail
mode = 0660
user = vmail
}
}
service dict {
unix_listener dict {
group = vmail
mode = 0660
user = vmail
}
}
service imap-login {
process_limit = 500
service_count = 1
}
service lmtp {
executable = lmtp -L
inet_listener lmtp {
address = 127.0.0.1
port = 24
}
process_min_avail = 5
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
user = vmail
}
service managesieve-login {
inet_listener sieve {
address = 127.0.0.1
port = 4190
}
}
service old-stats {
fifo_listener old-stats-mail {
group = vmail
mode = 0644
user = vmail
}
inet_listener {
address = 127.0.0.1
port = 24242
}
unix_listener stats-reader {
group = vmail
mode = 0660
user = vmail
}
unix_listener stats-writer {
group = vmail
mode = 0660
user = vmail
}
}
service pop3-login {
service_count = 1
}
service quota-status {
client_limit = 1
executable = quota-status -p postfix
inet_listener {
address = 127.0.0.1
port = 12340
}
}
service quota-warning {
executable = script /usr/local/bin/dovecot-quota-warning.sh
unix_listener quota-warning {
group = vmail
mode = 0660
user = vmail
}
}
ssl = required
ssl_cert = </etc/letsencrypt/live/mail.exampledomain.com/fullchain.pem
ssl_cipher_list = EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
ssl_dh = </etc/ssl/dh2048_param.pem
ssl_key = </etc/letsencrypt/live/mail.exampledomain.com/privkey.pem
ssl_prefer_server_ciphers = yes
syslog_facility = local5
userdb {
args = /etc/dovecot/dovecot-mysql.conf
driver = sql
}
protocol lda {
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
mail_plugins = quota mailbox_alias acl mail_log notify old_stats sieve
}
protocol lmtp {
lmtp_save_to_detail_mailbox = yes
mail_plugins = quota mailbox_alias acl mail_log notify old_stats sieve
recipient_delimiter = +
}
protocol imap {
imap_client_workarounds = tb-extra-mailbox-sep
mail_max_userip_connections = 30
mail_plugins = quota mailbox_alias acl mail_log notify old_stats imap_quota imap_acl imap_old_stats last_login
}
protocol pop3 {
mail_max_userip_connections = 30
mail_plugins = quota mailbox_alias acl mail_log notify old_stats last_login
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
pop3_uidl_format = %08Xu%08Xv
}
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.