将 Ubuntu 从 20.04 升级到 22.04 后,我在启动 dovecot 时遇到问题,并收到以下错误:
$ sudo dovecot -F
doveconf: Fatal: execvp(/usr/sbin/dovecot) failed: Argument list too long
经过一番搜索后,我发现你必须提高ARG_MAX
变量,但我不知道如何。
我尝试在ulimit
、sysconf
和中寻找解决方案exec
。
$ sudo getconf ARG_MAX
2097152
$ getconf ARG_MAX
6291456
我已将以下内容添加到/etc/secutiry/limits.conf
:
root soft nofile 65535
root hard nofile 65535
LimitNOFILE=65536
但dovecot.service
它仍然抛出同样的错误!
$ sudo doveconf -n
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = PLAIN
auth_verbose = yes
disable_plaintext_auth = no
log_path = /var/log/dovecot.log
mail_home = /home/vmail/%d/%u
mail_location = maildir:~
passdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
user = root
}
ssl = required
ssl_ca = </etc/ssl/certs/ca-certificates.crt
ssl_cert = </etc/letsencrypt/live/*.nl/fullchain.pem
ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
local_name mail.*.nl {
protocol imap {
ssl_ca = </etc/ssl/certs/ca-certificates.crt
ssl_cert = </etc/letsencrypt/live/*.nl/fullchain.pem
ssl_key = # hidden, use -P to show it
}
}
local_name mail.*.nl {
protocol pop3 {
ssl_ca = </etc/ssl/certs/ca-certificates.crt
ssl_cert = </etc/letsencrypt/live/*.nl/fullchain.pem
ssl_key = # hidden, use -P to show it
}
}
退出代码:89