如何解决Dovecot/RainLoop/CyperPanel/GCP VM 邮件问题
我见过很多类似的问题,但好几天都没有找到解决方案。 我在 GCP Ubuntu VM 上运行 CyperPanel。 登录 RainLoop 时,我收到错误“授权失败”。
这是我要跑的东西
systemctl status dovecot
dovecot.service - Dovecot IMAP/POP3 email server
Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-03-03 14:19:25 UTC; 14min ago
Docs: man:dovecot(1)
Main PID: 3249 (dovecot)
Tasks: 5 (limit: 9544)
Memory: 5.2M
CGroup: /system.slice/dovecot.service
├─3249 /usr/sbin/dovecot -F
├─3268 dovecot/anvil
├─3269 dovecot/log
├─3270 dovecot/config
└─3305 dovecot/stats
Mar 03 14:19:25 cyberpanel-2-vm dovecot[3249]: master: Dovecot v2.3.13 (89f716dc2) starting up for imap,pop3 (core dumps disabled)
Mar 03 14:21:00 cyberpanel-2-vm dovecot[3269]: auth: Fatal: sql: UnkNown database driver 'MysqL'
Mar 03 14:21:00 cyberpanel-2-vm dovecot[3249]: master: Error: service(auth): command startup Failed,throttling for 2.000 secs
Mar 03 14:21:00 cyberpanel-2-vm dovecot[3269]: imap-login: disconnected: Auth process broken (disconnected before auth was ready,waited 0 secs): user=<>,rip=127.0.0.1,lip=127.0.0.1,secured,session=<P19zj6K8kqJ/AAAB>
Mar 03 14:21:09 cyberpanel-2-vm dovecot[3269]: auth: Fatal: sql: UnkNown database driver 'MysqL'
Mar 03 14:21:09 cyberpanel-2-vm dovecot[3249]: master: Error: service(auth): command startup Failed,throttling for 4.000 secs
运行
grep dovecot
LISTEN 0 100 0.0.0.0:110 0.0.0.0:* users:(("dovecot",pid=3249,fd=21))
LISTEN 0 100 0.0.0.0:143 0.0.0.0:* users:(("dovecot",fd=38))
LISTEN 0 100 0.0.0.0:993 0.0.0.0:* users:(("dovecot",fd=40))
LISTEN 0 100 0.0.0.0:995 0.0.0.0:* users:(("dovecot",fd=23))
LISTEN 0 100 [::]:110 [::]:* users:(("dovecot",fd=22))
LISTEN 0 100 [::]:143 [::]:* users:(("dovecot",fd=39))
LISTEN 0 100 [::]:993 [::]:* users:(("dovecot",fd=41))
LISTEN 0 100 [::]:995 [::]:* users:(("dovecot",fd=24))
有什么建议可以看吗? 我不会发布我尝试过但没有用的解决方案,我愿意再次发布结果。 提前致谢!
auth-sql.conf.ext
# Authentication for sql users. Included from 10-auth.conf.
#
# <doc/wiki/AuthDatabase.sql.txt>
passdb {
driver = MysqL
# Path for sql configuration file,see example-config/dovecot-sql.conf.ext
args = /etc/dovecot/dovecot-sql.conf.ext
}
# "prefetch" user database means that the passdb already provided the
# needed information and there's no need to do a separate userdb lookup.
# <doc/wiki/UserDatabase.Prefetch.txt>
#userdb {
# driver = prefetch
#}
userdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
# If you don't have any user-specific settings,you can avoid the user_query
# by using userdb static instead of userdb sql,for example:
# <doc/wiki/UserDatabase.Static.txt>
#userdb {
#driver = static
#args = uid=vmail gid=vmail home=/var/vmail/%u
#}
dovecot.conf
protocols = imap pop3
log_timestamp = "%Y-%m-%d %H:%M:%s "
#mail_location = maildir:/home/vmail/%d/%n/Maildir
#mail_location = mdBox:/home/vmail/%d/%n/MdBox
ssl_cert = <cert.pem
ssl_key = <key.pem
mail_plugins = zlib
mdBox_rotate_size = 2M
namespace {
type = private
separator = .
prefix = INBox.
inBox = yes
}
service auth {
unix_listener auth-master {
mode = 0600
user = vmail
}
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
user = root
}
service auth-worker {
user = root
}
protocol lda {
log_path = /home/vmail/dovecot-deliver.log
auth_socket_path = /var/run/dovecot/auth-master
postmaster_address = postmaster@example.com
mail_plugins = zlib
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugins = $mail_plugins zlib
}
protocol imap {
mail_plugins = $mail_plugins zlib imap_zlib
}
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
plugin {
zlib_save = gz
zlib_save_level = 6
}
service stats {
unix_listener stats-reader {
user = vmail
group = vmail
mode = 0660
}
unix_listener stats-writer {
user = vmail
group = vmail
mode = 0660
}
}
dovecot-sql.conf.ext
driver = MysqL
connect = host=localhost dbname=cyberpanel user=cyberpanel password=xxxxxx port=3306
password_query = SELECT email as user,password FROM e_users WHERE email='%u';
user_query = SELECT '5000' as uid,'5000' as gid,mail FROM e_users WHERE email='%u';
//编辑 尝试的解决方案:https://forums.cyberpanel.net/discussion/4807/cant-login-to-rainloop
I installed Cyberpanel on Ubuntu 20.4 minimal on GCP but the problem remained.
Followed the next steps found on another discussion to solve:
apt remove dovecot-core dovecot-MysqL dovecot-pop3d dovecot-imapd
sed -e '/deb/ s/^#*/#/' -i /etc/apt/sources.list.d/dovecot.list
apt clean all
apt install dovecot-core dovecot-MysqL dovecot-pop3d dovecot-imapd
apt-get install -y libMysqLclient-dev
Then check devecot status with:
systemctl status dovecot -l
Then you go to YourIP:8090/manageSSL/sslForMailServer and install a SSL certificate for your Domain.
Then it will work
现在出现新错误:
root@cyberpanel-2-vm:/home/admin_# journalctl -f | grep dovecot
Mar 03 17:00:33 cyberpanel-2-vm dovecot[824]: imap-login: disconnected (auth Failed,1 attempts in 2 secs): user=<xxx@xxx.xx>,method=PLAIN,TLS,session=<J7XgyaS8VJZ/AAAB>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。