- Overview
- Installing
- Configuring
- Download my dovecot's config files
- dovecot.conf
- 10-auth.conf
- auth-sql.conf.ext
- 10-logging.conf
- Logrotate
- 10-mail.conf
- 10-master.conf
- 10-metrics.conf
- 10-ssl.conf
- 15-lda.conf
- 15-mailboxes.conf
- 20-imap.conf
- 20-pop3.conf
- 90-quota.conf
Changelog
- Feb 15, 2025
- added support forvpopmail
configured with--disable-many-domains
- 90-sieve.conf: global script move-spam.sieve called correctly - Feb 8, 2025
- dovecot_postlogin.sh: query changed in order to add new records as well (tx Bai Borko)
- bug fix: pop3 service was executing imap instead of pop3 (tx Gabriel Torres) - Jan 29, 2025
- dovecot upgraded to v. 2.4.0. Old configuration files are not valid anymore and you have to install dovecot from scratch. - Nov 15, 2024
- added a postlogin script to update the vpopmail.lastauth SQL table on login (see 10-master.conf, thanks kengheng) - Dec 29, 2023
default_pass_scheme = SHA512-CRYPT (was MD5-CRYPT) in dovecot-sql.conf.ext, as vpopmail-5.6.x has now SHA512-CRYPT password by default
Overview
- Info: http://www.dovecot.org/
- Documentation: https://doc.dovecot.org/
- My config files (github)
- Download: https://www.dovecot.org/releases/2.4/
- Version: dovecot-2.4.0
Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory.
Installing
DOVECOT_VER=2.4.0 cd /usr/local/src wget https://www.dovecot.org/releases/2.4/dovecot-${DOVECOT_VER}.tar.gz tar xzf dovecot-${DOVECOT_VER}.tar.gz chown -R root:root dovecot-${DOVECOT_VER} cd dovecot-${DOVECOT_VER} ./configure \ --prefix=/usr/local/dovecot \ --with-sql \ --with-mysql \ --with-ldap \ --without-pam \ --without-pgsql \ --without-sqlite \ --with-solr \ --with-bzlib \ --with-lz4 Install prefix . : /usr/local/dovecot File offsets ... : 64bit I/O polling .... : epoll I/O notifys .... : inotify SSL ............ : openssl GSSAPI ......... : no passdbs ........ : static passwd passwd-file ldap sql : -pam -bsdauth userdbs ........ : static prefetch passwd passwd-file ldap sql CFLAGS ......... : -std=gnu11 -g -O2 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -mfunction-return=keep -mindirect-b ranch=keep -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-b uiltin-strftime -Wstrict-aliasing=2 SYSTEMD ........ : simple - (no unit file) SQL drivers .... : mysql : -pgsql -sqlite -cassandra Full text search : solr flatcurve
In case you are compiling in a systemd
environment you may need to add "--with-systemd systemdsystemunitdir
" option to your configure (thanks to Bob Greco), for example:
--with-systemd \ systemdsystemunitdir=/lib/systemd/system
Check if SSL was detected and if the sql/mysql
authentication backend is supported. Compile:
make
If the old dovecot
is running, stop it and delete the symbolic link before installing:
dovecotctl stop rm /usr/local/dovecot make install cd /usr/local mv dovecot dovecot-${DOVECOT_VER} ln -s dovecot-${DOVECOT_VER} dovecot
dovecot
in /usr/local/dovecot.Configuring
Create the dovecot
user/group, the log and the run directories.
groupadd dovecot useradd -g dovecot dovecot useradd -g dovecot dovenull mkdir -p /var/log/dovecot touch /var/log/dovecot/dovecot.log chgrp vchkpw /var/log/dovecot/dovecot.log chmod 660 /var/log/dovecot/dovecot.log mkdir -p /usr/local/dovecot/var/run/dovecot chown dovenull:dovecot /usr/local/dovecot/var/run/dovecot
Starting from version 2.4.0 no example config files are shipped with the sources, but they were ported once in the dovecot
mailing list. I saved them in my github space and you can download them as follows:
git clone -b example-config-2.4.0 https://github.com/sagredo-dev/dovecot-conf.git
Check that the PATH
and MANPATH
variables are already set in your /etc/profile.d/qmail.sh:
export PATH=$PATH:/usr/local/dovecot/bin export MANPATH=$MANPATH:/usr/local/dovecot/share/man
Download my dovecot's config files
- Download from here
I strongly suggest to use my config files and then customize them editing the local.conf file.
DOVECOT_CONFIG_VER=2025.02.15 cd /usr/local/dovecot mv etc etc-bak wget https://github.com/sagredo-dev/dovecot-conf/archive/refs/tags/v${DOVECOT_CONFIG_VER}.tar.gz tar xzf v${DOVECOT_CONFIG_VER}.tar.gz ln -s dovecot-conf-${DOVECOT_CONFIG_VER} etc cd etc/dovecot chown -R root:root .
Rename the local.conf.template file and adjust it to your needs:
mv local.conf.template local.conf
dovecot.conf
# Default values are shown for each setting, it's not required to uncomment # those. These are exceptions to this though: No sections (e.g. namespace {}) # or plugin settings are added by default, they're listed only as examples. # Paths are also just examples with the real defaults being based on configure # options. The paths listed here are for configure --prefix=/usr/local # --sysconfdir=/usr/local/etc --localstatedir=/var dovecot_config_version = 2.4.0 dovecot_storage_version = 2.4.0 # Protocols we want to be serving. protocols { imap = yes pop3 = yes } # A comma separated list of IPs or hosts where to listen in for connections. # "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces. # If you want to specify non-default ports or anything more complex, # edit conf.d/master.conf. listen { * = yes :: = no } # Most of the actual configuration gets included below. The filenames are # first sorted by their ASCII value and parsed in that order. The 00-prefixes # in filenames are intended to make it easier to understand the ordering. !include conf.d/*.conf # A config file can also tried to be included without giving an error if # it's not found: !include_try local.conf
Note that all conf.d/*.conf files will be included, so rename what is not needed.
10-auth.conf
Starting from version 2.3.13 the vpopmail-auth
driver has been removed. Those who want to stick with the old vpopmail
can refer to the patch maintained by Ali Erturk TURKER, which restores to life that original vpopmail-auth
driver. This driver is not available for dovecot 2.4
.
What follows concerns the sql
driver configuration. In my opinion sql
is preferable because the vpopmail
driver misses the iteration feature, which is needed to expunge old junk and trash mails, a task that will be not easy to achieve without it.
# if the roundcube connection is from the local net this is secure provided that the 143 port is firewalled for the outnet # put yes if you have roundcube on localhost auth_allow_cleartext = yes auth_mechanisms = plain login # the sql drivers requires that the pwd is transmitted with no encryption # !include auth-system.conf.ext # now commented out !include auth-sql.conf.ext
auth-sql.conf.ext
NB: the password_query
requires that you installed the aliasdomains
dbtable as explained here.
# https://doc.dovecot.org/latest/core/config/auth/databases/sql.html#mysql sql_driver = mysql # Default password scheme. # List of supported schemes is in # https://doc.dovecot.org/latest/core/config/auth/schemes.html # This is important if you have old MD5-CRYPT passwords accepted auth_allow_weak_schemes = yes passdb_default_password_scheme = SHA512-CRYPT # The mysqld.sock socket may be in different locations in different systems. #mysql /var/run/mysqld/mysqld.sock { # overwritten by local.conf #mysql localhost { # user = vpopmail # password = xxxxxxxxxxxxxxxxxxx # dbname = vpopmail #} # grab the sql queries for the specific situation # auth-sql --enable-many-domains --enable--sql-aliasdomain --enable-mysql-limits !include sql-query-default.conf.ext # auth-sql --disable-many-domains --enable--sql-aliasdomain --enable-mysql-limits #!include sql-query--disable-many-domains.conf.ext
The sql query will be different depending if you have configured vpopmail
with --disable-many-domains
(default configuration suggested in this guide) or not
sql-query-default.conf.ext
This is the default file for --disable-many-domains
.
passdb sql { # passdb query to retrieve the password. It can return fields: # password - The user's password. This field must be returned. # user - user@domain from the database. Needed with case-insensitive lookups. # username and domain - An alternative way to represent the "user" field. # # The "user" field is often necessary with case-insensitive lookups to avoid # e.g. "name" and "nAme" logins creating two different mail directories. If # your user and domain names are in separate fields, you can return "username" # and "domain" fields instead of "user". # (Thanks to Arturo Blanco for his hints concerning vpopmail limits # and to Alexandre Fonceca for the quota_rule addition) # NB: This query requires the sql-aliasdomains feature # and that you have added the aliasdomains db table # More info here More info here https://notes.sagredo.eu/en/qmail-notes-185/dovecot-vpopmail-auth-driver-removal-migrating-to-the-sql-driver-241.html query = \ SELECT \ CONCAT(vpopmail.pw_name, '@', vpopmail.pw_domain) AS user, \ vpopmail.pw_passwd AS password, \ vpopmail.pw_dir AS userdb_home, \ 89 AS userdb_uid, \ 89 AS userdb_gid, \ CONCAT('*:bytes=', REPLACE(SUBSTRING_INDEX(vpopmail.pw_shell, 'S', 1), 'NOQUOTA', '0')) AS userdb_quota_rule \ FROM vpopmail \ LEFT JOIN aliasdomains ON aliasdomains.alias='%{user | domain}' \ LEFT JOIN limits ON limits.domain='%{user | domain}' \ WHERE \ vpopmail.pw_name='%{user | username}' \ AND \ (vpopmail.pw_domain='%{user | domain}' OR vpopmail.pw_domain=aliasdomains.domain) \ AND \ ('%{local_port}'!='995' OR !(vpopmail.pw_gid & 2)) \ AND \ ('%{remote_ip}'!='127.0.0.1' OR !(vpopmail.pw_gid & 4)) \ AND \ ('%{remote_ip}'='127.0.0.1' OR '%{local_port}'!='993' OR !(vpopmail.pw_gid & 8)) \ AND \ ('%{remote_ip}'!='127.0.0.1' OR COALESCE(disable_webmail,0)!=1) \ AND \ ('%{remote_ip}'='127.0.0.1' OR COALESCE(disable_imap,0)!=1) # 127.0.0.1 is the IP of your webmail # I'm assuming that the imap connection is only on port 993 and the pop3 connection is on port 995. # Adjust to your needs # logically this means: # # ************************** USER LIMITS via vpopmail.pw_gid filed # SELECT user # WHEN POP is not disabled for that user connecting on port 995 (995 is the pop3s port allowed from remote in my configuration) # AND WHEN webmail access is not disabled for that user when connecting from 127.0.0.1 # AND WHEN IMAP is not disabled for that user connecting on port 993 (993 is the imap port allowed from remote # in my configuration) unless his remote ip the one belonging to the webmail # # ************************* DOMAIN LIMITS via limits table # AND WHEN WEBMAIL access for the domain is not disabled # AND WHEN IMAP access for the domain is not disabled when not connecting from 127.0.0.1 } # "prefetch" user database means that the passdb already provided the # needed information and there's no need to do a separate userdb lookup. # https://doc.dovecot.org/configuration_manual/authentication/prefetch_userdb/ userdb prefetch { driver = prefetch } # This is needed for LDA and for the iteration feature. They both need a userdb sql query. # The order of the declared drivers is important. Leave this at the end, otherwise # it will be used also for the login instead of the prefetch, which is faster. userdb sql { userdb_sql_query = \ SELECT \ vpopmail.pw_dir AS home, \ 89 AS uid, \ 89 AS gid \ FROM vpopmail \ WHERE \ vpopmail.pw_name='%{user | username}' \ AND \ vpopmail.pw_domain='%{user | domain}' # Query to get a list of all usernames. userdb_sql_iterate_query = SELECT CONCAT(pw_name,'@',pw_domain) AS user FROM vpopmail }
"One table per domain" query
The above solution has to be enhanced when you store your accounts in one table for each domain (--disable-many-domains
), because you have to retrieve the real domain in case of aliases, guess the dbtable and then execute the passdb
query and the userdb
query. This task can be accomplished by "stored procedures" (thanks to Pablo Murillo for sharing his sql example).
I have created two procedures, one to be used for the passdb query and another one to be used for the userdb query. They do the sql stuff.
You have to include the file sql-query--disable-many-domains.conf.ext in auth-sql.conf.ext:
# auth-sql --enable-many-domains --enable--sql-aliasdomain --enable-mysql-limits #!include sql-query-default.conf.ext # auth-sql --disable-many-domains --enable--sql-aliasdomain --enable-mysql-limits !include sql-query--disable-many-domains.conf.ext
In the sql-query--disable-many-domains.conf.ext file you have the call for the above mentioned procedures:
passdb sql { # passdb query to retrieve the password # Thanks to Pablo Murillo for sharing his sql example query = CALL dovecot_password_query_disable_many_domains('%{user | username}','%{user | domain}','127.0.0.1','%{remote_ip}','%{local_port}') } userdb prefetch { driver = prefetch } # This is needed for LDA and for the iteration feature. They both need a userdb sql query. # The order of the declared drivers is important. Leave this at the end, otherwise # it will be used also for the login instead of the prefetch, which is faster. userdb sql { userdb_sql_query = CALL dovecot_user_query_disable_many_domains('%{user | username}','%{user | domain}') }
To install the procedures you have to download and execute the code above as follows. This is not needed in case of a fresh installation of vpopmail
.
wget https://notes.sagredo.eu/files/qmail/patches/vpopmail/disable-many-domains_procedures.txt mysql < disable-many-domains_procedures.txt -u root -p
10-logging.conf
Set your log destination. I prefer to have a dedicated logfile for dovecot
(default is syslog)
log_path = /var/log/dovecot/dovecot.log # Log file to use for debug messages. Defaults to info_log_path. debug_log_path = /var/log/dovecot/dovecot.log
To enable debug just uncomment this line in your local.conf:
log_debug = (category=imap AND category=mail AND category=auth AND category=ssl)
Logrotate
Save the below scriptlet as /etc/logrotate.d/dovecot:
cat > /etc/logrotate.d/dovecot << __EOF__ /var/log/dovecot/*.log { missingok notifempty delaycompress sharedscripts postrotate /usr/local/dovecot/bin/doveadm log reopen endscript } __EOF__
10-mail.conf
We have to tell dovecot
which is the mailbox location. It will look for the Maildir
in the home directory (%h
):
# Mailbox format mail_driver = maildir # Path to a directory where the mail is stored. # Mail User Variables are commonly used here. # Specific to mail_driver setting mail_path = ~/Maildir # this is to allow special characters like '.' in mailboxes like in Junk.TeachSpam # https://doc.dovecot.org/latest/core/config/mailbox/mail_location.html#mailbox_list_validate_fs_names mailbox_list_validate_fs_names = no namespace inbox { # There can be only one INBOX, and this setting defines which namespace # has it. inbox = yes }
Set to 89 (vpopmail
userid number) the mail_uid
and mail_gid
. The same for the valid first/last id as you want to manage only vpopmail
users:
mail_uid = 89 mail_gid = 89 mail_privileged_group = 89 mail_access_groups = 89 first_valid_uid = 89 last_valid_uid = 89 first_valid_gid = 89 last_valid_gid = 89
Adjust the socket:
auth_socket_path = /usr/local/dovecot/var/run/dovecot/auth-userdb
Set the default plugins
# Space separated list of plugins to load for all services. Plugins specific to # IMAP, LDA, etc. are added to this list in their own .conf files. mail_plugins { fts = yes fts_solr = yes notify = yes quota = yes }
Finally, this has to be enabled because of the troubles caused by a broken maildir++
patch (now repaired, tx MG)
## ## Maildir-specific settings ## # If enabled, Dovecot doesn't use the S=<size> in the Maildir filenames for # getting the mail's physical size, except when recalculating Maildir++ quota. # This can be useful in systems where a lot of the Maildir filenames have a # broken size. The performance hit for enabling this is very small. maildir_broken_filename_sizes = yes
10-master.conf
Read carefully this before continuing.
# Login user is internally used by login processes. This is the most untrusted # user in Dovecot system. It shouldn't have access to anything at all. # default_login_user = vpopmail # not working here # Internal user is used by unprivileged processes. It should be separate from # login user, so that login processes can't disturb other processes. default_internal_user = dovecot service imap-login { inet_listener imap { #port = 143 } inet_listener imaps { #port = 993 #ssl = yes } } service pop3-login { inet_listener pop3 { #port = 110 } inet_listener pop3s { #port = 995 #ssl = yes } } service imap { # executable = imap postlogin } service pop3 { # executable = pop3 postlogin } # Updates the vpopmail.lastauth table on login. Uncomment the executable on imap and pop3 service postlogin { # path is relative to /usr/local/dovecot/libexec/dovecot/ executable = script-login ../../etc/scripts/dovecot_postlogin.sh user = vpopmail unix_listener postlogin { user = vpopmail group = vchkpw mode = 0660 } } service auth { # auth_socket_path points to this userdb socket by default. It's typically # used by dovecot-lda, doveadm, possibly imap process, etc. Users that have # full permissions to this socket are able to get a list of all usernames and # get the results of everyone's userdb lookups. # # The default 0666 mode allows anyone to connect to the socket, but the # userdb lookups will succeed only if the userdb returns an "uid" field that # matches the caller process's UID. Also if caller's uid or gid matches the # socket's uid or gid the lookup succeeds. Anything else causes a failure. # # To give the caller full permissions to lookup all users, set the mode to # something else than 0666 and Dovecot lets the kernel enforce the # permissions (e.g. 0777 allows everyone full permissions). unix_listener auth-userdb { mode = 0660 user = vpopmail group = vchkpw } # Auth process is run as this user. user = $SET:default_internal_user } service auth-worker { # Auth worker process is run as root by default, so that it can access # /etc/shadow. If this isn't necessary, the user should be changed to # $SET:default_internal_user. user = $SET:default_internal_user }
You may want to run the postlogin script /usr/local/dovecot/etc/scripts/dovecot_postlogin.sh to update the vpopmail.lastauth SQL
table on login. In this case uncomment the executable line in the imap
and pop3
services and give it the x
flag.
chmod +x /usr/local/dovecot/etc/scripts/dovecot_postlogin.sh
10-metrics.conf
service stats { unix_listener stats-reader { user = vpopmail group = vchkpw mode = 0660 } unix_listener stats-writer { user = vpopmail group = vchkpw mode = 0660 } }
10-ssl.conf
Of course we want SSL support. First of all let's create a self-signed SSL certificate. Dovecot includes a script to build self-signed SSL certificates using OpenSSL; you can find it in doc/mkcert.sh:
cd /usr/local/src/dovecot/doc
mkcert.sh
will create the SSL certificate. Before running mkcert.sh
you have to customize the cert editing dovecot-openssl.cnf
(in the same folder):
> nano dovecot-openssl.cnf [ req ] default_bits = 4096 encrypt_key = yes distinguished_name = req_dn x509_extensions = cert_type prompt = no [ req_dn ] # country (2 letter code) C=IT # State or Province Name (full name) ST=Italy # Locality Name (eg. city) L=MyLocality # Organization (eg. company) O=My Organization Name # Organizational Unit Name (eg. section) OU=IMAP server # Common Name (*.example.com is also possible) CN=mymailserver.net # E-mail contact emailAddress=postmaster@mymailserver.net [ cert_type ] nsCertType = server
Now we are ready to create the SSL certificate:
> sh mkcert.sh
and the files /etc/ssl/private/dovecot.pem and /etc/ssl/certs/dovecot.pem have been created. Remember their locations because you have to insert them in 10-ssl.conf or better in your local.conf:
ssl_server_cert_file = /etc/ssl/certs/dovecot.pem ssl_server_cert_file = /etc/ssl/private/dovecot.pem
Remember also to switch off SSLv3 because of security reasons:
ssl_min_protocol = TLSv1
Installing a valid certificate
When your configuration is finished and you have your server working, it will be the case to install a valid certificate, following the directives from the page "Installing a valid SSL certificate". Once you obtain the certificate, you just have to adjust these two lines in your local.conf:
ssl_server_cert_file = /etc/dehydrated/certs/mx.mydomain.tld/fullchain.pem ssl_server_cert_file = /etc/dehydrated/certs/mx.mydomain.tld/privkey.pem
Be aware that in version 2.4 there is no "<" prefix anymore in the certificate path.
15-lda.conf
As I already said dovecot
will also act as an LDA because we want to manage sieve rules and filter our incoming emails.
# These two can be overwritten in your local.conf postmaster_address = postmaster@yourdomain.net hostname = mail.yourdomain.net protocol lda { # Boolean list of plugins to load mail_plugins { # overwrite in local.conf. Disabled to let dovecot start without sieve installed # sieve = yes } }
15-mailboxes.conf
The autoexpunge setting assures the expunge of Trash and Junk folders after a certain number of days.
## ## Mailbox definitions ## # NOTE: Assumes "namespace inbox" has been defined in 10-mail.conf. namespace inbox { # These mailboxes are widely used and could perhaps be created automatically: mailbox Drafts { special_use = \Drafts auto = subscribe } mailbox Junk { special_use = \Junk autoexpunge = 30d } mailbox Junk.TeachSpam { auto = subscribe autoexpunge = 30d } mailbox Junk.TeachNotSpam { auto = subscribe autoexpunge = 30d } mailbox Trash { special_use = \Trash autoexpunge = 60d } # For \Sent mailboxes there are two widely used names. We'll mark both of # them as \Sent. User typically deletes one of them if duplicates are created. mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } }
20-imap.conf
protocol imap { # Space separated list of plugins to load (default is global mail_plugins). mail_plugins { notify = yes mail_log = yes imap_sieve = yes imap_quota = yes } }
20-pop3.conf
protocol pop3 { # Space separated list of plugins to load (default is global mail_plugins). mail_plugins { notify = yes mail_log = yes } }
90-quota.conf
Enable maildir++
in this way
quota "User quota" { driver = maildir enforce = no }
Comments
dovecot 2.4.0: pop3 connection hangs with postlogin script enabled
Gabriel Torres February 7, 2025 23:10 CET
Hi Roberto,
Here the dovecot 2.4.0 pop3 connection hangs after login when the postlogin script is enabled. Disabling this script at 10-master solved the issue. IMAP connections work fine with the postlogin script enabled. This is something to be further investigated.
Cheers!
Reply | Permalink
dovecot 2.4.0: pop3 connection hangs with postlogin script enabled
Roberto Puzzanghera Gabriel Torres February 8, 2025 08:00 CET
Thanks for the advise, it was executing imap instead of pop3. Corrected
Reply | Permalink
Dovecot 2.4.0 released - incompatible config files
Gabriel Torres January 24, 2025 21:10 CET
Hi Roberto,
Dovecot 2.4.0 has just been released, and the config files won't work without updating them to the new format.
Please take a look into this when you have the chance and update this tutorial, please. I am stuck here... LOL
Thank you as always
Gabriel.
Reply | Permalink
Dovecot 2.4.0 released - incompatible config files
Roberto Puzzanghera Gabriel Torres January 28, 2025 18:59 CET
you have here my working configuration https://notes.sagredo.eu/files/qmail/dovecot/dovecot-2.4.conf.tar.gz
you can find here https://notes.sagredo.eu/files/qmail/dovecot/dovecot-2.4.0-example-config.tar.gz the example config that they published in the mailing list.
With respect to the 2.3 version, I had to enable ldap in dovecot, otherwise pigeonhole won't compile, and give dovenull:dovenull the ownership of the dovecot/run directory
Please test if you can
Reply | Permalink
Dovecot 2.4.0 released - incompatible config files
Roberto Puzzanghera Gabriel Torres January 25, 2025 08:13 CET
Hi Gabriel,
I think that there is much work to do this time, as there's no example config available and the documentation is scarse.
Reply | Permalink
Dovecot 2.4.0 released - incompatible config files
Gabriel Torres Roberto Puzzanghera February 1, 2025 15:25 CET
Hi Roberto,
Thank you so much for taking the time and updating the script. I re-installed dovecot from scratch using your guide and everything seems to be working fine, but I'd like to point out a couple of things to fix in your guide.
[1]
Should be:
[2]
and
These options have changed to:
[3]
because you have to insert them in 10-ssl.conf it is best to not touch 10-ssl.conf and add the certificate/key paths in local.conf instead.
[4]
Starting dovecot for the first time with dovecotctl start will give an error as pigeonhole isn't installed yet, so we can't actually test the installation. Therefore I'd reverse the order in the tutorial, showing how to compile and configure pigeonhole first, and then starting dovecot for the first time and testing it.
I hope I have helped.
Cheers,
Gabe.
Reply | Permalink
Dovecot 2.4.0 released - incompatible config files
Roberto Puzzanghera Gabriel Torres February 1, 2025 16:47 CET
Hi Gabriel, thanks for the contribution.
for me installing pigeonhole before dovecot doesn't make much sense, as dovecot is a prerequisite of pigeonhole. Installing dovecot and then pigeonhole before configuring is something I don't like.
I think that we should rename 20-managesieve.conf as 20-managesieve.conf.disabled, the same for 90-sieve.conf. Then disable the sieve plugin into 15-lda.conf. The user can then rename those files once (s)he has installed pigeonhole and enable the sieve plugin editing local.conf.
I'll make some test and then update the guide.
Reply | Permalink
Dovecot 2.4.0 released - incompatible config files
Roberto Puzzanghera Roberto Puzzanghera February 1, 2025 18:40 CET
disabling the sieve protocol in 15-lda.conf was sufficient to let dovecot start with no errors. I moved that option in local.conf
Reply | Permalink
Dovecot login update timestamp in lastauth table
kengheng November 14, 2024 08:39 CET
I found that the dovecot imap/pop3 did not update the vpopmail table lastauth column timestamp. I've created below scripts to update the timestamp column.
Reply | Permalink
Dovecot login update timestamp in lastauth table
kengheng kengheng November 15, 2024 17:45 CET
A minor add-on to update the remote_ip column at postlogin.sh:
Reply | Permalink
Dovecot login update timestamp in lastauth table
Bai Borko kengheng February 7, 2025 16:45 CET
Hi Roberto, Kengheng,
If allow relaying localnet for example 10.0.0.x/24 in tcp.smtp and local clients are not configured to use SMTP authentication qmail not update/add records into table lastauth.
The dovecot_postlogin.sh also will not update/add records into lastauth because it is missing user + domain (They are private key), because the where clause is : UPDATE SET ... ... WHERE user='$u' and domain='$d'.
In this case missing logging information for the all local clients.
To fix this I changed the sql query in your dovecot_postlogin.sh.
With "export MYSQL_PWD=$PWD" also changed the login method. This stops stupit warnings "mysql: [Warning] Using a password on the command line interface can be insecure." in dovecot.log
Reply | Permalink
Dovecot login update timestamp in lastauth table
Roberto Puzzanghera Bai Borko February 7, 2025 17:11 CET
Thank you, corrected
Reply | Permalink
Dovecot login update timestamp in lastauth table
Roberto Puzzanghera kengheng November 15, 2024 12:04 CET
added: https://github.com/sagredo-dev/dovecot-conf/blob/main/scripts/dovecot_postlogin.sh
I've just avoided that additional config file with the mysql credentials
Reply | Permalink
Dovecot login update timestamp in lastauth table
Roberto Puzzanghera kengheng November 14, 2024 13:05 CET
Thank you, very much appreciated. I'll add it to this guide
Reply | Permalink
Email Port
Kenny Lee February 26, 2024 06:25 CET
Hi Roberto,
wanna check with you.. after we installed Dovecot... is it below those ports are under Dovecot control?
110/tcp pop3
143/tcp imap
993/tcp imaps
995/tcp pop3s
and for Qmail, it only handle for port 25 (smtp) and 587 (submission) only?
thank you
Reply | Permalink
Email Port
Roberto Puzzanghera Kenny Lee February 26, 2024 11:07 CET
It depends on how you configured your server.
If you strictly followed my configuration, dovecot listens on ports 110 143 993 and 995. Qmail listens on ports 25 587 and also 465.
Qmail can be configured to listen to pop3 ports too, but not in the setup that I suggest here
Reply | Permalink
dovecot + vpopmail cdb
Joćo September 19, 2023 13:17 CET
Hi Roberto, My current qmail installation is a qmailtoaster from Bill Shupp and I'm working to migrate my installation from centos7 to rockylinux8 because end of life of centos7. I've tried to compile my old packages of courier-imap on rockylinux8, but imap-ssl didn't work and I'm thinking to change to dovecot. I use vpopmail cdb auth. Do you have references for install dovecot with cdb auth? I'd like to use dovecot only for imap and imap-ssl. Thank you very much João
Reply | Permalink
dovecot + vpopmail cdb
Roberto Puzzanghera Joćo September 19, 2023 14:23 CET
Hi, you can patch dovecot to use the old vpopmail driver. Look at the patch by Ali above in the Auth section.
Concerning the migration from shupp toaster, just patch and recompile qmail and vpopmail, then download and install the new supervise scripts.
Reply | Permalink
dovecot + vpopmail cdb
Joćo Roberto Puzzanghera September 19, 2023 16:13 CET
Hi Roberto, thank you for replying.
I could patch dovecot and compile.
If I download your dovecot config files (https://notes.sagredo.eu/files/qmail/dovecot/dovecot.conf.tar.gz), do I need just change 10-master.conf with the directives for vpopmail user?
João
Reply | Permalink
dovecot + vpopmail cdb
Joćo Joćo September 19, 2023 17:58 CET
Hi Roberto,
I was trying in dovecot 2.3.21 and patch is for dovecot 2.3.20.
When I patched, I can't compile :/
Reply | Permalink
dovecot + vpopmail cdb
Roberto Puzzanghera Joćo September 19, 2023 18:48 CET
It works with 2.3.21 as well. You have to provide
before configuring to rebuild the Configure
Reply | Permalink
dovecot + vpopmail cdb
Joćo Roberto Puzzanghera September 19, 2023 21:56 CET
Hi Roberto, thank you.
I was able to compile new version of courier imap, but I'll try dovecot in another test server. When I finish, I'll back here with results.
Thank you very much
Joao
Reply | Permalink
dovecot + vpopmail cdb
Joćo Joćo September 22, 2023 21:46 CET
Hi Roberto,
I was able to compile, start and connect to port 143 and 993 for test.
When I tried to login, didn't work. I've changed 10-master.conf acording patch information.
Do you have any idea?
Thanks
Joao
Reply | Permalink
dovecot + vpopmail cdb
Roberto Puzzanghera Joćo September 22, 2023 21:50 CET
Are you configuring as shown above? Disable that pam Auth driver and recompile
Reply | Permalink
dovecot + vpopmail cdb
Joćo Roberto Puzzanghera September 22, 2023 22:09 CET
Hi Roberto,
I tried without pam, but with error. Without pam I can't connect to port 143 or 993.
Reply | Permalink
dovecot + vpopmail cdb
Roberto Puzzanghera Joćo September 22, 2023 22:13 CET
You're not configuring it to use Pam but you're trying to use that auth method anyway. What do you have in 10-auth.conf?
Reply | Permalink
dovecot + vpopmail cdb
Roberto Puzzanghera Roberto Puzzanghera September 22, 2023 22:03 CET
I think that you are including the system Auth driver, which is based on Pam, in 10-auth.conf. You have to include only the vpopmail driver there
Reply | Permalink
dovecot + vpopmail cdb
Joćo Roberto Puzzanghera September 22, 2023 22:18 CET
Hi Roberto,
Sure! I've eneble only vpopmail now and removed all others.
!include auth-vpopmail.conf.ext
The error changed:
I've double check my file 10-master.conf and seens ok.
Any idea?
Thank you
Joao
Reply | Permalink
dovecot + vpopmail cdb
Roberto Puzzanghera Joćo September 22, 2023 22:33 CET
Which is the uid/gid of the vpopmail user and group? Set 10-master accordingly. It has 89.89 by default
Reply | Permalink
dovecot + vpopmail cdb
Joćo Savioli Roberto Puzzanghera September 24, 2023 12:56 CET
Hi Roberto, Fixed!
I've uncommented these lines in conf file 10-mail.conf and changed for numbers that 89 was included, like this:
Thank you for all
Your website is the best in the wordl about qmail.
Thanks again
Joao
Reply | Permalink
dovecot + vpopmail cdb
Roberto Puzzanghera Joćo Savioli September 24, 2023 13:35 CET
You should set 89 everywhere, as already mentioned in my example above
Reply | Permalink
dovecot + vpopmail cdb
Joćo Savioli Roberto Puzzanghera September 24, 2023 12:30 CET
Hello Roberto, sorry for delay.
Seems ok, right?
10-master.conf
Thank you
João
Reply | Permalink
dovecot + vpopmail cdb
Roberto Puzzanghera Joćo September 19, 2023 16:56 CET
I'm not using the vpopmail driver anymore, but I'm pretty sure that the answer is yes, as dovecot needs to run vchkpw as the vpopmail user. In any case that recommendation was written by the author of the patch himself, so it's garanteed that it's ok
Reply | Permalink
dovecot + vpopmail cdb
Roberto Puzzanghera Roberto Puzzanghera September 19, 2023 17:43 CET
And it was reported here that also the auth worker has to be changed https://notes.sagredo.eu/en/qmail-notes-185/installing-dovecot-and-sieve-on-a-vpopmail-qmail-server-28.html#comment1176
Please let me know how is your working configuration once finished, so that I can improve my instructions here
Reply | Permalink
dovecot without mysql
Joao July 27, 2023 21:23 CET
Hi Roberto,
I don't use mysql in my vpopmail. My current imap is courier-imap.
Do you have steps to install dovecot without mysql?
Thanks
Joao
Reply | Permalink
dovecot without mysql
Roberto Puzzanghera Joao July 28, 2023 10:03 CET
I created a dedicated page here which holds the ALI Erturk Turker's patch informations
Reply | Permalink
dovecot without mysql
Roberto Puzzanghera Joao July 28, 2023 09:03 CET
Hi Joao,
unfortunately no. I used Courier ages ago, before switching to dovecot
Reply | Permalink
dovecot without mysql
Roberto Puzzanghera Roberto Puzzanghera July 28, 2023 09:06 CET
But if your problem is avoiding mysql, you can use the dovecot's vpopmail driver that a friend of this blog restored to life. Have a look here. You can find Ali's patch here
Reply | Permalink
Small typo in dovecot-sql.conf.ext_original
Gabriel Torres August 8, 2021 03:26 CET
Here: https://notes.sagredo.eu/files/qmail/dovecot-etc/dovecot/dovecot-sql.conf.ext_original
It is missing a backslash!
Correct:
Otherwise we see the following error:
Reply | Permalink
Small typo in dovecot-sql.conf.ext_original
Roberto Puzzanghera Gabriel Torres August 8, 2021 07:21 CET
Thanks for the advise. I'll correct in a few days when I'll be back home
Reply | Permalink
QUOTA backend defined incorrectly
a.key March 16, 2021 19:30 CET
Incorrect Maildir++ backend definition in the documentation.
Spent ages on trying to find out why QUOTA is not working on a recent version of Dovecot installation (2.3.13).
Don't use this quota definition for Maildir++ quota backend:
This will break email clients!!! Read the documentation: https://wiki.dovecot.org/Quota/Configuration#Quota_Configuration
The BAD BAD BAD format above is supposed to fix Apple mail apparently. But it breaks everything else!!! Don't even know if it actually helps Apple mail...
The proper way of defining it is like this:
As per the documentation the format is:
In essence the Name/quota root name part doesn't really mean anything it should remain empty. Maildir++ doesn't need any backend args hence it's empty as well.
The following formats will work as well:
Just don't use the "quota = maildir:User quota:quota" literally (copy/paste)! It won't work.
Testing
Basically - there are two tools that you can use to check what dovecot thinks about your quota:
- doveadm quota -u
- Login over telnet IMAP and issue: GETQUOTA ""
About the tools doveadm quota
For whatever reason doveadm quota -u missreports the values. In my case it shows values 1000 times lower. This means that instead of showing 50G it shows 50M. This one liner shows it best:
I don't know why it does it yet. I don't know why it doesn't show % of usage either when the manual for the command does show it. Maybe usage % is only shown when running against an interrative query (-A) option. Will check that later. It's useful to also run it with -D for debbuging but that's for another time.
IMAP session over telnet or netcat (optional SSL)
You can test IMAP using telnet (if you allow non encrypted logins to your server or you can use a recent version of nc (netcat) eg. nmap-ncat which supports the --ssl switch.
You can login like this:
There are 2 important things up there:
1. the capabilities after login show QUOTA
2. result to GETQUOTA "" command returned: * QUOTA "" (STORAGE 4806876 52428800)
Great! That's the desired result!
Reply | Permalink
QUOTA backend defined incorrectly
Roberto Puzzanghera a.key March 16, 2021 20:39 CET
Thank you for the contribution, as it contains several things that I didn't know.
The maildir settings that I use are reported at the page that you linked above and also in the example confg file that dovecot installs in share/doc/dovecot/example-config/, so I'm not sure that this is an incorrect definition.
Your suggested tests both via imap and via doveadm succeded here, but in the imap test I had to provide GETQUOTAROOT instead of GETQUOTA. Do you think this is normal?
EDIT: using your suggested settings I can see my quota via IMAP with the GETQUOTA command as well.
Reply | Permalink
Quota Issues with SQL
Alexandre Fonceca September 9, 2019 19:16 CET
I had some quota issues when using auth-sql.conf.ext instead of auth-vpopmail.conf.ext.
I was able to fix it by changing dovecot-sql.conf.ext with quota checking next to user_query:
Regards,
Reply | Permalink
Quota Issues with SQL
Roberto Puzzanghera Alexandre Fonceca September 9, 2019 20:25 CET
In my MariaDB 10.0 server I had to avoid that blank space after TRIM, otherwise that will throw the query into an error, so
In addition, once the query was executed, dovecot complains in this way:
Then I managed to get rid of this error avoiding the blank spaces in the dovecot's quota_rule as well, therefore the query becomes
Unfortunately I still get this error in case of users with NOQUOTA, I think because dovecot expects 0 as a code for unlimited quota.
Instead your query works fine here for users with a limited quota.
Any hint on how to adjust the query in order to eventually replace NOQUOTA with 0?
Reply | Permalink
Quota Issues with SQL
Roberto Puzzanghera Roberto Puzzanghera September 9, 2019 20:34 CET
this seems to work now...
Reply | Permalink
Quota Issues with SQL
Alexandre Fonceca Roberto Puzzanghera September 9, 2019 21:11 CET
indeed!
worked perfectly with noquota users too.
I use mariadb 10.1.41, it doesnt had the problems with blank spaces in TRIM()
Regards,
Reply | Permalink
Quota Issues with SQL
Tony Fung Alexandre Fonceca February 4, 2020 07:10 CET
I tried the TRIM and TRAILING in user_query as mentioned, but it doesn't work for me. The query cannot remove the string start from position of "S" to the end and cause error. I did rework the query to:
That's work without error and extract the quota value correctly. I am using MariaDB version 10.3.11. Hope can share this to help others have issues.
Reply | Permalink
Quota Issues with SQL
Roberto Puzzanghera Tony Fung February 4, 2020 10:48 CET
This seems to work fine with mariadb-10.0. I assume that there are problems with v.10.3. I'm going to accept your solution and change my documentation
Thank you
Reply | Permalink
10-ssl.conf needs key of at least 4096 instead of 1024
GoofY August 2, 2019 11:31 CET
Hi,
When creating the key (in part 10-ssl.cnf) you have to increase the limit of 1024 to 4096 otherwise ssl throws an error.
nano dovecot-openssl.cnf:
default_bits = 1024 has to be changed to:
default_bits = 4096
Reply | Permalink
10-ssl.conf needs key of at least 4096 instead of 1024
Roberto Puzzanghera GoofY August 2, 2019 11:58 CET
thank you
Reply | Permalink
Dovecot version 2.3.1 seems not to work with libc-2.28,
GoofY August 2, 2019 11:26 CET
Hi,
after compiling dovecot version 2.3.1 I got the following in my log's:
After compiling latest Dovecot (version 2.3.7.1) everything worked.
PS this is on Debian Buster.
Reply | Permalink
cannot start up dovecot
nic July 9, 2019 12:32 CET
Having this error. dovecot: Can't open log file /var/log/dovecot/dovecot.log: Read-only file system
Reply | Permalink
cannot start up dovecot
Roberto Puzzanghera nic July 9, 2019 13:11 CET
are you using my setup? in this case double check the priviledges in 10-master.conf
Reply | Permalink
cannot start up dovecot
nic Roberto Puzzanghera July 9, 2019 22:20 CET
Hi Roberto,
Replaced your 10-master.conf with the default and now another error.
10-ssl.conf line 6: Unknown setting: service { ssl
Line 6 in 10-ssl.conf is
ssl = yes
I replaced again with your 10-ssl.conf and still the same
thanks
nic
Reply | Permalink
cannot start up dovecot
Roberto Puzzanghera nic July 10, 2019 09:55 CET
If I grep the dovecot conf dir, there's no "service { ssl" line at all...
can you post the content of doveconf -n on pastebin?
Reply | Permalink
Error:_net_connect_unix(/usr/local/dovecot/var/run/dovecot/stats-writer)_failed:_Permission_denied
Gabriel Torres June 20, 2019 14:36 CET
If you see errors like this at /var/log/qmail/send/current:
You need to edit /usr/local/dovecot/etc/dovecot/dovecot.conf and add:
Reply | Permalink
imap-login: Info: Aborted login (no auth attempts in 0 secs): user=<>, rip=#.#.#.#, lip=#.#.#.#, session=
Nick Payne-Roberts February 20, 2018 13:00 CET
Hi there Roberto,
My system is CentOS-7 64bit, and runs as an LXC container under Proxmox on a dedicated server I rent. The domain for MX is mail.MYDOMAIN.TLD and the reverse lookup is working fine.
I've been pulling my hair out since yesterday with being able to log in from my mail client to Dovecot. I have downloaded and used your default config files for etc and modified them according to my TLD. But everytime I try to log in, the dovecot.log reports:
(i substituted my real IPs with hashes for privacy).
The user=<> is blank? Do you think I have an issue with vpopmail? I am able to add/remove domains and users using the vQAdmin or just by prompt without any problems, and the SQL database is updating accordingly.
The service is running as follows:
I've created the required pem files also.
Any help with where I should be looking to debug this would be greatly appreciated.
Reply | Permalink
imap-login: Info: Aborted login (no auth attempts in 0 secs): user=<>, rip=#.#.#.#, lip=#.#.#.#, session=
Roberto Puzzanghera Nick Payne-Roberts February 20, 2018 13:29 CET
Hi Nick, did you compile vpopmail with --enable-auth-module=mysql? Did you pass the vpopmail test from command line? If yes, please post the logs and an imap telnet session as explained in the "testing dovecot" page
Reply | Permalink
imap-login: Info: Aborted login (no auth attempts in 0 secs): user=<>, rip=#.#.#.#, lip=#.#.#.#, session=
Anonymous Roberto Puzzanghera February 20, 2018 14:51 CET
Hi again,
Just to add: As for vpopmail, i tested SMTP on 25 using swaks and it worked fine.
And then vpop_auth, by telnet to 89:
[...]
However!! SMTP on 587 seems to hang!
(then nothing forever!)
Reply | Permalink
imap-login: Info: Aborted login (no auth attempts in 0 secs): user=<>, rip=#.#.#.#, lip=#.#.#.#, session=
Roberto Puzzanghera Anonymous February 20, 2018 14:58 CET
check also the GREETDELAY value in your run file...
Reply | Permalink
imap-login: Info: Aborted login (no auth attempts in 0 secs): user=<>, rip=#.#.#.#, lip=#.#.#.#, session=
Roberto Puzzanghera Anonymous February 20, 2018 14:55 CET
this is a separate issue, I suggest to che check the logs. Please post a comment on the qmail/configuration page if you like
Reply | Permalink
imap-login: Info: Aborted login (no auth attempts in 0 secs): user=<>, rip=#.#.#.#, lip=#.#.#.#, session=
Anonymous Roberto Puzzanghera February 20, 2018 14:30 CET
Hi Roberto,
Many thanks for your prompt and kind help.
Yes, I compiled vpopmail with the mysql authentification module, and have tested it localy from prompt. Please see below my sucess with it (only locally):
Below is my dovecot.log output from the above session:
Reply | Permalink
imap-login: Info: Aborted login (no auth attempts in 0 secs): user=<>, rip=#.#.#.#, lip=#.#.#.#, session=
Roberto Puzzanghera Anonymous February 20, 2018 14:34 CET
So dovecot/vpopmail is fine. Check out your client's configuration
Reply | Permalink
imap-login: Info: Aborted login (no auth attempts in 0 secs): user=<>, rip=#.#.#.#, lip=#.#.#.#, session=
Anonymous Roberto Puzzanghera February 20, 2018 14:57 CET
I see that qmail seems to be issue with login:
Reply | Permalink
Dovecot vpopmail userdb and passdb without SQL backend.
Dmitry January 24, 2018 07:31 CET
Some fixes required in your config files.
I've installed dovecot and added just auth-vpopmail.conf.ext in 10-auth.conf
But authentication was broken. (always unknown user)
After some investigation i found that auth-worker works with "default_internal_user" (which is dovecot) with no access to vpopmail domains.
So i suugest to add dovecot to "vchkpw" group or swithch auth-worker to vpopmail user...
Thanks.
Reply | Permalink
Dovecot vpopmail userdb and passdb without SQL backend.
Roberto Puzzanghera Dmitry January 24, 2018 08:19 CET
My configuration concerns the sql auth driver, so these fixes are not needed. Of course some adjustments would be needed if using the vpopmail driver
Reply | Permalink
Dovecot vpopmail userdb and passdb without SQL backend.
Roberto Bravo Roberto Puzzanghera December 2, 2018 11:55 CET
Sorry, I forget it. You must change 'service auth' user too, if you need vpopmail driver.
from:
to:
Reply | Permalink
Dovecot vpopmail userdb and passdb without SQL backend.
Roberto Bravo Roberto Puzzanghera December 2, 2018 11:45 CET
If you would like to use the vpopmail driver, you need to change auth-worker service in 10-master.conf
from:
to:
Reply | Permalink
Nick Payne-Roberts January 16, 2018 14:57 CET
openssl dhparam -out /usr/local/dovecot/etc/dh.pem
Requires the bits specifying: 1024
i.e.: # openssl dhparam -out /usr/local/dovecot/etc/dh.pem 1024
Reply | Permalink
Roberto Puzzanghera Nick Payne-Roberts January 19, 2018 12:53 CET
yes, thank you
Reply | Permalink
maildir++ patch and dovecot
M G January 1, 2018 03:47 CET
The maildir++ patch to calculate the size for quota enforcement is actually broken. This causes issues with newer versions of Dovecot, it will complain about S= being wrong and either bail or try to fix it one at a time. You can fix this by setting this in 10-mail.conf:
There's a post about it here: http://dovecot.2317879.n4.nabble.com/Maildir-filename-has-wrong-S-value-td22996.html#a23000 and a patch to fix it in the FreeBSD port of qmail (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=168870) - perhaps the same patch could be pulled into your huge patch.
Reply | Permalink
maildir++ patch and dovecot
Roberto Puzzanghera M G January 10, 2018 16:42 CET
It's worth to notice what it's suggested in the thread that you linked above... the maildirs can be restored in this way (it can take a long time if done for all (-A) users):
In this case the additional option
maildir_broken_filename_sizes = yes
is not neededReply | Permalink
maildir++ patch and dovecot
Roberto Puzzanghera M G January 10, 2018 15:59 CET
I have just updated my big patch and corrected the dovecot config (2.3!) accordingly. Thanks again for the hint
Reply | Permalink
maildir++ patch and dovecot
Roberto Puzzanghera M G January 1, 2018 09:26 CET
Thank you. I'll check it out
Reply | Permalink
dovecot configure
Bob Greco November 24, 2016 21:59 CET
Dear Roberto
Thank you for this thorough qmail guide. Its the best available...
I am building a new server 10 years after the last time I did it. It's so wonderful to have these step-by-step instructions. It really saves the day.
Concerning the dovecot configuration here are some minor remarks:
Probably the ssl_dh_parameters_length in 10-ssl.conf should become 2048 to comply with current security recommendations.
Additionaly if someone wants to enable the dovecot service in a systemd environment (eg Debian jessie) the proposed way is
to configure the dovecot sources --with-systemdsystemunitdir=/lib/systemd/system
Thanks again and good night from Greece.
Reply | Permalink
dovecot configure
blueintheface Bob Greco July 21, 2021 08:17 CET
configure: WARNING: unrecognized options: --with-systemdsystemunitdir
Should it just be "systemdsystemunitdir=/lib/systemd/system" ?
Reply | Permalink
dovecot configure
Roberto Puzzanghera blueintheface July 21, 2021 10:49 CET
Yes, you are right. Corrected
Reply | Permalink
Thanks Bob, I just added your
roberto puzzanghera Bob Greco November 24, 2016 22:23 CET
Thanks Bob, I've just added your remarks to this page
Reply | Permalink
Just gone in production !
Anonymous May 28, 2014 11:20 CET
Hi everybody,
just to let you know after a few month of testing I have successfully migrated my old qmailrocks / fedora 6 istallation on a new,
virtualized Centos 6.5 - 64 bit qmail+vpopmail+roundcube+all the other goodies here described.
Everything works fine ! a big thank you to Roberto for this great guide !
BTW, I'm using dovecot 2.2.13 and it works perfectly.
The only problem experienced is related to some POP3 clients re-downloading all the email, even if I have used the courier-dovecot-migrate.pl script; mostly some MAC+thunderbird.
Cheers up !
Reply | Permalink
Table 'vpopmail.vpopmail' doesn't exist
Nicholas October 26, 2013 21:52 CET
Hi,
Has anyone tried with dovecot 2.2.4/2.2.6?
I am having a mysql issue
I had tested pop3 login without any issue. Should i downgrade to 2.2.2?
Thanks
nic
Reply | Permalink
I'm testing version 2.2.6,
roberto puzzanghera Nicholas October 26, 2013 22:48 CET
I'm testing version 2.2.6, telnetting port 143, sql driver, and the auth works fine
Reply | Permalink
Hi,I had tried 2.2.6 and
Nicholas roberto puzzanghera October 27, 2013 07:23 CET
Hi,
I had tried 2.2.6 and still having the same error.
My backend is mysql-5.5.34.
Any idea?
regards
nic
Reply | Permalink
I correct myself. It appears
roberto puzzanghera Nicholas October 27, 2013 07:38 CET
I correct myself. It appears that you configured vpopmail to use separate tables for each domain, so you have to modify the auth query accordingly, since it is looking for a common table 'vpopmail'
Reply | Permalink
Hi,Understand nowMany
Nicholas roberto puzzanghera October 27, 2013 07:51 CET
Hi,
Understand now
Many thanks
nic
Reply | Permalink
Ok, please post the query
roberto puzzanghera Nicholas October 27, 2013 07:56 CET
Ok, please post the query that should be used in case of many domains if you can
Reply | Permalink
Sorry for the late reply.
nic roberto puzzanghera April 8, 2016 07:55 CET
Sorry for the late reply.
I had setup more toasters and also tested with different versions of dovecot up to 2.2.23.
No such error occur anymore. So i am posting my configuration for anyone who is interested to have an individual table for each domain.
Thank you
Reply | Permalink
Nic, you really miss the
roberto puzzanghera Nicholas October 27, 2013 07:35 CET
Nic, you really miss the vpopmail table. I have:
create again the domain and check if it is created.
Reply | Permalink
Hi,I had deleted the existing
Nicholas roberto puzzanghera October 27, 2013 07:50 CET
Hi,
I had deleted the existing domains and re-added them again.
vpopmail.frm is still no where to be found.
I had checked my other production servers, they are working fine
and yet there isn't any vpopmail.frm also.
Pretty weird. Google has no answer too.
regards
nic
Reply | Permalink
as said above, the problem
roberto puzzanghera Nicholas October 27, 2013 07:53 CET
as said above, the problem should be the configuration of vpopmail with
Reply | Permalink
Hi Roberto,I had configured
Nicholas roberto puzzanghera October 27, 2013 08:39 CET
Hi Roberto,
I had configured vpopmail with --disable-many-domains
I had figured out if i use
!include auth-vpopmail.conf.ext
but not
!include auth-sql.conf.ext
I have no problem. Because the latest guide instructs to use auth-sql, Dovecot looks for vpopmail.frm instead.
I don't know by doing is this correct. Please correct me.
Many thanks again
regards
nic
Reply | Permalink
yes if you use the vpopmail
roberto puzzanghera Nicholas October 27, 2013 12:24 CET
yes if you use the vpopmail driver you don't have to adjust the sql query. I switched to the mysql/sql drivers since the vpomail one was not working for me, but it's interesting to know that you have it working
Reply | Permalink
I tested with mariadb 5.5,
roberto puzzanghera Nicholas October 27, 2013 07:27 CET
I tested with mariadb 5.5, that is pretty much the same as mysql 5.5.
But.. are you sure that the table was actually created?
Reply | Permalink
Then it must be me. Let me
Nicholas roberto puzzanghera October 26, 2013 22:58 CET
Then it must be me. Let me try re-installing it again
Thanks
nic
Reply | Permalink
Dovecot-2.2.0 and Vpopmail
Michael Dick April 15, 2013 12:15 CET
Hi Roberto
Thanks for your excellent guide.
I had no problems upgrading from dovecot 2.1.16 to 2.2.0
Instead of using the vpopmail auth driver, I am set up to use the sql driver. I appreciate this might not be what you are trying to achieve, but at least it will allow you to have vpopmail work with dovecot 2.2.0
My relevant configuration:
in /etc/dovecot/conf.d/10-auth.conf:
I haven't spent the time looking to see what has happened to the vpopmail auth driver.
Best wishes,
Michael Dick
Reply | Permalink
Re: Dovecot-2.2.0 and Vpopmail
roberto puzzanghera Michael Dick April 15, 2013 13:45 CET
Hi Michael, thanks for your contribution.
of course the sql drivers works fine now as worked in the past. Anyway this is not the first time that the vpopmail breaks, so your comment is appreciated. Soon or later I should consider to expand this page with the sql driver method.
Reply | Permalink
qmail & dovecot
Tennyson Makarangah April 9, 2012 10:38 CET
Please be patient with me.....am a newbie...I've been trying to install qmail on my F16 64 bit home machine for the past 3 weeks but haven't managed to get it running yet but I'm very hopeful despite the many many frustrations. I wanted to know whether i install dovecot after the successful installation of qmail or do i start my dovecot installation 'independent' of the qmail installation. Thanks for the great piece by....
Reply | Permalink
my answer is yes
roberto puzzanghera Tennyson Makarangah April 9, 2012 17:40 CET
Despite of the fact that you can have a dovecot successfull installation, if you don't have qmail or another MTA installed it doesn't make much sense having an imap server without the smtp service in order to transfer your emails around the world; at least you should have your MTA in another machine. So yes, you should install qmail firstly.
You may want to take a look at this article which shortly explains how all things work together: http://wiki.dovecot.org/MailServerOverview
Reply | Permalink
Thanks for this great HOWTO!
Iflexion December 9, 2011 16:42 CET
Thanks for this great HOWTO! Just tested it and it's ok!
Reply | Permalink
some more features about quota
Nicolas July 19, 2011 14:35 CET
to makes IMAP quota working with maildir++, you should change these settings :
You should replace quota with imap_quota
You should uncomment this line:
Reply | Permalink
I tested it, and it's ok.
roberto puzzanghera Nicolas July 23, 2011 15:12 CET
I tested it, and it's ok. Thanks for the contribution!
Reply | Permalink
doveadm
Costel Balta March 24, 2011 13:22 CET
First of all thanks for this HOWTO!
anyway i'm having a problem with the "doveadm -A" listing "Error: User listing returned failure doveadm",
"doveadm mailbox list -u user@domain" is working just fine.
did i miss something?
Reply | Permalink
doveadm & vpopmail
roberto puzzanghera Costel Balta March 24, 2011 13:45 CET
If you are using vpopmail as a backend, I don't have an answer. It seems like the driver is not programmed to do the iteration..
Reply | Permalink
doveadm expunge for vpopmail
Costel Balta roberto puzzanghera March 24, 2011 14:57 CET
Reply | Permalink
Excellent solution!
roberto puzzanghera Costel Balta May 28, 2011 23:14 CET
Can you believe it! I was facing the same problem with doveadm expunge and found on google your excellent solution inside your comment of my own blog! Thank you..
Reply | Permalink
networking
Scottsdale SEO roberto puzzanghera June 17, 2011 22:14 CET
The exact same thing happened to me once, isn`t it great how networking works!
Reply | Permalink