Solved Dovecon 2.4.1-4 won't start

AlexanderNL

Verified User
Joined
Feb 17, 2025
Messages
15
#Linux Version
cat /etc/os-release
NAME="dragut"
VERSION=8 dracut-049-228.git20230802.el8"
ID=dracut
VERSION_ID=049-228.git20230802.el8
PRETTY_NAME="CentOS Stream dracut-049-228.git20230802.el8 (Initramfs)"
ANSI_COLOR="0;31"

#Dovecot Version
[root@server custombuild]#
dovecot --version
2.4.1-4 (7d8c0e5759)


#Start of the problem in Dovecot
https://privatebin.statix.biz/?8d6519519853a9cd#CEo55MVvGjAhoctAp3hQDFeXRc6WSS9LVV2nHpWtNTrU

For LDAP problem i have install this option
https://computingforgeeks.com/install-configure-openldap-server-centos/

Of the LDAP is not right installed i dont know, but when i will build again. He will ended with a maildirlock fail...
The en off the script is:

Code:
    /usr/local/directadmin/custombuild/configure/maildirlock/Makefile:5: /usr/lib/dovecot/dovecot-config: No such file or directory
    make: *** No rule to make target '/usr/lib/dovecot/dovecot-config'.  Stop.
    failed to build maildirlock

The the update is gone of Dovecon, this is been installed, but i can not start.

Here below the full script of the last build of Dovecot:
https://privatebin.statix.biz/?134aa352e5eef19c#FEgALPEgMe9HAvAF3JFzdSYx73XLWKYQtYWAwxwXYw9Q
 
To successfully build dovecot, there is no need to install or run openldap server. The CustomBuild should install openldap-devel package prior to building Dovecot. When openldap-devel package is present on RHEL system there should be no problems compiling Dovecot.

I think the CustomBuild script was unable to correctly detect the server distro version. Usually CentOS 8 Stream systems has the following /etc/os-release file contents:

Code:
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

Using da o command is an easy way to check what distro is detected by DirectAdmin. On CentOS 8 is should report:

Code:
# da o | grep distro
distro: rhel8

If DA can not detect distro version it will report:

Code:
# da o | grep distro
distro: linux

Most of the DirectAdmin functions can work even if correct distro is not detected. But most of the CustomBuild operations will fail. CustomBuild need to accurately know the distro version to correctly pick what packages to install and what system beheviour to expect.

Could you share more details what kind of system are you using?
 
Adding a line ID_LIKE="rhel fedora" to the /etc/os-release file should be enough to allow DirectAdmin to correctly detect that your system is based on RHEL 8.
 
When I use da o commando I have :
Code:
# da o | grep distro
distro: linux

In the first line Dovecot was not install openldap-devel.
In both urls with the logs you will see that there is something what will not make files.

What kind of information do you want to know? I'm now on the phone online, but can at home send more information.
 
Adding a line ID_LIKE="rhel fedora" to the /etc/os-release file should be enough to allow DirectAdmin to correctly detect that your system is based on RHEL 8.
When I use this I have a problem with my license 😅
Code:
legacy code-base does not support rhel49 system, downgrade your system or upgrade DirectAdmin license

More details about licensing errors is available on the docs.directadmin.com.
 
I don't know "os_override" option still work or not, so try it.

#./directadmin/conf/directadmin.conf
Code:
os_override=ES%208.0%2064

and restart the service.
 
There is no file: /usr/local/directadmin/conf/directadmin.conf

I don't know of it is because i have some legacy licenses?
@fln spoken about openldap-devel pakkage, but how can i install them? But don't i have first to remove openldap?

This are the only builds what i see, but no openldap-devel:
Code:
Install/update server components
--------------------------------
  da build awstats                                   # disabled by options.conf
  da build clamav                                    # disabled by options.conf
  da build libmodsecurity                            # disabled by options.conf
  da build litespeed                                 # disabled by options.conf
  da build mod_fcgid                                 # disabled by options.conf
  da build mod_hostinglimits                         # disabled by options.conf
  da build mod_htscanner2                            # disabled by options.conf
  da build mod_lsapi                                 # disabled by options.conf
  da build mod_proctitle                             # disabled by options.conf
  da build modsecurity_rules                         # disabled by options.conf
  da build modsecurity                               # disabled by options.conf
  da build mysql                                     # disabled by options.conf
  da build nginx_apache                              # disabled by options.conf
  da build nginx                                     # disabled by options.conf
  da build openlitespeed                             # disabled by options.conf
  da build php 7.0                                   # disabled by options.conf
  da build php 7.1                                   # disabled by options.conf
  da build php 7.2                                   # disabled by options.conf
  da build php 7.3                                   # disabled by options.conf
  da build php 8.0                                   # disabled by options.conf
  da build php 8.2                                   # disabled by options.conf
  da build php 8.3                                   # disabled by options.conf
  da build proftpd                                   # disabled by options.conf
  da build apache
  da build bind
  da build composer
  da build csf
  da build dovecot
  da build exim
  da build imapsync
  da build jailshell
  da build lego
  da build mariadb
  da build php 5.6
  da build php 7.4
  da build php 8.1
  da build php 8.4
  da build pureftpd
  da build redis
  da build rspamd
  da build spamassassin
  da build unit
  da build webalizer
  da build wp

  da build php                                       # rebuild all enabled PHP v                                                                    ersions
  da build all                                       # rebuild all enabled softw                                                                    are components

