MailScanner won't start due to variable $FIELD_NAME

Bug #195260 reported by Jasey
30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mailscanner (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mailscanner

UBUNTU 8.04 HARDY - ALPHA 5 (amd64)
AMD64

MailScanner version 4.58.9-2-ubuntu1 - from the Hardy Alpha 5 Repo's won't start due to the following error:

Variable "$FIELD_NAME" is not imported at /usr/share/MailScanner/MailScanner/Message.pm line 6368.
Variable "$FIELD_NAME" is not imported at /usr/share/MailScanner/MailScanner/Message.pm line 6371.
Global symbol "$FIELD_NAME" requires explicit package name at /usr/share/MailScanner/MailScanner/Message.pm line 6368.
Global symbol "$FIELD_NAME" requires explicit package name at /usr/share/MailScanner/MailScanner/Message.pm line 6371.
Compilation failed in require at /usr/sbin/MailScanner line 79.
BEGIN failed--compilation aborted at /usr/sbin/MailScanner line 79.

I managed to fix this issue by adding:

6356: our $FIELD_NAME = '[^\x00-\x1f\x7f-\xff :]+:';

line 6355 reads: package Mail::Header;

This was taken from the MailScanner 4.66.5-3 tarball from the MailScanner website.

This works as a quick-fix for me - but has messed up my apt. Recommend upgrading repo's to include 4.66.5-3.

Jason

Revision history for this message
Savvas Radevic (medigeek) wrote :

confirming

Changed in mailscanner:
status: New → Confirmed
Revision history for this message
Jasey (jason-rivers) wrote :

Update:

after fixing the package manager with some help (thanks savvas) I managed to remove mailscanner 4.58.9-2 and then installed mailscanner_4.66.5-1_all.deb from the debian unstable. this works without any issues.

can we upgrade mailscanner in the ubuntu repo's to match that of Debians?

Jason.

Revision history for this message
madagascar (ai-bcn) wrote :
Download full text (3.4 KiB)

Hi Savvas,

Could you please help solving either

a) the reinstallation of MailScanner so that i can then remove it safely or
b.) force overwrite the MailScanner installation with the newer debian file

So far, i had the same problem and am now stuck (apologies for the german text):

1. Attempt: dpkg -i mailscanner_4.58.9-2ubuntu1_all.deb

11325@mail:/var/cache/apt/archives# dpkg -i mailscanner_4.58.9-2ubuntu1_all.deb
dpkg: Status-Datenbank-Bereich ist von einem anderen Prozess gesperrt
11325@mail:/var/cache/apt/archives# dpkg -i mailscanner_4.58.9-2ubuntu1_all.deb
(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 mailscanner_4.58.9-2ubuntu1_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.58.9-2ubuntu1_all.deb

2. Attempt to apt-get install mailscanner:

11325@mail:/var/cache/apt/archives# dpkg -i mailscanner_4.58.9-2ubuntu1_all.deb
(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 mailscanner_4.58.9-2ubuntu1_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.58.9-2ubuntu1_all.deb

3. Attempt: dpkg -i --force-overwrite mailscanner_4.66.5-2_all.deb

11325@mail:/var/cache/apt/archives# dpkg -i --force-overwrite mailscanner_4.66.5-2_all.deb
(Lese Datenbank ... 236330 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
invok...

Read more...

Revision history for this message
Frode M. Døving (frode) wrote :

confirmed.
madagascar:
You can edit /etc/init.d/mailscanner and add a line containing 'exit 0'
at the start of the do_stop() function. Here that is around line 124.

Then update the packages.

Changes needs to be reverted to make the stop function work.
It'll basically tell the pre-removal script it succeeded in stopping mailscanner, without trying to actuallly stop it at all.

Revision history for this message
sulla (wolfgang-sailer) wrote :

confirmed!

Same error here in HARDY FINAL RELEASE!

sulla

Revision history for this message
domwise (dominic-wise) wrote :

Also have this error.

Fixed (for now) by manual editing of /usr/share/MailScanner/MailScanner/Message.pm as per the original report.

Revision history for this message
max (maxwevers) wrote :

I also had this error and fixed it by editing Message.pm as suggest.

Revision history for this message
Steve Kowalik (stevenk) wrote :

Attaching a debdiff to solve this issue via SRU

Steve Kowalik (stevenk)
Changed in mailscanner:
status: Confirmed → Fix Released
status: New → Confirmed
Revision history for this message
Luke Yelavich (themuso) wrote :

The bug is already set to confirmed so nothing to do there, but an ACK from me.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here

Changed in mailscanner:
status: Confirmed → Fix Committed
Revision history for this message
Jasey (jason-rivers) wrote :

I'm still seeing 4.58.9-2-ubuntu1 on the GB Mirror - I'll give it 24 hours to populate before re-trying and testing.

/Jason

Revision history for this message
Steve Kowalik (stevenk) wrote :

Uploading ubuntu1.1 and then ubuntu1.2 this fixes the problem for me.

Can people test 4.58.9-2ubuntu1.2 in hardy-proposed, and comment here if it works?

Revision history for this message
Jasey (jason-rivers) wrote :

Looks good :)

thanks for that fix - sorry for the delay, I had to do it on a virtual machine as my mail server is now running 4.66.5 from Debian.

will Intrepid use a later version of MailScanner?

Jason

Revision history for this message
Scott Kitterman (kitterman) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in mailscanner:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.