Here is mine
default_pass_scheme = MD5-CRYPT
# passdb query to retrieve the password. It can return fields:
password_query = SELECT CONCAT( pw_name ,'@', pw_domain ) AS user, \
pw_passwd AS password, \
pw_dir as userdb_home, \
89 AS userdb_uid, \
89 AS userdb_gid \
FROM vpopmail vp \
LEFT JOIN aliasdomains ad ON ad.alias = '%d' \
WHERE ( vp.pw_domain = ad.domain OR vp.pw_domain = '%d') AND (
vp.pw_name = '%n' )
#password_query = SELECT CONCAT(pw_name, '@', '%d') AS user, \
# pw_passwd AS password, \
# pw_dir as userdb_home, \
# 89 AS userdb_uid, \
# 89 AS userdb_gid \
# FROM `vpopmail` \
# WHERE pw_name = '%n' AND pw_domain = '%d'
# userdb query to retrieve the user information. It can return fields:
# (Thanks to Arturo Blanco for his hints concerning vpopmail limits)
user_query = \
SELECT pw_dir AS home, \
89 AS uid, \
89 AS gid \
FROM vpopmail \
WHERE pw_name = '%n' AND pw_domain = '%d' \
AND ('%a'!='995' or !(pw_gid & 2)) \
AND ('%r'!='[WEBMAIL-IP]' or !(pw_gid & 4)) \
AND ('%r'='[WEBMAIL-IP]' or '%a'!='993' or !(pw_gid & 8))
# [WEBMAIL-IP] is the IP of your webmail web server.
# I'm assuming that the imap connection is only on port 993 and the pop3
connection is on port 955.
# Adjust to your needs
#
# logically this means:
# 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
[WEBMAIL-IP]
# AND WHEN IMAP is not disabled for that user connecting on port 993 (993 is
the imaps port allowed from remote
# in my configuration) unless his remote ip the one belonging to the webmail
# Query to get a list of all usernames.
iterate_query = SELECT CONCAT(pw_name,'@',pw_domain) AS username FROM `vpopmail`
Here is my dovecot.conf part
protocol imap {
imap_client_workarounds = "delay-newmail"
mail_plugins = $mail_plugins imap_quota
mail_max_userip_connections = 150
}
protocol pop3 {
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
pop3_fast_size_lookups = yes
pop3_lock_session = yes
mail_max_userip_connections = 50
# pop3_uidl_format = UID%u-%v
}
plugin {
quota = maildir:ignore=Trash
quota_rule = ?:storage=0
}
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
service stats {
# unix_listener stats-reader {
# group =
# mode = 0666
# user =
# }
unix_listener stats-writer {
group = dovecot
mode = 0666
#user =
}
}
!include local.conf
> On Jan 28, 2024, at 19:33, Peter Peterse <[email protected]> wrote:
>
> Hello,
>
> Remo, thanks fot the fast answer. I've changed the file
> /etc/dovecot/dovecot.conf back to how it was after the script qt_install.
>
> Dovecot logs now:
>
> Jan 28 18:24:28 auth-worker(63869): Warning: sqlpool(mysql): Query failed,
> retrying: Table 'vpopmail.vpopmail' doesn't exist
> Jan 28 18:24:28 auth-worker(63869): Error: conn unix:auth-worker
> (pid=63867,uid=97): auth-worker<1>: sql([email protected],::1
> <mailto:[email protected],::1>,<cKTBowUQ0KYAAAAAAAAAAAAAAAAAAAAB>): Password
> query failed: Table 'vpopmail.vpopmail' doesn't exist
>
> In the file dovecot-sql.conf.ext the credentials are correct and the database
> vpopmail exists but there is no table vpopmail created, so probebly this is
> the problem. Where is this table created?
>
> Regards,
>
> Peter Peterse
>
> On 28-1-2024 18:52, Remo Mattei wrote:
>>
>> It’s now sql not vpopmail
>>
>> --
>> Sent from iPhone
>>
>> On domenica, gen 28, 2024 at 18:41, Peter Peterse
>> <[email protected] <mailto:[email protected]>> wrote:
>> Hello list,
>>
>> I'm trying to migrate from CentOS 7 to AlmaLinux 9.3. I'm using the
>> steps from:
>>
>> http://qtp.qmailtoaster.com/#rhel9
>>
>> and
>>
>> http://www.qmailtoaster.com/migrate.html
>>
>> In this process I've changed the database passwords in the files:
>>
>> /home/vpopmail/etc/vpopmail.mysql
>> /etc/roundcubemail/config.inc.php
>> /etc/dovecot/dovecot-sql.conf.ext
>> /etc/dspam.conf
>>
>> After starting the mailserver and logging in with roundcube the logs
>> from dovecot says:
>>
>> Jan 28 17:29:53 master: Info: Dovecot v2.3.16 (7e2e900c1a) starting up
>> for imap, pop3 (core dumps disabled)
>> Jan 28 17:30:15 auth: Fatal: Unknown passdb driver 'vpopmail'
>> Jan 28 17:30:15 master: Error: service(auth): command startup failed,
>> throttling for 2.000 secs
>>
>> Does anyone knows what I've missed?
>>
>> Thanks for the help.
>>
>> Peter Peterse
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> <mailto:[email protected]>
>> For additional commands, e-mail: [email protected]
>> <mailto:[email protected]>
>>