Install/update PHP extensions
-----------------------------
  da build php_bz2                                   # disabled by options.conf
  da build php_gmp                                   # disabled by options.conf
  da build php_igbinary                              # disabled by options.conf
  da build php_imap                                  # disabled by options.conf
  da build php_ioncube                               # disabled by options.conf
  da build php_ldap                                  # disabled by options.conf
  da build php_lz4                                   # disabled by options.conf
  da build php_mcrypt                                # disabled by options.conf
  da build php_opcache                               # disabled by options.conf
  da build php_pgsql                                 # disabled by options.conf
  da build php_phalcon                               # disabled by options.conf
  da build php_readline                              # disabled by options.conf
  da build php_redis                                 # disabled by options.conf
  da build php_snuffleupagus                         # disabled by options.conf
  da build php_ssh2                                  # disabled by options.conf
  da build php_suhosin                               # disabled by options.conf
  da build php_xmlrpc                                # disabled by options.conf
  da build php_yaml                                  # disabled by options.conf
  da build php_zend                                  # disabled by options.conf
  da build php_zstd                                  # disabled by options.conf
  da build php_imagick

  da build php_extensions                            # rebuild all PHP extension                                                                    s

Install/update web applications
-------------------------------
  da build squirrelmail                              # disabled by options.conf
  da build phpmyadmin
  da build roundcube

Components configuration options
--------------------------------
  da build blockcracking                             # Enable BlockCracking
  da build dovecot_conf                              # Update Dovecot configurat                                                                    ion files
  da build easy_spam_fighter                         # Enable Easy Spam Fighter
  da build exim_conf                                 # Update Exim configuration                                                                     files
  da build rewrite_confs                             # Rewrite WEB server config                                                                    uration files
  da build secure_php                                # Secure PHP
  da build spamassassin_cron                         # Build SpamAssassin cron
  da build sync_server_cert                          # Copy host name TLS certif                                                                    icate for services

CustomBuild related options/functions
-------------------------------------
  da build create_options
  da build cron
  da build opt_help
  da build options_nobold
  da build list_removals
  da build remove_items
  da build set option_name value
  da build update_da
  da build update_versions
  da build update_webapps
  da build used_configs
  da build versions

Remove old build data
---------------------
  da build clean
  da build clean_old_webapps

Recommended for experienced users only (!)
------------------------------------------
  da build php_htscanner2 php_release
  da build set_service service ON|OFF|delete
 
Last edited:
... does not support rhel49 system
🤣.

Adding the ID_LIKE="rhel fedora" fixed the distro flavor detection, but the version number is still malformed. It should be VERSION_ID="8" for CentOS 8 system.

The RHEL 8 systems is supported with all the DA licenses.

Required libraries will be installed automatically when building Dovecot. There is no need to install them manually.

@AlexanderNL how did you end up with this exotic /etc/os-release file? I mean how the server was installed? What kind of distro and installation method was used?
 
A few months ago I had startup problems with the server, apparently my OS release file had disappeared. How this is possible is still a mystery to me, with the help of others I was able to restore the server and get the correct version back. In any case I also know that Centos 8 Stream is no longer supported and that this also needs to be upgraded, but before that I will have to update other things on the server first. The most important thing for me is that everything within DirectAdmin is and must remain updated.

This is what now my os-release file:
Code:
NAME="dragut"
VERSION=8 dracut-049-228.git20230802.el8"
ID=dracut
VERSION_ID=049-228.git20230802.el8
PRETTY_NAME="CentOS Stream dracut-049-228.git20230802.el8 (Initramfs)"
ANSI_COLOR="0;31"

You say that i can change it with?
Code:
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

Hope that the license of Directadmin like the changes
 
The CentOS 8 is fully supported by DirectAdmin, so no worries about upgrading. If you have CentOS 8 on your server, then using this os-release file would make sure it is the same as on other CentOS 8 servers. And would fix distro detection problem.
 
