update_virus_scanners fix for Debian/Ubuntu

Achim J. Latz achim+mailscanner at qustodium.net
Thu Aug 14 14:06:44 IST 2008


Good day (and first post for me :)

In /usr/sbin/update_virus_scanners the detection of the autoupdate 
scripts will fail because of the following replacement:

   UPDATER=`echo $WRAPPER | sed -e 's/-wrapper$/-autoupdate/'`

At least in Debian and Ubuntu, the wrappers are stored in 
/etc/MailScanner/wrapper/, but the autoupdate scripts are in 
/etc/MailScanner/autoupdate/

Example BitDefender:

/usr/sbin/update_virus_scanners finds 
/etc/MailScanner/wrapper/bitdefender-wrapper, then the above expression 
substitutes for /etc/MailScanner/wrapper/bitdefender-autoupdate, and 
then tests whether the autoupdate script exists

      if [ -x ${UPDATER} ]
       then
         # echo Updating $NAME
         logger -p mail.info -t update.virus.scanners Running autoupdate 
for $NAME
         ${UPDATER} "${PACKAGEDIR}" >/dev/null 2>&1
       fi

HOWEVER, it will not find 
/etc/MailScanner/wrapper/bitdefender-autoupdate because the file 
actually lives in /etc/MailScanner/autoupdate/bitdefender-autoupdate.

The replacement should IMHO read as follows, to replace all occurrences 
of wrapper with autoupdate (including those in the path):

   UPDATER=`echo $WRAPPER | sed -e 's/wrapper/autoupdate/g'`

Is that a problem limited to the Debian version, or does it affect other 
installations as well? Should I file a bug downstream?

Best regards,

		Achim

-- 
Achim J. Latz, Qustodium Internet Security
achim.latz at qustodium.net · http://www.qustodium.net
Data Encryption · Backup Automatisation · E-Mail Protection


More information about the MailScanner mailing list