ubuntu 8.04: mailscanner de-/installalation problems

Asked by madagascar

Hello All,

system: amd64

i upgraded successfully from 7.10 to 8.04 beta. had some issues with apache2 (it replaced my httpd.conf file with an empty one, but solved this), and am having big problems with MailScanner. All attempts to

a.) re-install mailscanner_4.58.9-2ubuntu1_all.deb
b.) purge mailscanner_4.58.9-2ubuntu1_all.deb
c.) upgrade to mailscanner_4.66.5-2_all.deb

are ending unsuccessfully.

Lessons i've learned today:

- rename (don't delete):
i deleted the /MailScanner directory within /etc., then i had to recreate it and place the MailScanner.conf file inside (Somebody please copy-paste here the content of an intact CustomConfig.pm file - i suspect this may help)

----//----

Now to the real problem:

a. attempt to re-install mailscanner (further below are outputs in English):

11325@mail:/var/cache/apt/archives# apt-get install mailscanner
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Reading state information... Fertig
mailscanner ist schon die neueste Version.
The following packages were automatically installed and are no longer required:
  language-support-writing-en linux-headers-2.6.24-12-generic
  linux-headers-2.6.24-12 linux-headers-2.6.24-14 libcwidget0 gimp-help-common
  libmail-spf-query-perl gimp-help-en openoffice.org-thesaurus-en-au
  plib1.8.4c2 linux-headers-2.6.24-14-generic
Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 1 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Es müssen noch 0B von 556kB Archiven geholt werden.
After this operation, 0B of additional disk space will be used.
Vorkonfiguration der Pakete ...
(Lese Datenbank ... 236330 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereiten zum Ersetzen von mailscanner 4.58.9-2ubuntu1 (durch .../mailscanner_4.58.9-2ubuntu1_all.deb) ...
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: Warnung - altes pre-removal-Skript wurde mit Fehler-Status 1 beendet
dpkg - probiere stattdessen Skript aus dem neuen Paket ...
No MailScanner found running; none killed.
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: Fehler beim Bearbeiten von /var/cache/apt/archives/mailscanner_4.58.9-2ubuntu1_all.deb (--unpack):
 Unterprozess neues pre-removal-Skript gab den Fehlerwert 1 zurück
invoke-rc.d: initscript mailscanner, action "start" failed.
dpkg: Fehler beim Aufräumen:
 Unterprozess post-installation script gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 /var/cache/apt/archives/mailscanner_4.58.9-2ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

----- // -----

b.) attempt to de-install MailScanner:

11325@mail:/var/cache/apt/archives# apt-get purge mailscannerPaketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Reading state information... Fertig
The following packages were automatically installed and are no longer required:
  language-support-writing-en linux-headers-2.6.24-12-generic
  linux-headers-2.6.24-12 linux-headers-2.6.24-14 libcwidget0 gimp-help-common
  libmail-spf-query-perl gimp-help-en libnet-cidr-lite-perl
  openoffice.org-thesaurus-en-au plib1.8.4c2 linux-headers-2.6.24-14-generic
Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
Die folgenden Pakete werden ENTFERNT:
  mailscanner*
0 aktualisiert, 0 neu installiert, 1 zu entfernen und 1 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
After this operation, 4227kB disk space will be freed.
Möchten Sie fortfahren [J/n]? J
dpkg: Fehler beim Bearbeiten von mailscanner (--purge):
 Paket ist in einem sehr schlechten inkonsistenten Zustand - Sie sollten
 es erneut installieren, bevor Sie es zu entfernen versuchen.
Fehler traten auf beim Bearbeiten von:
 mailscanner
E: Sub-process /usr/bin/dpkg returned an error code (1)

----//----

c. output of my upgrade attempt:

11325@mail:/var/cache/apt/archives# dpkg --force-overwrite -i mailscanner_4.66.5-2_all.deb
(Lese Datenbank ... 236337 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereiten zum Ersetzen von mailscanner 4.58.9-2ubuntu1 (durch mailscanner_4.66.5-2_all.deb) ...
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: Warnung - altes pre-removal-Skript wurde mit Fehler-Status 1 beendet
dpkg - probiere stattdessen Skript aus dem neuen Paket ...
No MailScanner found running; none killed.
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: Fehler beim Bearbeiten von mailscanner_4.66.5-2_all.deb (--install):
 Unterprozess neues pre-removal-Skript gab den Fehlerwert 1 zurück
invoke-rc.d: initscript mailscanner, action "start" failed.
dpkg: Fehler beim Aufräumen:
 Unterprozess post-installation script gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 mailscanner_4.66.5-2_all.deb

So - is there any help ?

Many thanks in advance,
adrian

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu mailscanner Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
madagascar (ai-bcn) said :
#1

messages in English:

a. attempt to re-install mailscanner:

11325@mail:~# apt-get install mailscanner
Reading package lists... Done
Building dependency tree
Reading state information... Done
mailscanner is already the newest version.
The following packages were automatically installed and are no longer required:
  language-support-writing-en linux-headers-2.6.24-12-generic
  linux-headers-2.6.24-12 linux-headers-2.6.24-14 libcwidget0 gimp-help-common
  libmail-spf-query-perl gimp-help-en openoffice.org-thesaurus-en-au
  plib1.8.4c2 linux-headers-2.6.24-14-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0B/556kB of archives.
After this operation, 0B of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package mailscanner.
(Reading database ... 236337 files and directories currently installed.)
Preparing to replace mailscanner 4.58.9-2ubuntu1 (using .../mailscanner_4.58.9-2ubuntu1_all.deb) ...
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
No MailScanner found running; none killed.
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/mailscanner_4.58.9-2ubuntu1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
invoke-rc.d: initscript mailscanner, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mailscanner_4.58.9-2ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

----//----

b.) attempt to de-install MailScanner:

11325@mail:~# apt-get purge mailscanner
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  language-support-writing-en linux-headers-2.6.24-12-generic
  linux-headers-2.6.24-12 linux-headers-2.6.24-14 libcwidget0 gimp-help-common
  libmail-spf-query-perl gimp-help-en libnet-cidr-lite-perl
  openoffice.org-thesaurus-en-au plib1.8.4c2 linux-headers-2.6.24-14-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED
  mailscanner*
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 4227kB disk space will be freed.
Do you want to continue [Y/n]? Y
dpkg: error processing mailscanner (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 mailscanner
E: Sub-process /usr/bin/dpkg returned an error code (1)

----//----

c.) attempt to upgrade

11325@mail:/var/cache/apt/archives# sudo dpkg --force-overwrite -i mailscanner_4.66.5-2_all.deb
(Reading database ... 236337 files and directories currently installed.)
Preparing to replace mailscanner 4.58.9-2ubuntu1 (using mailscanner_4.66.5-2_all.deb) ...
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
No MailScanner found running; none killed.
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: error processing mailscanner_4.66.5-2_all.deb (--install):
 subprocess new pre-removal script returned error exit status 1
invoke-rc.d: initscript mailscanner, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 mailscanner_4.66.5-2_all.deb

Thanks,
adrian

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
madagascar (ai-bcn) said :
#3

Hi all,

i am having big problems with MailScanner. All attempts to

a.) re-install mailscanner_4.58.9-2ubuntu1_all.deb
b.) purge mailscanner_4.58.9-2ubuntu1_all.deb
c.) upgrade to mailscanner_4.66.5-2_all.deb

