我一直试图让一个dovecot / postfix服务器跑起来为我的创业业务提供电子邮件,而且我也成为写得不好,过时的指南的受害者。
起初,我安装了Postfix和Dovecot,并select了一个空configuration,我自己configuration它。 在某个时候,我忘记了自己在做什么和configuration了什么,所以我决定apt-purge我安装的所有软件包,并重新开始。
尝试使用sudo apt-get install dovecot-imapd ,我sudo apt-get install dovecot-imapd以下错误:
The following NEW packages will be installed: dovecot-imapd 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/425 kB of archives. After this operation, 565 kB of additional disk space will be used. Selecting previously unselected package dovecot-imapd. (Reading database ... 23009 files and directories currently installed.) Unpacking dovecot-imapd (from .../dovecot-imapd_1%3a2.1.7-7_amd64.deb) ... Setting up dovecot-imapd (1:2.1.7-7) ... Creating config file /etc/dovecot/conf.d/20-imap.conf with new version cp: cannot create regular file `/etc/dovecot/conf.d/20-imap.conf': No such file or directory dpkg: error processing dovecot-imapd (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: dovecot-imapd E: Sub-process /usr/bin/dpkg returned an error code (1)
当我的dir /etc/ ,我看不到一个dovecot文件夹,如果我使用mkdir手动创build它并chmod到777,我仍然得到20-imap.conf不存在的错误,它不能创build一个普通的文件。
我在这里没有想法,将不胜感激任何帮助,你们可以给我!
谢谢!
清除dovecot-common ,再试一次? 运行dpkg --get-selections | grep dovecot dpkg --get-selections | grep dovecot ,确保每个dovecot包被清除。 dpkg -P packagename ,如果您已经删除它,但不清除文件。
一旦确定所有的dovecot软件包都不存在,请确保删除您尝试手动创build的/etc/dovecot目录。
/etc/dovecot和/etc/dovecot/conf.d属于dovecot-common软件包。 只删除dovecot-imapd包不会删除这些目录。 我猜你手动删除它们,或其他奇怪的事情发生。