我正在尝试遵循本教程:
我相信在我之前有人尝试过在这个盒子上设置这一切,但中途失败了。我被困在第一个命令上:
sudo apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-lmtpd dovecot-mysql
其结果是:
Reading package lists... Done
Building dependency tree
Reading state information... Done
dovecot-core is already the newest version.
dovecot-imapd is already the newest version.
postfix is already the newest version.
postfix-mysql is already the newest version.
dovecot-lmtpd is already the newest version.
dovecot-mysql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up dovecot-core (1:2.2.9-1ubuntu5) ...
Creating generic self-signed certificate: /etc/dovecot/dovecot.pem
This certificate will expire in 10 years.
(replace with hand-crafted or authorized one if needed).
Job for dovecot.service failed. See "systemctl status dovecot.service" and "journalctl -xe" for details.
invoke-rc.d: initscript dovecot, action "start" failed.
dpkg: error processing package dovecot-core (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of dovecot-lmtpd:
dovecot-lmtpd depends on dovecot-core (= 1:2.2.9-1ubuntu5); however:
Package dovecot-core is not configured yet.
dpkg: error processing package dovecot-lmtpd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dovecot-imapd:
dovecot-imapd depends on dovecot-core (= 1:2.2.9-1ubuntu5); however:
Package dovecot-core is not configured yet.
dpkg: error processing package dovecot-imapd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dovecot-mysql:
dovecot-mysql depends on dovecot-core (= 1:2.2.9-1ubuntu5); however:
Package dovecot-core is not configured yet.
dpkg: error processing package dovecot-mysql (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
dovecot-core
dovecot-lmtpd
dovecot-imapd
dovecot-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)
似乎 dovecot-core 没有正确启动...因此我运行:
systemctl status dovecot.service
journalctl -xe
结果如下:
● dovecot.service - LSB: Dovecot init script
Loaded: loaded (/etc/init.d/dovecot)
Active: failed (Result: exit-code) since Wed 2015-07-15 13:43:31 EDT; 1min 59s ago
Docs: man:systemd-sysv-generator(8)
Process: 24790 ExecStart=/etc/init.d/dovecot start (code=exited, status=1/FAILURE)
和
Jul 15 13:43:47 postfix[24814]: error: to submit mail, use the Postfix sendmail command
Jul 15 13:43:47 postfix[24814]: fatal: the postfix command is reserved for the superuser
我现在陷入困境,不知道下一步该怎么做。任何建议都将不胜感激……
编辑:我很乐意重新开始。如果有办法彻底删除这些安装并重新开始,我很乐意这样做,如果这比修复这个问题更容易。
答案1
只需运行 sudo apt-get purge dovecot-core 即可修复