are ending unsuccessfully.

a. attempt to re-install mailscanner (further below are outputs in English):

11325@mail:/var/cache/apt/archives# apt-get install mailscanner
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Reading state information... Fertig
mailscanner ist schon die neueste Version.
The following packages were automatically installed and are no longer required:
  language-support-writing-en linux-headers-2.6.24-12-generic
  linux-headers-2.6.24-12 linux-headers-2.6.24-14 libcwidget0 gimp-help-common
  libmail-spf-query-perl gimp-help-en openoffice.org-thesaurus-en-au
  plib1.8.4c2 linux-headers-2.6.24-14-generic
Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 1 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Es müssen noch 0B von 556kB Archiven geholt werden.
After this operation, 0B of additional disk space will be used.
Vorkonfiguration der Pakete ...
(Lese Datenbank ... 236330 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereiten zum Ersetzen von mailscanner 4.58.9-2ubuntu1 (durch .../mailscanner_4.58.9-2ubuntu1_all.deb) ...
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: Warnung - altes pre-removal-Skript wurde mit Fehler-Status 1 beendet
dpkg - probiere stattdessen Skript aus dem neuen Paket ...
No MailScanner found running; none killed.
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: Fehler beim Bearbeiten von /var/cache/apt/archives/mailscanner_4.58.9-2ubuntu1_all.deb (--unpack):
 Unterprozess neues pre-removal-Skript gab den Fehlerwert 1 zurück
invoke-rc.d: initscript mailscanner, action "start" failed.
dpkg: Fehler beim Aufräumen:
 Unterprozess post-installation script gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 /var/cache/apt/archives/mailscanner_4.58.9-2ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

----- // -----

b.) attempt to de-install MailScanner:

11325@mail:/var/cache/apt/archives# apt-get purge mailscannerPaketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Reading state information... Fertig
The following packages were automatically installed and are no longer required:
  language-support-writing-en linux-headers-2.6.24-12-generic
  linux-headers-2.6.24-12 linux-headers-2.6.24-14 libcwidget0 gimp-help-common
  libmail-spf-query-perl gimp-help-en libnet-cidr-lite-perl
  openoffice.org-thesaurus-en-au plib1.8.4c2 linux-headers-2.6.24-14-generic
Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
Die folgenden Pakete werden ENTFERNT:
  mailscanner*
0 aktualisiert, 0 neu installiert, 1 zu entfernen und 1 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
After this operation, 4227kB disk space will be freed.
Möchten Sie fortfahren [J/n]? J
dpkg: Fehler beim Bearbeiten von mailscanner (--purge):
 Paket ist in einem sehr schlechten inkonsistenten Zustand - Sie sollten
 es erneut installieren, bevor Sie es zu entfernen versuchen.
Fehler traten auf beim Bearbeiten von:
 mailscanner
E: Sub-process /usr/bin/dpkg returned an error code (1)

----//----

c. output of my upgrade attempt:

11325@mail:/var/cache/apt/archives# dpkg --force-overwrite -i mailscanner_4.66.5-2_all.deb
(Lese Datenbank ... 236337 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereiten zum Ersetzen von mailscanner 4.58.9-2ubuntu1 (durch mailscanner_4.66.5-2_all.deb) ...
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: Warnung - altes pre-removal-Skript wurde mit Fehler-Status 1 beendet
dpkg - probiere stattdessen Skript aus dem neuen Paket ...
No MailScanner found running; none killed.
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: Fehler beim Bearbeiten von mailscanner_4.66.5-2_all.deb (--install):
 Unterprozess neues pre-removal-Skript gab den Fehlerwert 1 zurück
invoke-rc.d: initscript mailscanner, action "start" failed.
dpkg: Fehler beim Aufräumen:
 Unterprozess post-installation script gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 mailscanner_4.66.5-2_all.deb

So - is there any help ?

Many thanks in advance,
adrian
 madagascar said on 2008-04-06:

messages in English:

a. attempt to re-install mailscanner:

11325@mail:~# apt-get install mailscanner
Reading package lists... Done
Building dependency tree
Reading state information... Done
mailscanner is already the newest version.
The following packages were automatically installed and are no longer required:
  language-support-writing-en linux-headers-2.6.24-12-generic
  linux-headers-2.6.24-12 linux-headers-2.6.24-14 libcwidget0 gimp-help-common
  libmail-spf-query-perl gimp-help-en openoffice.org-thesaurus-en-au
  plib1.8.4c2 linux-headers-2.6.24-14-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0B/556kB of archives.
After this operation, 0B of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package mailscanner.
(Reading database ... 236337 files and directories currently installed.)
Preparing to replace mailscanner 4.58.9-2ubuntu1 (using .../mailscanner_4.58.9-2ubuntu1_all.deb) ...
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
No MailScanner found running; none killed.
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/mailscanner_4.58.9-2ubuntu1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
invoke-rc.d: initscript mailscanner, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mailscanner_4.58.9-2ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

----//----

b.) attempt to de-install MailScanner:

11325@mail:~# apt-get purge mailscanner
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  language-support-writing-en linux-headers-2.6.24-12-generic
  linux-headers-2.6.24-12 linux-headers-2.6.24-14 libcwidget0 gimp-help-common
  libmail-spf-query-perl gimp-help-en libnet-cidr-lite-perl
  openoffice.org-thesaurus-en-au plib1.8.4c2 linux-headers-2.6.24-14-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED
  mailscanner*
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 4227kB disk space will be freed.
Do you want to continue [Y/n]? Y
dpkg: error processing mailscanner (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 mailscanner
E: Sub-process /usr/bin/dpkg returned an error code (1)

----//----

c.) attempt to upgrade

11325@mail:/var/cache/apt/archives# sudo dpkg --force-overwrite -i mailscanner_4.66.5-2_all.deb
(Reading database ... 236337 files and directories currently installed.)
Preparing to replace mailscanner 4.58.9-2ubuntu1 (using mailscanner_4.66.5-2_all.deb) ...
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
No MailScanner found running; none killed.
invoke-rc.d: initscript mailscanner, action "stop" failed.
dpkg: error processing mailscanner_4.66.5-2_all.deb (--install):
 subprocess new pre-removal script returned error exit status 1
invoke-rc.d: initscript mailscanner, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 mailscanner_4.66.5-2_all.deb

Thanks,
adrian

Revision history for this message
Jonathan Gossage (jgossage) said :
#4

I am also experiencing this problem. I don't have an answer but I can contribute some more information. The reason the pre-removal script is failing is because it is attempting to compile a Perl module as shown below.

root@aristotle:~# dpkg --configure mailscanner
Setting up mailscanner (4.58.9-2ubuntu1) ...
Checking/installing report files ...
Variable "$FIELD_NAME" is not imported at /usr/share/MailScanner/MailScanner/Message.pm line 6367.
Variable "$FIELD_NAME" is not imported at /usr/share/MailScanner/MailScanner/Message.pm line 6370.
Global symbol "$FIELD_NAME" requires explicit package name at /usr/share/MailScanner/MailScanner/Message.pm line 6367.
Global symbol "$FIELD_NAME" requires explicit package name at /usr/share/MailScanner/MailScanner/Message.pm line 6370.
Compilation failed in require at /usr/sbin/MailScanner line 79.
BEGIN failed--compilation aborted at /usr/sbin/MailScanner line 79.
invoke-rc.d: initscript mailscanner, action "start" failed.
dpkg: error processing mailscanner (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:

My plan of attack will be to find the pre-removal script and attempt to edit out the offending compilation.

Once you get it removed, you might want to consult the Ubuntu installation guide on the MailScanner site.

Jonathan Gossage
 mailscanner

Revision history for this message
Jonathan Gossage (jgossage) said :
#5

I have verified that following the instructions at http://www.mailscanner.info/ubuntu.html will result in a working installation on 8.04.

A couple of points you should be aware of:

1. The site that was recommended for fetching the bits is down for major reconstruction. You can find the file at this URL http://packages.debian.org/lenny/all/mailscanner/download

2. You may not need the recommended patch for 8.04. On my system it was not necessary but your mileage may vary.

Jonathan

Revision history for this message
Jonathan Gossage (jgossage) said :
#6

I forgot to say that you can ensure that MailScanner can be removed by editing the file /etc/default/mailscanner and setting run_mailscanner to zero(0)

Jonathan

Revision history for this message
Ivo Mans (ivomans) said :
#7

After performing Jonathan's tip to set run_mailscanner=0 in /etc/default/mailscanner I had no other option left than 'apt-get install mailscanner'. After this I finally had a proper running installation again.
Don't forget to set run_mailscanner=1 at the end.

Ivo

Can you help with this problem?

Provide an answer of your own, or ask madagascar for more information if necessary.

To post a message you must log in.