dpkg: pacote de processamento de erro pilha de correio-entrega

0

Ao instalar este mail-stack-delivery , eu queria limpar os arquivos de configuração e começar de novo, mas parece ter estragado:

thufir@mordor:~$ 
thufir@mordor:~$ sudo dpkg --configure -a
Setting up mail-stack-delivery (1:2.2.18-2ubuntu2) ...
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory
ln: failed to create symbolic link ‘/etc/dovecot/private/dovecot.pem’: No such file or directory
dpkg: error processing package mail-stack-delivery (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mail-stack-delivery
thufir@mordor:~$ 
thufir@mordor:~$ sudo rm /etc/apt/sources.list
thufir@mordor:~$ 
thufir@mordor:~$ ls /etc/dovecot/
conf.d
thufir@mordor:~$ 
thufir@mordor:~$ ls /etc/postfix/
thufir@mordor:~$ 

Depois de usar sudo apt-get remove --purge mail-stack-delivery :

The following packages will be REMOVED:
  mail-stack-delivery*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 201365 files and directories currently installed.)
Removing mail-stack-delivery (1:2.2.18-2ubuntu2) ...
Purging configuration files for mail-stack-delivery (1:2.2.18-2ubuntu2) ...
W: Can not find PkgVer for 'mail-stack-delivery'

Preso em um loop onde não consigo remover nem instalá-lo corretamente.

    
por Thufir 16.02.2016 / 12:40

1 resposta

0

Eu não sei se o seguinte é a resposta , eu cheguei aleatoriamente a essa "solução" com a ajuda da sala de chat do Linux no freenode IRC (obrigado Jim e peetaur2):

thufir@mordor:~$ 
thufir@mordor:~$ sudo mkdir /etc/postfix /etc/dovecot/ /etc/dovecot/private/ /etc/dovecot/conf.d/
thufir@mordor:~$ 
thufir@mordor:~$ sudo apt-get install mail-stack-delivery
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mail-stack-delivery is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 145 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up mail-stack-delivery (1:2.2.18-2ubuntu2) ...
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory

Postfix not configured. Run
sudo dpkg-reconfigure postfix and choose
the type of mail server. Then run
sudo dpkg-reconfigure mail-stack-delivery to
finish mail-stack-delivery installation.

thufir@mordor:~$ 
thufir@mordor:~$ sudo dpkg-reconfigure mail-stack-delivery
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory

Postfix not configured. Run
sudo dpkg-reconfigure postfix and choose
the type of mail server. Then run
sudo dpkg-reconfigure mail-stack-delivery to
finish mail-stack-delivery installation.

thufir@mordor:~$ sudo dpkg-reconfigure postfix
setting synchronous mail queue updates: true
Creating /etc/postfix/dynamicmaps.cf
Adding tcp map entry to /etc/postfix/dynamicmaps.cf
Adding sqlite map entry to /etc/postfix/dynamicmaps.cf
setting myhostname: mordor.bounceme.net
setting alias maps
setting alias database
setting myorigin
setting destinations: mordor.bounceme.net, localhost.bounceme.net, localhost
setting relayhost: 
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: loopback-only
setting default_transport: error
setting relay_transport: error
setting inet_protocols: all
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix is now set up with a default configuration.  If you need to make 
changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
Processing triggers for libc-bin (2.21-0ubuntu4) ...
thufir@mordor:~$ 
thufir@mordor:~$ sudo dpkg-reconfigure mail-stack-delivery
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory
grep: /etc/dovecot/conf.d/10-ssl.conf: No such file or directory
Mail stack delivery changes some postfix settings.
Old values are stored in /var/backups/mail-stack-delivery/main.cf-backup.
Feel free to revert any of them when the process is done.
Configuring postfix for mail-stack-delivery integration: .................... done.
thufir@mordor:~$ 
thufir@mordor:~$ 
thufir@mordor:~$ sudo dpkg --configure -a
thufir@mordor:~$ 

É altamente provável que algo mais tenha quebrado o loop e permitido dpk e apt serem executados sem erros.

como posso purgar totalmente este pacote e toda a configuração?

comando de CLI útil que aprendi hoje: update-manager para trazer a GUI do apt.

    
por Thufir 16.02.2016 / 13:53