2 votes

Comment résoudre les problèmes d'installation de postfix ?

Il y a un problème avec postfix. Quand j'essaie de le supprimer pour pouvoir le réinstaller :

learner@juggernaut:~$ sudo apt-get remove postfix
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  lsb-invalid-mta
The following packages will be REMOVED:
  postfix
The following NEW packages will be installed:
  lsb-invalid-mta
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/5,106 B of archives.
After this operation, 3,541 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: postfix: dependency problems, but removing anyway as you requested:
 lsb-core depends on lsb-invalid-mta (>= 4.1+Debian11ubuntu6) | mail-transport-agent; however:
  Package lsb-invalid-mta is not installed.
  Package mail-transport-agent is not installed.
  Package postfix which provides mail-transport-agent is to be removed.

(Reading database ... 228881 files and directories currently installed.)
Removing postfix (2.11.0-1ubuntu1) ...
invoke-rc.d: unknown initscript, /etc/init.d/postfix not found.
dpkg: error processing package postfix (--remove):
 subprocess installed pre-removal script returned error exit status 100
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

résultat pour sudo apt-get purge postfix

learner@juggernaut:~$ sudo apt-get purge postfix
[sudo] password for learner: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  lsb-invalid-mta
The following packages will be REMOVED:
  postfix*
The following NEW packages will be installed:
  lsb-invalid-mta
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/5,106 B of archives.
After this operation, 3,541 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: postfix: dependency problems, but removing anyway as you requested:
 lsb-core depends on lsb-invalid-mta (>= 4.1+Debian11ubuntu6) | mail-transport-agent; however:
  Package lsb-invalid-mta is not installed.
  Package mail-transport-agent is not installed.
  Package postfix which provides mail-transport-agent is to be removed.

(Reading database ... 228881 files and directories currently installed.)
Removing postfix (2.11.0-1ubuntu1) ...
invoke-rc.d: unknown initscript, /etc/init.d/postfix not found.
dpkg: error processing package postfix (--purge):
 subprocess installed pre-removal script returned error exit status 100
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
learner@juggernaut:~$ 

et quand j'essaie de le réinstaller :

learner@juggernaut:~$ sudo apt-get install postfix
[sudo] password for learner: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
postfix is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 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] y
Setting up postfix (2.11.0-1ubuntu1) ...
update-rc.d: /etc/init.d/postfix: file does not exist
dpkg: error processing package postfix (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
learner@juggernaut:~$

je me souviens que j'avais choisi le site internet lors de l'installation

voici le mail.log

Jan 27 20:09:33 juggernaut postfix/postdrop[3385]: warning: mail_queue_enter: create file maildrop/152326.3385: Permission denied
Jan 27 20:09:43 juggernaut postfix/postdrop[3385]: warning: mail_queue_enter: create file maildrop/152587.3385: Permission denied
Jan 27 20:09:53 juggernaut postfix/postdrop[3385]: warning: mail_queue_enter: create file maildrop/152915.3385: Permission denied
Jan 27 20:10:03 juggernaut postfix/postdrop[3385]: warning: mail_queue_enter: create file maildrop/153202.3385: Permission denied
Jan 27 20:10:13 juggernaut postfix/postdrop[3385]: warning: mail_queue_enter: create file maildrop/153447.3385: Permission denied

ces entrées dans mail.err

Jan 27 19:57:10 juggernaut postfix[5929]: error: to submit mail, use the Postfix sendmail command
Jan 27 19:57:10 juggernaut postfix[5929]: fatal: the postfix command is reserved for the superuser
Jan 27 19:57:29 juggernaut postfix/postfix-script[5936]: error: unknown command: ''
Jan 27 19:57:29 juggernaut postfix/postfix-script[5937]: fatal: usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)
Jan 27 20:08:52 juggernaut postfix[3372]: error: to submit mail, use the Postfix sendmail command
Jan 27 20:08:52 juggernaut postfix[3372]: fatal: the postfix command is reserved for the superuser
Jan 27 20:09:05 juggernaut postfix/postfix-script[3380]: error: unknown command: ''
Jan 27 20:09:05 juggernaut postfix/postfix-script[3381]: fatal: usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)
Jan 27 20:09:13 juggernaut postfix[3382]: error: to submit mail, use the Postfix sendmail command
Jan 27 20:09:13 juggernaut postfix[3382]: fatal: the postfix command is reserved for the superuser
Jan 27 20:17:26 juggernaut postfix[3701]: error: to submit mail, use the Postfix sendmail command
Jan 27 20:17:26 juggernaut postfix[3701]: fatal: the postfix command is reserved for the superuser
Jan 27 20:18:53 juggernaut postfix[3864]: error: to submit mail, use the Postfix sendmail command
Jan 27 20:18:53 juggernaut postfix[3864]: fatal: the postfix command is reserved for the superuser
Jan 29 14:19:27 juggernaut postfix/postfix-script[22221]: error: unknown command: ''
Jan 29 14:19:27 juggernaut postfix/postfix-script[22222]: fatal: usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)
Jan 29 14:21:13 juggernaut postfix[22826]: error: to submit mail, use the Postfix sendmail command
Jan 29 14:21:13 juggernaut postfix[22826]: fatal: the postfix command is reserved for the superuser
Jan 30 17:49:32 juggernaut postfix[9225]: error: to submit mail, use the Postfix sendmail command
Jan 30 17:49:32 juggernaut postfix[9225]: fatal: the postfix command is reserved for the superuser
Jan 30 17:49:42 juggernaut postfix/postfix-script[9255]: error: unknown command: ''
Jan 30 17:49:42 juggernaut postfix/postfix-script[9256]: fatal: usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)

0voto

c0deous Points 434

Exécutez ce qui suit :

$ sudo touch /etc/init.d/postfix
$ sudo apt-get remove postfix

Il cherche un fichier à /etc/init.d/postfix qui n'existe pas pour une raison quelconque. Si vous lui donnez ce fichier, la désinstallation sera terminée.

SistemesEz.com

SystemesEZ est une communauté de sysadmins où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X