Ok i have change the OS-release file, and the server is running "pffff" Direct Admin is also running without licence problem.
It look like that when i build Dovecon, its been slower, but i don't know of it really is.

The end is:
Code:
make[1]: Leaving directory '/usr/local/directadmin/custombuild/tmp/tmp.8rIJ0n6nff.dovecot-pigeonhole-2.4.1-4.tar.gz/doc'
2025/04/30 15:51:09  info executing task            task=action=rewrite&value=mail_sni
2025/04/30 15:51:09  info finished task             duration=276.689498ms task=action=rewrite&value=mail_sni
inactive
Enabling dovecot in systemd...
Restarting dovecot.
Here the full log: https://privatebin.statix.biz/?930741b0b29ae92f#BAYU6Zr7eDTdbHn6QZFFgXDC6896veBbHU4gkT7RxfdM


But the build is now complete, but how can i the best remove openldap?
Because the service will not start

When i look ad OpenLDAP:
Code:
[root@server ~]# systemctl status slapd
● slapd.service - OpenLDAP Server Daemon
   Loaded: loaded (/etc/systemd/system/slapd.service; bad; vendor preset: disab>
   Active: inactive (dead)
     Docs: man:slapd
           man:slapd-mdb

Apr 30 16:20:48 server.wup.nu systemd[1]: /etc/systemd/system/slapd.service:1: >
Apr 30 16:22:45 server.wup.nu systemd[1]: /etc/systemd/system/slapd.service:1: >
Apr 30 16:22:45 server.wup.nu systemd[1]: /etc/systemd/system/slapd.service:1: >

Its not running, but i can not see of i can stop the Daemon and the Slapd.

I have doing the install till "configure OpenLDAP Default Root DN"

But with only remove the files i think that will not the solution?
 
Last edited:
strange that i could not edit the file, but in ftp i see the configfile. But for now the dovecot is been installed. see the log file:

But now look like that i can not start them, but i was looking with the systemctl, but it like that OpenLDAP is also not started.
But its now more how can i can make it undo
 
But its now more how can i can make it undo
It looks like it's starting now, I don't see any error in the PrivateBin in the last lines.
If still OpenLDAP is an issue, maybe it's because Dovecot is build from cache presence, not sure.

You can always try like this:
Code:
da build clean
da build update
da build dovecot
see if that works for you.
 
Code:
da build clean
da build update
da build dovecot
see if that works for you.

No differtent, see the logfiles.

How can i see of there are other service running?
Is there also no log why Dovecot not start?

What i see in Error.log is:

This is what i see in /var/log/message:
 
Last edited:
Ok now its working. The solution is that there is something change in 2.3 to 2.4.

First for me was changing the OS-release file, then i had the right pakage.

[root@server ~]# service dovecot status
Redirecting to /bin/systemctl status dovecot.service
● dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/etc/systemd/system/dovecot.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2025-04-30 20:17:11 CEST; 3s ago
Process: 227018 ExecStart=/usr/sbin/dovecot -F (code=exited, status=89)
Main PID: 227018 (code=exited, status=89)

Apr 30 20:17:11 server.wup.nu systemd[1]: Started Dovecot IMAP/POP3 email server.
Apr 30 20:17:11 server.wup.nu dovecot[227018]: doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/99-imap-sieve.conf line 1: Unknown section name: plugin
Apr 30 20:17:11 server.wup.nu systemd[1]: dovecot.service: Main process exited, code=exited, status=89/n/a
Apr 30 20:17:11 server.wup.nu systemd[1]: dovecot.service: Failed with result 'exit-code'.

i had to remove: Enable global sieve filters 2.3: /etc/dovecot/conf.d/99-imap-sieve.conf


And create: Enable global sieve filters: /etc/dovecot/conf.d/99-spamd_learn_mail.conf

Code:
protocol imap {
    mail_plugins {
        imap_sieve = yes
    }
}

sieve_plugins {
    sieve_imapsieve   = yes
    sieve_extprograms = yes
}

sieve_global_extensions {
    vnd.dovecot.pipe = yes
}

sieve_pipe_bin_dir = /usr/local/bin/dovecot-sieve

namespace inbox {
    mailbox Junk {
        sieve_script report-spam {
            type  = before
            cause = copy
            path  = /usr/local/bin/dovecot-sieve/report-spam.sieve
        }
    }
    imapsieve_from Junk {
        sieve_script report-ham {
            type  = before
            cause = copy
            path  = /usr/local/bin/dovecot-sieve/report-ham.sieve
        }
    }
}

Afther restart it's working:
Code:
doveconf >/dev/null
systemctl restart dovecot

with a lot of help of @Richard G ofc ;)
 
Last edited:
Back
Top