--- mailscanner-4.74.16.orig/debian/README.sendmail
+++ mailscanner-4.74.16/debian/README.sendmail
@@ -0,0 +1,41 @@
+From: Ramon Acedo <ramon@pangea.org>
+
+Setting sendmail and mailscanner in Debian is as easy as the
+following:
+
+1 - Create /var/spool/mqueue.in with the same permissions than
+/var/spool/mqueue
+
+	mkdir /var/spool/mqueue.in
+	chown smmta:smmsp /var/spool/mqueue.in -R
+	chmod 2750 /var/spool/mqueue.in -R
+
+2 - Edit /etc/mail/sendmail.conf and set DAEMON_PARMS to:
+    DAEMON_PARMS="-OPrivacyOptions=noetrn -ODeliveryMode=queueonly -OQueueDirectory=/var/spool/mqueue.in";
+
+3 - Goto /etc/mail and type make after changing sendmail.conf in step 2.
+
+	cd /etc/mail
+	make
+
+4 - /etc/init.d/sendmail reload
+
+5 - Edit /etc/MailScanner/MailScanner.conf and change at least the
+following:
+	MTA = sendmail
+	Incoming Queue Dir = /var/spool/mqueue.in
+	Outgoing Queue Dir = /var/spool/mqueue
+	Run As User = root
+	Run As Group = mail
+	#Sendmail2 = ...
+
+6 - Change owner and group of MailScanner's spool diretory
+
+	chown -R root:mail /var/spool/MailScanner
+	chown -R root:mail /var/lib/MailScanner
+	chown -R root:mail /var/run/MailScanner
+	chown -R root:mail /var/lock/subsys/MailScanner
+
+7 - edit /etc/default/mailscanner
+
+8 - /etc/init.d/mailscanner start
--- mailscanner-4.74.16.orig/debian/control
+++ mailscanner-4.74.16/debian/control
@@ -0,0 +1,29 @@
+Source: mailscanner
+Section: mail
+Priority: optional
+Maintainer: Simon Walter <simon.walter@hp-factory.de>
+Uploaders: Jan Wagner <waja@cyconet.org>
+Build-Depends: debhelper (>> 5), dpatch, xsltproc, docbook-xsl, po-debconf, docbook-xml
+Build-Depends-Indep: perl (>= 5.8.7)
+Standards-Version: 3.8.0
+
+Package: mailscanner
+Architecture: all
+Pre-Depends: debconf (>= 0.5) | debconf-2.0
+Depends: exim4 | mail-transport-agent, spamassassin (>= 3.1), unzip, ucf (>= 1.08), perl (>= 5.8.7), libarchive-zip-perl (>= 1.16), libconvert-tnef-perl, libhtml-parser-perl, libmime-tools-perl | libmime-perl (>= 5.419), libnet-cidr-perl, libcompress-zlib-perl (>= 1.42), libconvert-binhex-perl (>= 1.119), libdbd-sqlite3-perl (>= 1.13), libfilesys-df-perl (>= 0.90), libsys-syslog-perl (>= 0.18), libsys-hostname-long-perl, libmailtools-perl (>= 2.02), libole-storage-lite-perl (>= 0.17), ${misc:Depends}
+Recommends: tnef (>= 1.4.3), ncftp | wget, libnet-cidr-lite-perl, clamav, clamav-daemon
+Suggests: libnet-ldap-perl, libmail-spf-query-perl, unrar-nonfree
+Conflicts: exim4-base (<< 4.30-3)
+Homepage: http://mailscanner.info
+Description: email gateway for virus scanning, spam and phishing detection
+ MailScanner is a email gateway virus-scanner and spam and
+ phishing-detector. It uses Exim, sendmail or postfix as its basis,
+ and supports clamav and some commercial virus scanning engines to do
+ the actual virus scanning. For spam dectection MailScanner uses
+ spamassassin.
+ .
+ The action taken on virus, spam or phishing mails can be configured
+ with a flexible ruleset based on sender, receiver, scoring etc.
+ .
+ Virus checking is disabled and spam checking is enabled by default.
+ 
--- mailscanner-4.74.16.orig/debian/mailscanner.install
+++ mailscanner-4.74.16/debian/mailscanner.install
@@ -0,0 +1,61 @@
+bin/d2mbox usr/sbin/
+bin/df2mbox usr/sbin/
+bin/upgrade_MailScanner_conf usr/sbin/
+bin/MailScanner /usr/sbin
+bin/update_virus_scanners /usr/sbin
+bin/update_phishing_sites /usr/sbin
+bin/mailscanner_create_locks /usr/sbin
+lib/MailScanner.pm usr/share/MailScanner/
+lib/MailScanner/Antiword.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Config.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/ConfigDefs.pl usr/share/MailScanner/MailScanner/
+lib/MailScanner/EximDiskStore.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Exim.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/GenericSpam.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Lock.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Log.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Mail.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/MCPMessage.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/MCP.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/MessageBatch.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Message.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/PFDiskStore.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Postfix.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Qmail.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/QMDiskStore.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Quarantine.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Queue.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/RBLs.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/SA.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/Sendmail.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/SMDiskStore.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/SweepContent.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/SweepOther.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/SweepViruses.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/SystemDefs.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/TNEF.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/WorkArea.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/ZMailer.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/ZMDiskStore.pm usr/share/MailScanner/MailScanner/
+lib/MailScanner/CustomConfig.pm etc/MailScanner/
+lib/MailScanner/CustomFunctions/* usr/share/doc/mailscanner/examples/CustomFunctions/
+lib/*wrapper* etc/MailScanner/wrapper/
+lib/*autoupdate* etc/MailScanner/autoupdate/
+etc/reports usr/share/MailScanner/
+etc/mcp/10_example.cf usr/share/doc/mailscanner/examples/mcp/
+etc/mcp/mcp.spam.assassin.prefs.conf etc/MailScanner/mcp/
+etc/rules/EXAMPLES usr/share/doc/mailscanner/examples/rules/
+etc/rules/README usr/share/doc/mailscanner/examples/rules/
+etc/rules/bounce.rules etc/MailScanner/rules/
+etc/rules/max.message.size.rules etc/MailScanner/rules/
+etc/rules/spam.whitelist.rules etc/MailScanner/rules/
+etc/country.domains.conf etc/MailScanner/
+etc/filename.rules.conf etc/MailScanner/
+etc/filetype.rules.conf etc/MailScanner/
+etc/MailScanner.conf etc/MailScanner/
+etc/mailscanner.conf.with.mcp etc/MailScanner/
+etc/phishing.safe.sites.conf etc/MailScanner/
+etc/spam.assassin.prefs.conf etc/MailScanner/
+etc/spam.lists.conf etc/MailScanner/
+debian/tmp/virus.scanners.conf etc/MailScanner/
+etc/phishing.bad.sites.conf etc/MailScanner/
--- mailscanner-4.74.16.orig/debian/mailscanner.changelogs
+++ mailscanner-4.74.16/debian/mailscanner.changelogs
@@ -0,0 +1 @@
+Changelog
--- mailscanner-4.74.16.orig/debian/README.exim4
+++ mailscanner-4.74.16/debian/README.exim4
@@ -0,0 +1,73 @@
+HOWTO setup mailscanner for exim4 in daemon mode
+================================================
+
+[Note: this configuration works for me; please send other working
+ configurations to mailscanner@packages.debian.org]
+
+This configuration assumes, you use the exim4 configuration provided
+by the exim4-config package.
+
+- change permissions for the exim4 user
+
+	chown -R Debian-exim:Debian-exim /var/spool/MailScanner
+	chown -R Debian-exim:Debian-exim /var/lib/MailScanner
+	chown -R Debian-exim:Debian-exim /var/run/MailScanner
+	chown -R Debian-exim:Debian-exim /var/lock/subsys/MailScanner
+
+- create a spool directory for the outgoing queue
+
+	mkdir -p /var/spool/exim4_outgoing/{db,input,msglog}
+	chown -R Debian-exim:Debian-exim /var/spool/exim4_outgoing
+	chmod -R 750 /var/spool/exim4_outgoing
+
+- when configuring mailscanner with 'Split Exim Spool = yes', which is
+  not the default and not needed for most installations, then you have
+  to set
+	Incoming Queue Dir = /var/spool/exim4/input/*
+  and create all 62 dirs in both queue directories yourself. See the exim
+  documentation for the details.
+
+- create a log directory for the outgoing queue
+
+	mkdir -p /var/log/exim4_outgoing
+	chown -R Debian-exim:adm /var/log/exim4_outgoing
+	chmod -R 2750 /var/log/exim4_outgoing
+
+- copy logrotate script
+	cp /usr/share/doc/mailscanner/exim/logrotate \
+		/etc/logrotate.d/mailscanner_exim
+
+- modify the exim4 defaults in /etc/default/exim4
+
+  - set QUEUERUNNER to `separate'
+  - add to QUEUERUNNEROPTIONS `-DOUTGOING'
+  - add to SMTPLISTENEROPTIONS `-odq'.
+
+- copy the mailscanner snippet to the exim4 config. Make sure you
+  configured exim4-config to use split configuration files.  If not,
+  use dpkg-reconfigure exim4 to change it.
+
+	cp -p /usr/share/doc/mailscanner/exim/01_mailscanner_config \
+		/etc/exim4/conf.d/main/.
+
+  (When using the monolithic exim4 config file, insert the contents of this
+  file somewhere before 'begin acl').
+
+- run `update-exim4.conf'
+
+- restart exim4.
+
+- copy exim4's daily cronjob and apply the patch to cleanup tidydb in
+	exim4_outgoing
+
+	cp -p /etc/cron.daily/exim4-base \
+		/etc/cron.daily/exim4-outgoing
+
+	cd /etc/cron.daily
+	patch < /usr/share/doc/mailscanner/exim/cron.daily.patch
+
+- edit /etc/default/mailscanner
+
+- start mailscanner.
+
+	/etc/init.d/mailscanner start
--- mailscanner-4.74.16.orig/debian/TODO
+++ mailscanner-4.74.16/debian/TODO
@@ -0,0 +1,12 @@
+- add docs from the website
+- prerm kills /var/spool/MailScanner/incoming/ even if there are files
+   in the subdirectories
+- postinst moves/removes spamassassin database from user/root
+   directories
+- coordinate placment of spamassassin database with spamassassin package?
+   MailScanner should have it's own aside from spamassassin, which
+   should be mentioned in docs
+- Convince the upstream author not to include the rpm release number
+   in the upstream source version. This BITES! Currently worked around
+   by using 3.01.2-1 for the first Debian release of the upstream
+   version 3.01-2.
--- mailscanner-4.74.16.orig/debian/README.perl
+++ mailscanner-4.74.16/debian/README.perl
@@ -0,0 +1,30 @@
+Net::CIDR		-> libnet-cidr-perl
+IO-stringy		-> libio-stringy-perl
+MIME::Base64		-> perl (>= 5.6.1), libmime-base64-perl
+TimeDate		-> libtimedate-perl
+MailTools		-> libmailtools-perl
+File::Spec		-> perl-base
+File::Temp		-> perl-modules
+HTML::Tagset		-> libhtml-tagset-perl
+HTML::Parser		-> libhtml-parser-perl
+MIME-tools		-> libmime-perl
+Convert::TNEF		-> libconvert-tnef-perl
+Compress::Zlib		-> libcompress-zlib-perl
+Archive::Zip		-> libarchive-zip-perl
+Convert::BinHex		-> libconvert-binhex-perl
+DBI			-> libdbi-perl
+DBD::SQLite		-> libdbd-sqlite3-perl
+Getopt::Long
+Time::HiRes		-> perl (libtime-hires-perl)
+Filesys::Df		-> libfilesys-df-perl
+Net::IP			-> libnet-ip-perl
+Sys::Syslog		-> libsys-syslog-perl
+
+Package		is dependency of ...
+libmailtools-perl (>= 1.11)	-> libmime-perl
+libio-stringy-perl		-> libmime-perl
+libcompress-zlib-perl		-> libarchive-zip-perl
+libmail-audit-perl		-> libmailtools-perl, libmime-perl
+libtimedate-perl		-> libmailtools-perl
+libhtml-tagset-perl		-> libhtml-parser-perl
+libdbi-perl			-> libdbd-sqlite3-perl
--- mailscanner-4.74.16.orig/debian/mailscanner.logcheck.ignore.server
+++ mailscanner-4.74.16/debian/mailscanner.logcheck.ignore.server
@@ -0,0 +1,23 @@
+MailScanner\[[0-9]+\]: /var/spool/MailScanner/incoming/[0-9]+/[^ ]+  Infection: [^ ]+
+MailScanner\[[0-9]+\]: Batch completed at [0-9]+ bytes per second \([0-9]+ / [0-9]+\)
+MailScanner\[[0-9]+\]: Creating hardcoded struct_flock subroutine for linux \(Linux-type\)
+MailScanner\[[0-9]+\]: Disinfection completed at [0-9]+ bytes per second
+MailScanner\[[0-9]+\]: Infected message [^ ]+ came from [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
+MailScanner\[[0-9]+\]: MCP Checks completed at [0-9]+ bytes per second
+MailScanner\[[0-9]+\]: MailScanner E-Mail Virus Scanner version [^ ]+ starting...
+MailScanner\[[0-9]+\]: MailScanner child dying of old age
+MailScanner\[[0-9]+\]: New Batch: Scanning [0-9]+ messages, [0-9]+ bytes
+MailScanner\[[0-9]+\]: Requeue: [[:alnum:].]+ to [[:alnum:].]+
+MailScanner\[[0-9]+\]: Silent: Delivered [0-9]+ messages containing silent viruses
+MailScanner\[[0-9]+\]: Spam Checks completed at [0-9]+ bytes per second
+MailScanner\[[0-9]+\]: Spam Checks: Found [0-9]+ spam messages
+MailScanner\[[0-9]+\]: Uninfected: Delivered [0-9]+ messages
+MailScanner\[[0-9]+\]: Using locktype = posix
+MailScanner\[[0-9]+\]: Virus Processing completed at [0-9]+ bytes per second
+MailScanner\[[0-9]+\]: Virus Scanning completed at [0-9]+ bytes per second
+MailScanner\[[0-9]+\]: Virus Scanning: F-Prot found [0-9]+ infections
+MailScanner\[[0-9]+\]: Virus Scanning: F-Prot found virus [^ ]+
+MailScanner\[[0-9]+\]: Virus Scanning: Found [0-9]+ viruses
+MailScanner\[[0-9]+\]: Virus and Content Scanning: Starting
+[^ ]+: MailScanner setting GID to [a-zA-Z0-9_-]+ \([0-9]+\)
+[^ ]+: MailScanner setting UID to [a-zA-Z0-9_-]+ \([0-9]+\)
--- mailscanner-4.74.16.orig/debian/mailscanner.lintian.overrides
+++ mailscanner-4.74.16/debian/mailscanner.lintian.overrides
@@ -0,0 +1,5 @@
+mailscanner: non-standard-dir-perm var/lib/MailScanner/ 0750 != 0755
+mailscanner: non-standard-dir-perm var/spool/MailScanner/ 0750 != 0755
+mailscanner: non-standard-dir-perm var/spool/MailScanner/archive/ 0750 != 0755
+mailscanner: non-standard-dir-perm var/spool/MailScanner/incoming/ 0750 != 0755
+mailscanner: non-standard-dir-perm var/spool/MailScanner/quarantine/ 0750 != 0755
--- mailscanner-4.74.16.orig/debian/mailscanner.docs
+++ mailscanner-4.74.16/debian/mailscanner.docs
@@ -0,0 +1,6 @@
+README
+MailScanner.conf.index.html
+debian/README.exim4
+debian/README.sendmail
+debian/README.perl
+debian/exim/
--- mailscanner-4.74.16.orig/debian/preinst
+++ mailscanner-4.74.16/debian/preinst
@@ -0,0 +1,67 @@
+#! /bin/sh
+# preinst script for mailscanner
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+	if [ "$1" = "upgrade" ]; then
+			start-stop-daemon --stop --retry=TERM/30 --oknodo --name MailScanner 2>/dev/null || true
+#	    start-stop-daemon --stop --quiet --oknodo  \
+#		--pidfile /var/run/#PACKAGE#.pid  \
+#		--exec /usr/sbin/#PACKAGE# 2>/dev/null || true
+
+	    # fix ownership of /var/lib/MailScanner
+						if [ "$(stat -c %U /var/lib/MailScanner)" = root ]; then
+								og=$(ls -ld /var/lib/MailScanner|awk '{OFS=":"; print $3, $4}')
+								chown $og /var/lib/MailScanner
+						fi
+
+	    # move Custom & CustomFunctions to /etc/MailScanner
+						for d in Custom CustomFunctions; do
+								if [ -h /etc/MailScanner/$d ]; then
+										rm -f /etc/MailScanner/$d
+								elif [ -d /etc/MailScanner/$d ]; then
+										continue
+								else
+										mkdir -p /etc/MailScanner/$d
+								fi
+								if [ ! -h /etc/MailScanner/$d ]; then
+										for f in /usr/share/MailScanner/MailScanner/$d/*; do
+												if [ -e $f ] && [ ! -h $f ]; then
+														mv $f /etc/MailScanner/$d/
+												fi
+										done
+										rm -rf /usr/share/MailScanner/MailScanner/$d
+										ln -s /etc/MailScanner/$d \
+												/usr/share/MailScanner/MailScanner/$d
+								fi
+						done
+	fi
+				;;
+
+    abort-upgrade)
+				;;
+
+    *)
+	echo "preinst called with unknown argument \`$1'" >&2
+	exit 1
+				;;
+esac
+
+
+#DEBHELPER#
+
+exit 0
--- mailscanner-4.74.16.orig/debian/prerm
+++ mailscanner-4.74.16/debian/prerm
@@ -0,0 +1,41 @@
+#! /bin/sh -e
+# prerm script for mailscanner
+#
+# see: dh_installdeb(1)
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+    remove|upgrade|deconfigure)
+				for d in /var/spool/MailScanner/incoming/*; do
+						if [ -d $d ]; then
+								rmdir --ignore-fail-on-non-empty $d 2>/dev/null
+						fi
+				done
+	;;
+    failed-upgrade)
+	;;
+    *)
+	echo "prerm called with unknown argument \`$1'" >&2
+	exit 1
+				;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+satisfy_nitpicking_on_removal=232379
+export satisfy_nitpicking_on_removal
+
+#DEBHELPER#
+
+exit 0
--- mailscanner-4.74.16.orig/debian/postinst
+++ mailscanner-4.74.16/debian/postinst
@@ -0,0 +1,124 @@
+#! /bin/sh -e
+# postinst script for mailscanner
+#
+# see: dh_installdeb(1)
+
+statedir="/var/lib/MailScanner"
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+. /usr/share/debconf/confmodule
+
+install_default()
+{
+    if [ ! -f /etc/default/mailscanner ]; then
+	cat > /etc/default/mailscanner <<-EOF
+	#
+	# This sets how many days files will remain in the "quarantine" area before
+	# being automatically removed.
+	#
+	q_days=7
+
+	#
+	# This sets how much the priority of the mailscanner daemon should be
+	# reduced by (i.e. "nice -X").  Since it is a batch oriented task,
+	# there it can easily give up some CPU cycles to more interactive
+	# tasks.
+	#
+	run_nice=2
+
+	#
+	# Uncomment this line once MailScanner has been fully configured.
+	#
+	#run_mailscanner=1
+	EOF
+    fi
+}
+
+#UCF#
+
+case "$1" in
+    configure)
+				domain=`hostname -d`
+				if [ -n "$domain" ]; then
+						sed -e "s/put\.your\.domain\.name\.here/$domain/" \
+								/etc/MailScanner/MailScanner.conf \
+								> /etc/MailScanner/MailScanner.conf.new
+						if cmp -s /etc/MailScanner/MailScanner.conf \
+								/etc/MailScanner/MailScanner.conf.new
+						then
+								rm -f /etc/MailScanner/MailScanner.conf.new
+						else
+								mv -f /etc/MailScanner/MailScanner.conf.new \
+										/etc/MailScanner/MailScanner.conf
+						fi
+				fi
+
+				if [ -n "$2" ]; then
+						if dpkg --compare-versions "$2" lt 4.40; then
+								chown --reference=/var/spool/MailScanner \
+										/var/lock/subsys/MailScanner
+						fi
+				fi
+
+#	install_default
+# currently a conffile, instead
+# move files from any previously installed location
+				for dir in  /var/spool/MailScanner /var/spool/mailscanner \
+						/var/state/MailScanner /var/state/mailscanner \
+						/var/lib/MailScanner   /var/lib/mailscanner   \
+						~root/.spamassassin ~mail/.spamassassin; do
+						if [ "$dir" = "$statedir" ]; then continue; fi
+						if [ ! -d "$dir" ]; then continue; fi
+						for file in auto-whitelist bayes_journal bayes_msgcount bayes_seen bayes_toks; do
+								if [ -f $dir/$file ]; then
+										if [ -f $statedir/$file ]; then
+												if [ $dir/$file -nt $statedir/$file ]; then
+														mv $dir/$file $statedir/$file
+												else
+														rm -f $dir/$file
+												fi
+										else
+												mv $dir/$file $statedir/$file
+										fi
+								fi
+						done
+						rm -f $dir/bayes.* || true
+						rmdir $dir >/dev/null 2>&1 || true
+				done
+				rm -rf /var/spool/mailscanner
+				;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+				;;
+
+    *)
+	echo "postinst called with unknown argument \`$1'" >&2
+	exit 0
+				;;
+esac
+
+db_stop
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- mailscanner-4.74.16.orig/debian/mailscanner.links
+++ mailscanner-4.74.16/debian/mailscanner.links
@@ -0,0 +1,3 @@
+/etc/MailScanner/CustomConfig.pm /usr/share/MailScanner/MailScanner/CustomConfig.pm
+/etc/MailScanner/Custom /usr/share/MailScanner/MailScanner/Custom
+/etc/MailScanner/CustomFunctions /usr/share/MailScanner/MailScanner/CustomFunctions
--- mailscanner-4.74.16.orig/debian/copyright
+++ mailscanner-4.74.16/debian/copyright
@@ -0,0 +1,29 @@
+This package was first debianized by Matthias Klose <doko@debian.org> on
+Fri,  4 Jan 2002 20:05:18 +0100.
+This package was adopted by Simon Walter <simon.walter@hp-factory.de> on
+Sat, 16 Dec 2006 14:05:53 +0100
+
+It was downloaded from <http://www.mailscanner.info/downloads.html>
+
+Copyright Holders: Julian Field <MailScanner@ecs.soton.ac.uk>
+
+License:
+
+	Copyright (C) 2002-2009 Julian Field <MailScanner@ecs.soton.ac.uk>
+
+	This program is free software; you can redistribute it and/or modify
+	it under the terms of the GNU General Public License as published by
+	the Free Software Foundation; either version 2 of the License, or
+	(at your option) any later version.
+
+	This program is distributed in the hope that it will be useful,
+	but WITHOUT ANY WARRANTY; without even the implied warranty of
+	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+	GNU General Public License for more details.
+
+	You should have received a copy of the GNU General Public License
+	along with this program; if not, write to the Free Software
+	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in /usr/share/common-licenses/GPL file.
--- mailscanner-4.74.16.orig/debian/changelog
+++ mailscanner-4.74.16/debian/changelog
@@ -0,0 +1,775 @@
+mailscanner (4.74.16-1~bpo50+1) lenny-backports; urgency=low
+
+  * Rebuild for lenny-backports.
+
+ -- Jan Wagner <waja@cyconet.org>  Thu, 09 Apr 2009 11:28:13 +0200
+
+mailscanner (4.74.16-1) unstable; urgency=low
+
+  * New upstream release (Closes: #506353)
+    Fixes symlink vulnerability CVE-2008-5312, CVE-2008-5313, CVE-2008-5140
+  * Added new description to install MailScanner with sendmail and queue aging
+    README.sendmail.2 thanks to Jim Barber
+  * Fixed patch for exim installation (Closes: #512338)
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Tue, 20 Jan 2009 22:23:36 +0100
+
+mailscanner (4.71.10-1) unstable; urgency=low
+
+  * New upstream release (Closes: #490948, #495904)
+  * Since 4.69.9 --id=<message-id> and --debug allow 
+    to scan a single message (Closes: #177027)
+  * Fixed init.d script to stop possible respawning mailscanner 
+    instances (Closes: #491037)
+  * Fixed a bug which prevented update_virus_scanner to execute 
+    the autoupdate-scripts, thanks to Achim J. Latz
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Fri, 03 Oct 2008 13:41:01 +0200
+
+mailscanner (4.68.8-1) unstable; urgency=low
+
+  * New upstream release
+  * Removed unused templates (Closes: #472676, #472067, #469916)
+  * Fix broken non-standard conform init-script, which caused upgrade problems
+    invoke-rc.d requires initscripts to return 0 if the daemon was already 
+    stopped (Closes: #472489)
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Thu, 03 Apr 2008 21:32:08 +0200
+
+mailscanner (4.66.5-2) unstable; urgency=low
+
+  * Install links after fixing file permissions to avoid chmod
+    errors, add docbook-xml to build-depends (Closes: #464317)
+  * Drop upgrade scripts for mailscanner v3 (Closes: #467411, #467465)
+  * updated dependencies:
+		- libcompress-zlib-perl (>= 1.42)
+		- libdbd-sqlite3-perl (>= 1.13)
+		- spamassassin (>= 3.1)
+		- libmailtools-perl (>= 2.02)
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Wed, 27 Feb 2008 18:10:14 +0100
+
+mailscanner (4.66.5-1) unstable; urgency=low
+
+  [ Simon Walter ]
+  * New upstream version (Closes: #425861, #429954, #465095)
+  * Add Portuguese debconf translation. (Closes: #412883)
+  * Removed f-prot location patch, f-prot-installer package has been removed
+  * Add clamav and clamav-daemon to Recommends
+  * Less commercial description (Closes: #432881)
+  * Found new sponsor (Closes: #449140)
+  * Remove /etc/cron.d/mailscanner on purge (Closes: #454381)
+  * Test for mailscanner spool dir in daily cronscript (Closes: #435998)
+
+  [ Anthony Fok ]
+  * libmime-perl has been renamed to libmime-tools-perl as of 5.425-2, hence
+    updated dependency to libmime-tools-perl | libmime-perl (>= 5.419)
+  * MailScanner-File::Temp::VERSION-check.dpatch: /usr/sbin/MailScanner
+    checks for Perl IO module >= 1.23, which does not yet exist in Debian,
+    and IMHO is the wrong check.  Checks for File::Temp >= 0.17 instead.
+  * Sponsored the upload.
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Sun, 24 Feb 2008 05:41:25 +0800
+
+mailscanner (4.58.9-2) unstable; urgency=low
+
+  * Exim.pm: Fix serious problem with patch for #346212, MailScanner couldn't read any address
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Sun, 25 Feb 2007 20:18:12 +0100
+
+mailscanner (4.58.9-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Tue, 20 Feb 2007 19:25:23 +0100
+
+mailscanner (4.57.6-3) unstable; urgency=low
+
+  * cron.daily: fixed string equation test (Closes: #409790)
+  * Add missing patch for #399424 to load spam.assasin.prefs.conf (Closes: #410148)
+  * Exim.pm: Correctly parse adress-lines in -H spool files if one_time option is used (Closes: #346212)
+  * Message.pm: change owner of extracted dot-files (.foo) (Closes: #326193)
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Sun, 11 Feb 2007 22:35:05 +0100
+
+mailscanner (4.57.6-2) unstable; urgency=low
+
+  * README.Debian: add comment about spamassassin/spamd  (Closes: #309796)
+  * README.Debian: add comment about razor logfile problem (Closes: #305239)
+  * cron.daily: test if exim4 is installed before doing exim4 specific things. (Closes: #406643) 
+  * cron.daily: quote variables (Closes: #407581)
+  * exim/cron.daily.patch: set EXIM4_SPOOLDIR so exim4_refresh_gnutls-params works in the correct directory (Closes: #406814)
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Mon, 22 Jan 2007 23:50:38 +0100
+
+mailscanner (4.57.6-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Sat, 6 Jan 2007 19:19:18 +0100
+
+mailscanner (4.55.10-4) unstable; urgency=low
+
+  * New maintainer (Closes: #401510)
+  * Complet rewrite of the init-script. (Closes: #402967)
+  * Remove check_mailscanner script
+  * Manpages for all executables.
+  * New installation manual for exim4. (Closes: #401329)
+  * New installation manual for sendmail (Closes: #332249)
+  * Add spanish debconf translation. (Closes: #402530)
+  * Add comment about spamhaus.org DNSBLs. (Closes: #402797)
+  * Add update_phishing_safe_sites script
+  * Add d2mbox script
+  * Reactivate usage of spam.assassin.prefs.conf. (Closes: #399424)
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Sat, 16 Dec 2006 14:05:53 +0100
+
+mailscanner (4.55.10-3) unstable; urgency=high
+
+  * QA upload
+  * allow the package to purge correct even if ufc is non-existent.
+    Closes: #389968
+
+ -- Andreas Barth <aba@not.so.argh.org>  Tue, 12 Dec 2006 13:47:52 +0000
+
+mailscanner (4.55.10-2) unstable; urgency=low
+
+  * QA upload
+  * Add dep on libsys-hostname-long-perl, which was missing. (Closes: #401677)
+  * Remove debian/doc-base, as the documentation was removed in the last
+    release.
+  * Kill off references to the html docs in README.Debian and add new TODO
+    item to create free documentation.
+
+ -- Marc 'HE' Brockschmidt <he@debian.org>  Tue,  5 Dec 2006 17:31:11 +0100
+
+mailscanner (4.55.10-1) unstable; urgency=low
+
+  * New upstream version.
+  * Orphan the package. Upstream did remove any documentation from
+    the package; the documentation offered by upstream is not
+    redistribbutable.
+  * Depend on libfilesys-df-perl, libsys-syslog-perl.
+
+ -- Matthias Klose <doko@debian.org>  Mon,  4 Dec 2006 06:59:10 +0100
+
+mailscanner (4.51.5-1.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Only call ucf on purge if it is available. (Closes: #389968)
+  * Move debhelper to Build-Depends to fix lintian error.
+
+ -- Arjan Oosting <arjanoosting@home.nl>  Thu,  5 Oct 2006 22:20:40 +0200
+
+mailscanner (4.51.5-1) unstable; urgency=low
+
+  * New upstream version.
+  * etc/reports/pt_br.old: Remove from source, repackage source due to
+    wrong permissions in archive.
+  * Update dependencies.
+  * debian/patches/awk-location, debian/patches/filetype.rules.conf: Remove.
+
+ -- Matthias Klose <doko@debian.org>  Mon,  6 Mar 2006 00:16:43 +0000
+
+mailscanner (4.46.2-3) unstable; urgency=low
+
+  * Pre-Depend on debconf (>= 0.5) | debconf-2.0 (closes: #332020).
+
+ -- Matthias Klose <doko@debian.org>  Wed,  5 Oct 2005 01:10:34 +0000
+
+mailscanner (4.46.2-2) unstable; urgency=low
+
+  * Fix preinst script, really address #293667.
+
+ -- Matthias Klose <doko@debian.org>  Tue,  4 Oct 2005 15:26:11 +0000
+
+mailscanner (4.46.2-1) unstable; urgency=low
+
+  * New upstream version.
+  * Drop dependency on ncftp | wget, add it to the recommends (closes: #309778).
+  * Add debconf translations (closes: #312747, #330451, #330780).
+  * Tweak logcheck rules for postfix (closes: #320734).
+  * Ignore errors from writing on /dev/tty (closes: #321039).
+  * Don't distribute /etc/spam.assassin.prefs.conf (closes: #309641).
+  * Fix lockfile name in init and cron scripts (closes: #319258).
+  * Depend on debconf (>= 0.5) | debconf-2.0 (closes: #293667).
+  * Make autoupdate scripts executable (closes: #318137).
+
+ -- Matthias Klose <doko@debian.org>  Mon,  3 Oct 2005 18:16:33 +0000
+
+mailscanner (4.41.3-2) unstable; urgency=high
+
+  * Fix package suggestion in control file.
+  * README.exim4: Add paragraph how to run with 'Split Exim Spool = yes'.
+    Closes: #305496.
+
+ -- Matthias Klose <doko@debian.org>  Sun,  8 May 2005 16:56:18 +0200
+
+mailscanner (4.41.3-1) unstable; urgency=medium
+
+  * New upstream version.
+  * Suggest unrar-non-free, do not depend on unrar. Closes: #306220.
+    If unrar-non-free is not installed, rar archives won't be checked.
+  * Fixx ddcproc path (closes: #304168).
+  * Fix path in sophos-autoupdate (closes: #304589).
+
+ -- Matthias Klose <doko@debian.org>  Mon,  2 May 2005 17:14:13 +0200
+
+mailscanner (4.40.11-1) unstable; urgency=medium
+
+  * New upstream version.
+  * Change default lock directory to /var/lock/subsys/MailScanner.
+    Closes: #299922.
+  * Add dependency on unrar.
+  * Add Czech translation of the debconf templates (closes: #298779).
+
+ -- Matthias Klose <doko@debian.org>  Sat,  2 Apr 2005 22:51:21 +0200
+
+mailscanner (4.39.6-1) unstable; urgency=low
+
+  * New upstream version.
+  * README.exim4: add hint to rotate logfiles on both queues (closes: #295442).
+  * README.exim4: Mention to configure exim4 to use split configuration
+    files (closes: #293892).
+
+ -- Matthias Klose <doko@debian.org>  Fri,  4 Mar 2005 21:59:33 +0100
+
+mailscanner (4.38.10-1) unstable; urgency=medium
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Sat,  5 Feb 2005 12:22:09 +0100
+
+mailscanner (4.38.9-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 30 Jan 2005 02:44:47 +0100
+
+mailscanner (4.37.7-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Sun,  2 Jan 2005 01:09:43 +0100
+
+mailscanner (4.37.6-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 31 Dec 2004 19:37:48 +0100
+
+mailscanner (4.36.4-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Thu,  2 Dec 2004 07:07:12 +0100
+
+mailscanner (4.36.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 19 Nov 2004 23:50:10 +0100
+
+mailscanner (4.35.11-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Thu,  4 Nov 2004 22:49:48 +0100
+
+mailscanner (4.35.9-1) unstable; urgency=medium
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Wed,  3 Nov 2004 00:24:15 +0100
+
+mailscanner (4.35.3-1) unstable; urgency=low
+
+  * New upstream version.
+    - Works again with spamassassin (closes: #276199).
+
+ -- Matthias Klose <doko@debian.org>  Tue, 12 Oct 2004 20:31:43 +0200
+
+mailscanner (4.34.8-2) unstable; urgency=medium
+
+  * Add Spamassassin 3 compatibility fix.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 10 Oct 2004 12:24:48 +0200
+
+mailscanner (4.34.8-1) unstable; urgency=high
+
+  * New stable upstream version.
+  * Add dutch debconf translations (closes: #274904).
+
+ -- Matthias Klose <doko@debian.org>  Wed,  6 Oct 2004 08:06:13 +0200
+
+mailscanner (4.34.4-1) unstable; urgency=medium
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 26 Sep 2004 10:40:39 +0200
+
+mailscanner (4.33.3-2) unstable; urgency=high
+
+  * Install mcp.spam.assassin.prefs.conf config file.
+  * Don't do any I/O redirection for the ucf calles in the postinst.
+    Should fix the hangs on installs/upgrades. Closes: #265950, #270365.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 10 Sep 2004 18:56:38 +0200
+
+mailscanner (4.33.3-1) unstable; urgency=high
+
+  * New upstream version.
+  * In the preinst, fix ownership of /var/lib/Mailscanner to the same
+    ownership that /var/spool/MailScanner has.
+  * More changes to the ownership tests suggested by Matt Swift.
+  * Don't fail on upgrades for installations with already moved custom files
+    from /usr/share/MailScanner to /etc/MailScanner (closes: #269050).
+
+ -- Matthias Klose <doko@debian.org>  Thu,  2 Sep 2004 01:18:06 +0200
+
+mailscanner (4.32.5-4) unstable; urgency=high
+
+  * Install /etc/MailScanner/CustomConfig.pm on fresh installs (Julien Blache).
+    Closes: #267794.
+  * init.d: Another attempt to fix the ownership test.
+    Closes: #257304, #263810, #267177.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 24 Aug 2004 22:52:24 +0200
+
+mailscanner (4.32.5-3) unstable; urgency=high
+
+  * Depend on ucf (>= 1.08), but I doubt it will help. The cleanest solution
+    would be to get rid off this buggy dependency.
+  * Fix preinst for new installations, patch by Julien Blache.
+    Closes: #265282, #265962, #266303, #266599.
+  * Add German translation of the debconf templates (closes: #266928).
+
+ -- Matthias Klose <doko@debian.org>  Fri, 20 Aug 2004 02:36:59 +0200
+
+mailscanner (4.32.5-2) unstable; urgency=high
+
+  * Send another line to syslog when update_virus_scanners has finished.
+  * Fix owner/group of /var/lib/MailScanner (closes: #264676).
+
+ -- Matthias Klose <doko@debian.org>  Wed, 11 Aug 2004 07:01:59 +0200
+
+mailscanner (4.32.5-1) unstable; urgency=medium
+
+  * New upstream version (closes: #262079).
+  * init.d: only check owner and group of directories, if configuration
+    options are set in the config file (closes: #260235, #263810).
+  * Add dependency on coreutils | stat (closes: #262074, #259596).
+  * Fix locations of autoupdate scripts in update_virus_scanners.
+    Closes: #256430.
+  * Avoid hang in postinst (closes: #255897).
+
+ -- Matthias Klose <doko@debian.org>  Fri,  6 Aug 2004 20:50:32 +0200
+
+mailscanner (4.31.6-1) unstable; urgency=low
+
+  * New upstream version.
+  * update_virus_scanners: Fix location of wrapper scripts (closes: #256430).
+  * Add sanity check for ownership of some directories, which need to be
+    changed on installation.
+  * Source . /usr/share/debconf/confmodule in postinst. Supposed to fix
+    the config file handling and upgrade process (closes: #238173, #242280).
+
+ -- Matthias Klose <doko@debian.org>  Sun, 27 Jun 2004 14:00:33 +0200
+
+mailscanner (4.30.3-2) unstable; urgency=low
+
+  * Fix paths in ConfigDefs.pl (closes: #247632).
+  * Suggest libnet-ldap-perl (closes: #247633).
+  * Use ctime instead of atime in daily cron script (closes: #247699).
+
+ -- Matthias Klose <doko@debian.org>  Thu,  6 May 2004 07:13:51 +0200
+
+mailscanner (4.30.3-1) unstable; urgency=low
+
+  * New upstream version.
+  * Remove garbage in MailScanner.conf(5). Closes: #246127.
+  * Tighten dependency on ucf. With recent ucf versions, the broken
+    conffile handling could not be reproduced. Closes: #238173.
+
+ -- Matthias Klose <doko@debian.org>  Sat,  1 May 2004 16:11:02 +0200
+
+mailscanner (4.29.7-2) unstable; urgency=low
+
+  * Fix logcheck regexps (closes: #244343).
+  * Fix encoding of japanese po-debconf template translation (closes: #243276).
+  * Add french po-debconf template translation (closes: #242226).
+  * Fix location of CustomFunction files (closes: #244231).
+  * Fix f-prot autoupdater script (closes: #244282).
+  * Default "Quarantine Whole Messages as Queue Files" to yes (closes: #234721).
+  * Reflect changed spam header names in spam.assassin.prefs.conf, add a
+    note to README.Debian (closes: #212395).
+  * Fix mailscanner v3 upgrade logic (closes: #220369).
+
+ -- Matthias Klose <doko@debian.org>  Mon, 19 Apr 2004 07:14:06 +0200
+
+mailscanner (4.29.7-1) unstable; urgency=low
+
+  * New upstream version.
+  * Add japanese po-debconf template translation (closes: #239219).
+  * Fix Autoupdate script (closes: #241345).
+  * Add a note to README.Debian how to periodically retrieve updated
+    virus definitions (closes: #241346).
+  * Make CustomConfig.pm a conffile (closes: #237224).
+
+ -- Matthias Klose <doko@debian.org>  Sun,  4 Apr 2004 16:43:52 +0200
+
+mailscanner (4.28.6-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 12 Mar 2004 20:40:12 +0100
+
+mailscanner (4.28.5.2-2) unstable; urgency=low
+
+  * Add dependencies on libcompress-zlib-perl and libarchive-zip-perl.
+
+ -- Matthias Klose <doko@debian.org>  Fri,  5 Mar 2004 23:58:51 +0100
+
+mailscanner (4.28.5.2-1) unstable; urgency=low
+
+  * New upstream version (closes: #236004).
+
+ -- Matthias Klose <doko@debian.org>  Fri,  5 Mar 2004 23:20:12 +0100
+
+mailscanner (4.27.7-1) unstable; urgency=medium
+
+  * New upstream version.
+    - Fixes bug letting some attachements go through unscanned
+      Closes: #236139.
+  * Add logcheck files (closes: #235767).
+  * Switch to gettext-based debconf templates (closes: #234610).
+
+ -- Matthias Klose <doko@debian.org>  Fri,  5 Mar 2004 07:43:17 +0100
+
+mailscanner (4.26.7-3) unstable; urgency=low
+
+  * README.exim4: Add note to change the owner/group on /var/lib/MailScanner.
+    Closes: #232048.
+  * Fix locations for packaged clamav scanner (closes: #234115).
+  * Set 'Notify Senders' to no in the default configuration (closes: #232350).
+  * Clarify the upgrade question (closes: #232385).
+  * Add dependency on libconvert-tnef-perl.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 22 Feb 2004 14:56:09 +0100
+
+mailscanner (4.26.7-2) unstable; urgency=medium
+
+  * Handle localized report files using ucf (closes: #230692).
+
+ -- Matthias Klose <doko@debian.org>  Mon,  2 Feb 2004 14:49:58 +0100
+
+mailscanner (4.26.7-1) unstable; urgency=low
+
+  * New upstream version.
+  * Add dependency on libhtml-parser-perl (closes: #230274).
+  * Fix copy&paste error in README.exim4 (closes: #230320).
+
+ -- Matthias Klose <doko@debian.org>  Sun,  1 Feb 2004 09:53:10 +0100
+
+mailscanner (4.25.14-3) unstable; urgency=low
+
+  * Follow the change of the Debian-exim user. Conflict with earlier
+    versions of the exim4-base package.
+  * Erase input spool per-message log files when using exim (closes: #227004).
+  * Update spanish messages (closes: #225825).
+  * Update MTA dependencies (closes: #228595).
+
+ -- Matthias Klose <doko@debian.org>  Fri, 16 Jan 2004 15:02:59 +0100
+
+mailscanner (4.25.14-2) unstable; urgency=low
+
+  * Install update_virus_scanners in /usr/sbin.
+  * Adjust locations in f-prot and clamav auto updaters.
+
+ -- Matthias Klose <doko@debian.org>  Sun,  7 Dec 2003 15:52:43 +0100
+
+mailscanner (4.25.14-1) unstable; urgency=low
+
+  * New upstream version.
+  * Add dependency on libnet-cidr-perl.
+  * Install upgrade_MailScanner_conf in /usr/sbin (closes: #217464).
+  * Rewrote README.exim4, add config snippet for exim4.
+  * Move example config files to /usr/share/doc/mailscanner/examples.
+  * Honor run_nice in /etc/cron.d/mailscanner (closes: #221671).
+
+ -- Matthias Klose <doko@debian.org>  Fri,  5 Dec 2003 23:33:13 +0100
+
+mailscanner (4.24.5-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Matthias Klose <doko@debian.org>  Wed,  8 Oct 2003 08:34:21 +0200
+
+mailscanner (4.23.11-3) unstable; urgency=high
+
+  * Fixed problem with cron cleanup script (closes: #212763)
+  * Allow mailscanner to be run with a lower priority
+
+ -- Brian White <bcwhite@pobox.com>  Thu, 25 Sep 2003 22:27:06 -0400
+
+mailscanner (4.23.11-2) unstable; urgency=medium
+
+  * Fixed install bug (closes: #209154)
+  * Believed to be fixed upstream (closes: #193424, #154160, #156553,
+    #157851, #175196, #197291, #144522)
+  * Believed to be fixed upstream (closes: #173462, #165673)
+  * Installation scripts have been fixed (closes: #161537)
+  * Installation/maintenence is more automatic (closes: #148031, #173814)
+  * Auto-notify sender shouldn't be used (closes: #176676)
+  * Switched to standard "check_mailscanner" wrapper program
+
+ -- Brian White <bcwhite@pobox.com>  Thu, 21 Aug 2003 16:54:13 -0400
+
+mailscanner (4.23.11-1) unstable; urgency=medium
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Sat,  6 Sep 2003 11:27:09 +0200
+
+mailscanner (4.23.10-1) unstable; urgency=low
+
+  * New upstream version.
+  * Fix paths in virus.scanners.conf (closes: #207228, #207371).
+  * Make cron.daily script more quiet (closes: #206940, #207604).
+
+ -- Matthias Klose <doko@debian.org>  Sun, 31 Aug 2003 12:34:49 +0200
+
+mailscanner (4.22.5-3) unstable; urgency=medium
+
+  * Fixed accidental removal of quarantine directory
+
+ -- Brian White <bcwhite@pobox.com>  Thu, 21 Aug 2003 16:54:13 -0400
+
+mailscanner (4.22.5-2) unstable; urgency=medium
+
+  * Fixed default "Run As" lines to be "mail" (for exim)
+  * Set "Max Children" to "1" (reduce unnecessary system load)
+  * Fixed location of pid file (/var/run/MailScanner)
+  * Fixed start/stop/restart problems in init.d script
+  * Added cron.daily script to clean up quarantine area
+  * Postinst moves state files from old directories to new
+
+ -- Brian White <bcwhite@pobox.com>  Thu, 21 Aug 2003 15:51:59 -0400
+
+mailscanner (4.22.5-1) unstable; urgency=low
+
+  * v3 to v4 update. Please update your bug reports, if they are not
+    marked as fixed in the release!
+  * New upstream version (closes: #180185, #185694).
+    - f-prot format update (closes: #187653, #187763, #190282).
+    - rfc822-compliant capitalization in headers (closes: #165673).
+    - blocks .exe and .com by default (closes: #177028).
+  * Update README.exim (closes: #194179).
+  * Match f-prot locations with f-prot-installer package (closes: #185068).
+  * Do not fail on upgrade, if mailscanner is not running (closes: #193423).
+  * No automatic update yet.
+
+ -- Matthias Klose <doko@debian.org>  Sat,  5 Jul 2003 13:15:55 +0200
+
+mailscanner (3.27.1-1) unstable; urgency=low
+
+  * New upstream version.
+  * Install clamavwrapper as script (closes: #174731).
+  * README.Debian: Added note about minimum code status.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 21 Jan 2003 20:57:23 +0100
+
+mailscanner (3.26.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Sun,  3 Nov 2002 17:18:49 +0100
+
+mailscanner (3.24.1-2) unstable; urgency=low
+
+  * Install f-prot autoupdate script (closes: #165653).
+  * /etc/mailscanner/f-protwrapper: Fix library dir (closes: #165656).
+
+ -- Matthias Klose <doko@debian.org>  Mon, 21 Oct 2002 21:10:44 +0200
+
+mailscanner (3.24.1-1) unstable; urgency=low
+
+  * New upstream version.
+  * Run check_mailscanner via cron only, when mailscanner is configured.
+    Closes: #164051.
+  * Add clamav support (closes: #147887).
+
+ -- Matthias Klose <doko@debian.org>  Sat, 19 Oct 2002 11:27:11 +0200
+
+mailscanner (3.23.4-2) unstable; urgency=low
+
+  * Correct modules directory.
+
+ -- Matthias Klose <doko@debian.org>  Thu,  3 Oct 2002 23:17:09 +0200
+
+mailscanner (3.23.4-1) unstable; urgency=medium
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Tue,  1 Oct 2002 21:49:05 +0200
+
+mailscanner (3.23.2-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 24 Sep 2002 22:02:41 +0200
+
+mailscanner (3.23.1-1) unstable; urgency=medium
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 24 Sep 2002 18:40:52 +0200
+
+mailscanner (3.22.13-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Thu, 12 Sep 2002 00:46:19 +0200
+
+mailscanner (3.22.12-2) unstable; urgency=high
+
+  * Fix the gid switching when using exim as MTA.
+
+ -- Matthias Klose <doko@debian.org>  Fri,  6 Sep 2002 21:07:12 +0200
+
+mailscanner (3.22.12-1) unstable; urgency=low
+
+  * New upstream version.
+  * Add df2mbox script.
+  * Added README.sendmail from report #154160.
+  * Change tnef dependency to recommendation (closes: #154781).
+
+ -- Matthias Klose <doko@debian.org>  Fri, 23 Aug 2002 14:40:30 +0200
+
+mailscanner (3.21.1-3) unstable; urgency=low
+
+  * Correct default config files (closes: #152481).
+  * Add hint to exim_tidydb in sample cron script for exim (closes: 142686).
+  * Add some sendmail docs to README.Debian from report #148031.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 14 Jul 2002 23:37:32 +0200
+
+mailscanner (3.21.1-2) unstable; urgency=low
+
+  * Apply Debian patches from 3.14.1-2.
+
+ -- Matthias Klose <doko@debian.org>  Fri,  5 Jul 2002 09:54:15 +0200
+
+mailscanner (3.21.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Fri,  5 Jul 2002 00:24:23 +0200
+
+mailscanner (3.14.1-2) unstable; urgency=low
+
+  * Include empty /var/lock/subsys in package (closes: #146987).
+
+ -- Matthias Klose <doko@debian.org>  Wed, 15 May 2002 19:20:37 +0200
+
+mailscanner (3.14.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 14 May 2002 16:57:52 +0200
+
+mailscanner (3.13.2-3) unstable; urgency=high
+
+  * Initialize spamassassin after switchting user to mail (patch from
+    Nick Philipps). Closes: #144736.
+
+ -- Matthias Klose <doko@debian.org>  Tue,  7 May 2002 03:15:33 +0200
+
+mailscanner (3.13.2-2) unstable; urgency=high
+
+  * Let mailscanner properly restart if it had stopped while processing
+    a message (closes: #141331).
+
+ -- Matthias Klose <doko@debian.org>  Tue,  9 Apr 2002 23:52:58 +0200
+
+mailscanner (3.13.2-1) unstable; urgency=high
+
+  * New upstream version (fixing bug where carriage return characters embedded
+    in subject lines could stop MailScanner being able to extract files from
+    the message).
+  * Fix bug in check_mailscanner script causing multiple instances of
+    mailscanner beeing started (closes: #138903).
+  * Add scripts and docs for running with exim from inetd (Giacomo Mulas).
+
+ -- Matthias Klose <doko@debian.org>  Sun, 31 Mar 2002 08:19:21 +0200
+
+mailscanner (3.12.5-2) unstable; urgency=low
+
+  * /etc/mailscanner/mailscanner.conf: Wrapper files are in
+    /etc/mailscanner/wrapper.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 17 Mar 2002 17:24:07 +0100
+
+mailscanner (3.12.5-1) unstable; urgency=low
+
+  * New upstream version
+  * Correcting configuration notes for exim (closes: #138735).
+
+ -- Matthias Klose <doko@debian.org>  Sun, 17 Mar 2002 13:47:21 +0100
+
+mailscanner (3.12.4-1) unstable; urgency=high
+
+  * New upstream version. Fixes an off by one error resulting in spool
+    format errors when configured for exim.
+  * Add dependency on exim-tls (closes: #134781).
+  * Add dependency on libmail-audit-perl.
+  * Correct message in init script (closes: #136124).
+  * Don't overwrite /etc/default/mailscanner on upgrade.
+  * Move the wrapper scripts to /etc/mailscanner/wrapper and make
+    them config files.
+  * Move the autoupdate scripts to /etc/mailscanner/autoupdate and make
+    them config files.
+
+ -- Matthias Klose <doko@debian.org>  Wed,  6 Mar 2002 00:12:34 +0100
+
+mailscanner (3.11.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 16 Feb 2002 10:02:17 +0100
+
+mailscanner (3.10.4-1) unstable; urgency=low
+
+  * New upstream version. Upload to unstable (closes: #128646).
+
+ -- Matthias Klose <doko@debian.org>  Tue, 12 Feb 2002 22:55:40 +0100
+
+mailscanner (3.04.1-2) unstable; urgency=low
+
+  * Fixes to init.d script.
+
+ -- Matthias Klose <doko@debian.org>  Fri,  8 Feb 2002 20:19:12 +0100
+
+mailscanner (3.04.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Mon, 28 Jan 2002 21:45:23 +0100
+
+mailscanner (3.03.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 20 Jan 2002 15:07:03 +0100
+
+mailscanner (3.02.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Thu, 10 Jan 2002 21:03:40 +0100
+
+mailscanner (3.01.2-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Matthias Klose <doko@debian.org>  Fri,  4 Jan 2002 20:05:18 +0100
--- mailscanner-4.74.16.orig/debian/README.Debian
+++ mailscanner-4.74.16/debian/README.Debian
@@ -0,0 +1,55 @@
+mailscanner-4.x for Debian
+--------------------------
+
+To actually get MailScanner working you have to modify your MTA's
+configuration. Look for a README.mymta file for an example
+installation guide for your MTA. If there is none, you have todo some
+research on the net or http://mailscanner.info.
+
+New/updated installation guides are welcome! Just open a bugreport.
+
+- Debian's MailScanner uses /etc/MailScanner/spam.assassin.prefs.conf
+  for spamassassin not /etc/spamassassin/mailscanner.cf.
+
+- Configuring Spam Headers.
+  When setting %org-name% in /etc/MailScanner/MailScanner.conf, you have
+  to make this change in /etc/MailScanner/spam.assassin.prefs.conf as well.
+
+- On a high-load mail-system set run_nice in /etc/default/mailscanner to 0.
+	Also increase the "Max Children" in /etc/MailScanner.conf to
+	something appropriate.
+
+- Install a virus-scanner if you expect MailScanner to filter virus-mails!
+
+- MailScanner uses spamassassins perl module internally. So there is no
+  way to use spamd with MailScanner.
+
+- Using razor < 2.75 with MailScanner can cause problems because razor
+	places its logfile into the queue directory see #305239, #295727
+
+Updating Virus definitions
+--------------------------
+
+/usr/sbin/update_virus_scanners is a script to retrieve updates for
+virus definitions. You can/should it install into /etc/cron.{daily,weekly}
+if you want to periodically retrieve the updates.
+
+Updating phishing safe site definitions
+--------------------------
+
+/usr/sbin/update_phishing_sites is a script to retrieve updates for
+the phishing safe site definitions (etc/phishing.safe.sites.conf). You
+can/should it install into /etc/cron.{daily,weekly} if you want to
+periodically retrieve the updates.
+
+exim configuration
+------------------
+
+see README.exim
+
+Sample configuration files can be found at /usr/share/doc/mailscanner/exim.
+
+sendmail configuration
+----------------------
+
+see README.sendmail
--- mailscanner-4.74.16.orig/debian/init.d
+++ mailscanner-4.74.16/debian/init.d
@@ -0,0 +1,195 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          MailScanner daemon
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:     $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Controls mailscanner instances
+# Description:       MailScanner is a queue-based spam/virus filter
+### END INIT INFO
+
+# Author: Simon Walter <simon.walter@hp-factory.de>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/usr/sbin:/usr/bin:/bin:/sbin
+DESC="mail spam/virus scanner"
+NAME=MailScanner
+PNAME=mailscanner
+DAEMON=/usr/sbin/$NAME
+STARTAS=MailScanner
+SCRIPTNAME=/etc/init.d/$PNAME
+CONFFILE=/etc/MailScanner/MailScanner.conf
+
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+run_mailscanner=0
+run_nice=0
+stopped_lockfile=/var/lock/subsys/MailScanner.off
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$PNAME ] && . /etc/default/$PNAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+# Don't start if MailScanner is not configured
+if [ $run_mailscanner = 0 ]; then
+    if [ -z "$satisfy_nitpicking_on_removal" ]; then
+	cat <<-EOF
+
+	Please edit the file /etc/MailScanner/MailScanner.conf according to
+	your needs.  Then configure sendmail or exim for use with mailscanner.
+
+	After you are done you will have to edit /etc/default/mailscanner as
+	well. There you will have to set the variable run_mailscanner to 1,
+	and then type "/etc/init.d/mailscanner start" to start the mailscanner
+	daemon.
+
+	EOF
+    fi
+    exit 0
+fi
+
+# sanity check for permissions
+fail()
+{
+    echo >&2 "$0: $1"
+    exit 1
+}
+
+check_dir()
+{
+    if [ ! -d $1 ]; then
+	mkdir -p "$1" || \
+	    fail "directory $1: does not exist and cannot be created"
+    fi
+    actual="$(stat -c %U $1)"
+    if [ "$actual" != "$2" ]; then
+	chown -R "$2" "$1" || \
+	    fail "directory $1: wrong owner (expected $2 but is $actual)"
+    fi
+    actual="$(stat -c %G $1)"
+    if [ "$actual" != "$3" ]; then
+	chgrp -R "$3" "$1" || \
+	    fail "directory $1: wrong group (expected $3 but is $actual)"
+    fi
+}
+
+user=$(echo $(awk -F= '/^Run As User/ {print $2; exit}' $CONFFILE))
+group=$(echo $(awk -F= '/^Run As Group/ {print $2; exit}' $CONFFILE))
+
+check_dir /var/spool/MailScanner       ${user:-mail} ${group:-mail}
+check_dir /var/lib/MailScanner         ${user:-mail} ${group:-mail}
+check_dir /var/run/MailScanner         ${user:-mail} ${group:-mail}
+check_dir /var/lock/subsys/MailScanner ${user:-mail} ${group:-mail}
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --startas $STARTAS --name $NAME --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --nicelevel $run_nice --exec $DAEMON --name $NAME -- $DAEMON_ARGS \
+		|| return 2
+
+  # Set lockfile to inform cronjobs about the running daemon
+	RETVAL="$?"
+	if [ $RETVAL -eq 0 ]; then
+	    touch /var/lock/subsys/mailscanner
+	    rm -f $stopped_lockfile
+	fi
+
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/10/TERM/20 --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+
+  # Remove lockfile for cronjobs
+	if [ $RETVAL -eq 0 ]; then
+	    rm -f /var/lock/subsys/mailscanner
+	    touch $stopped_lockfile
+	fi
+
+	return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+	start-stop-daemon --stop --signal 1 --quiet --name $NAME
+	return 0
+}
+
+case "$1" in
+  start)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  stop)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  reload|force-reload)
+	
+	log_daemon_msg "Reloading $DESC" "$NAME"
+	do_reload
+	log_end_msg $?
+	;;
+  restart)
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+	#echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:
--- mailscanner-4.74.16.orig/debian/rules
+++ mailscanner-4.74.16/debian/rules
@@ -0,0 +1,149 @@
+#!/usr/bin/make -f
+#
+# MailScanners debian/rules file
+#
+# created by Matthias Klose <doko@debian.org>
+# modified by Simon Walter <simon.walter@hp-factory.de>
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+p = mailscanner
+d = debian/$(p)
+
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
+include /usr/share/dpatch/dpatch.make
+
+build: build-stamp
+
+build-stamp: patch
+	dh_testdir
+
+	make -C debian/man
+
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+
+	rm -rf bin/tnef*
+	rm -rf ../$(shell basename $(CURDIR)).orig/bin/tnef*
+	-find . ../$(shell basename $(CURDIR)).orig -name '.#*' | xargs rm -f
+	-find . ../$(shell basename $(CURDIR)).orig -type d -empty| xargs rm -rf
+
+	make -C debian/man clean
+
+	dh_clean debian/ucffiles debian/postinst.ucf debian/postrm.ucf
+# unnessasary see #467411
+#	debconf-updatepo
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	: # tmp directories
+	mkdir -p debian/tmp/
+	mkdir -p debian/tmp/man/
+
+	pod2man --section=8 bin/upgrade_MailScanner_conf --center=MailScanner \
+		> debian/tmp/man/upgrade_MailScanner_conf.8
+
+	: # cleanup
+	-find $(d) -name '*[Ss]olaris' | xargs rm -f
+	-find $(d) -name CVS | xargs rm -rf
+	-find ../ -name svn-commit.tmp | xargs rm -rf
+
+	: # fix virus.scanners.conf
+	sed -e 's,/opt/MailScanner/lib/,/etc/MailScanner/wrapper/,g' etc/virus.scanners.conf > debian/tmp/virus.scanners.conf
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installcron
+	dh_installdebconf
+	dh_installdocs
+	dh_installexamples
+	dh_installinit
+	dh_installlogcheck
+	dh_installman
+	dh_install -X.old
+	dh_compress
+	dh_fixperms
+
+	: # fix permissions
+	-find $(d)/usr/share/MailScanner/reports -type f | xargs chmod -f a-x
+	-find $(d)/usr/share/doc/mailscanner/examples -type f | xargs chmod -f a-x
+	chmod a-x $(d)/usr/share/MailScanner/MailScanner/ConfigDefs.pl
+	chmod a-x $(d)/usr/share/MailScanner/MailScanner/*.pm
+	chmod a-x $(d)/usr/share/MailScanner/MailScanner.pm
+	chmod a-x $(d)/etc/MailScanner/CustomConfig.pm
+	chmod a-x $(d)/etc/MailScanner/*.conf*
+	chmod a-x $(d)/etc/MailScanner/rules/*
+
+	: # #464317 install links after fixing permission to avoid "chmod: cannot operate on dangling symlink"
+	dh_link
+
+	: # custom premissions
+	chown -f -R mail:mail $(d)/var/lib/MailScanner
+	chown -f -R mail:mail $(d)/var/spool/MailScanner
+	chown -f -R mail:mail $(d)/var/run/MailScanner
+	chown -f -R mail:mail $(d)/var/lock/subsys/MailScanner
+	chmod -f 750 $(d)/var/lib/MailScanner
+	chmod -f -R 750 $(d)/var/spool/MailScanner
+
+	: # helper scripts have to be executable
+	chmod -f 755 $(d)/etc/MailScanner/autoupdate/*
+	chmod -f 755 $(d)/etc/MailScanner/wrapper/*
+
+	: # lintian overrides
+	install -m 755 -d $(d)/usr/share/lintian/overrides
+	install -m 644 debian/mailscanner.lintian.overrides $(d)/usr/share/lintian/overrides/mailscanner
+
+	: # report files handled by ucf
+	find $(d)/usr/share/MailScanner/reports -type f \
+	  | sed 's,$(d)/usr/share/,/etc/,' > debian/ucffiles
+
+	dh_installdeb
+	( \
+	  echo 'if [ "$$1" = purge ] && [ -x /usr/bin/ucf ] ; then'; \
+	  echo "    (echo Removing report files ... may take some time < /dev/tty >/dev/tty)"; \
+	  for f in `cat debian/ucffiles`; do \
+	    echo "    ucf --purge --debconf-ok $$f"; \
+	  done; \
+	  echo 'fi'; \
+	) > debian/postrm.ucf
+
+	( \
+	  echo 'if [ "$$1" = "configure" ]; then'; \
+	  for dir in $$(for f in $$(cat debian/ucffiles); do dirname "$$f" ; done | sort | uniq); do \
+	    echo "    mkdir -p $$dir"; \
+	  done; \
+	  echo "    (echo Checking/installing report files ... < /dev/tty >/dev/tty)"; \
+	  for f in `cat debian/ucffiles`; do \
+	    f2=`echo $$f | sed s,/etc/MailScanner,/usr/share/MailScanner,`; \
+	    echo "    ucf --debconf-ok $$f2 $$f"; \
+	  done; \
+	  echo 'fi'; \
+	) > debian/postinst.ucf
+
+	perl -pi -e '/#UCF#/ and do { open F, "debian/postinst.ucf"; local $$/ ; $$_ = <F> };' $(d)/DEBIAN/postinst
+	perl -pi -e '/#UCF#/ and do { open F, "debian/postrm.ucf"; local $$/ ; $$_ = <F> };' $(d)/DEBIAN/postrm
+
+#	dh_perl
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do by default.
+
+binary: binary-indep binary-arch
+
+.PHONY: build clean binary-indep binary-arch binary install patch unpatch
--- mailscanner-4.74.16.orig/debian/postrm
+++ mailscanner-4.74.16/debian/postrm
@@ -0,0 +1,43 @@
+#! /bin/sh -e
+# postrm script for mailscanner
+#
+# see: dh_installdeb(1)
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see /usr/share/doc/packaging-manual/
+
+#UCF#
+
+case "$1" in
+    purge)
+				rm -f /etc/default/mailscanner
+				rm -f /etc/init.d/mailscanner
+				rm -rf /etc/mailscanner /etc/MailScanner
+				rm -f /var/lib/MailScanner/bayes_*
+				rmdir /var/lib/MailScanner 2>/dev/null || true
+# bugfix for #454381
+				rm -f /etc/cron.d/mailscanner
+	;;
+
+    remove|upgrade|faild-upgrade|abort-*|disappear)
+				:
+	;;
+
+    *)
+	echo "postrm called with unknown argument \`$1'" >&2
+	exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
--- mailscanner-4.74.16.orig/debian/mailscanner.manpages
+++ mailscanner-4.74.16/debian/mailscanner.manpages
@@ -0,0 +1,7 @@
+debian/man/build/man/man8/MailScanner.8
+debian/man/build/man/man8/update_virus_scanners.8
+debian/man/build/man/man8/update_phishing_sites.8
+debian/man/build/man/man8/mailscanner_create_locks.8
+debian/man/build/man/man8/df2mbox.8
+debian/man/build/man/man8/d2mbox.8
+debian/tmp/man/upgrade_MailScanner_conf.8
--- mailscanner-4.74.16.orig/debian/compat
+++ mailscanner-4.74.16/debian/compat
@@ -0,0 +1 @@
+5
--- mailscanner-4.74.16.orig/debian/mailscanner.logcheck.ignore.workstation
+++ mailscanner-4.74.16/debian/mailscanner.logcheck.ignore.workstation
@@ -0,0 +1,23 @@
+MailScanner\[[0-9]+\]: /var/spool/MailScanner/incoming/[0-9]+/[^ ]+  Infection: [^ ]+
+MailScanner\[[0-9]+\]: Batch completed at [0-9]+ bytes per second \([0-9]+ / [0-9]+\)
+MailScanner\[[0-9]+\]: Creating hardcoded struct_flock subroutine for linux \(Linux-type\)
+MailScanner\[[0-9]+\]: Disinfection completed at [0-9]+ bytes per second
+MailScanner\[[0-9]+\]: Infected message [^ ]+ came from [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
+MailScanner\[[0-9]+\]: MCP Checks completed at [0-9]+ bytes per second
+MailScanner\[[0-9]+\]: MailScanner E-Mail Virus Scanner version [^ ]+ starting...
+MailScanner\[[0-9]+\]: MailScanner child dying of old age
+MailScanner\[[0-9]+\]: New Batch: Scanning [0-9]+ messages, [0-9]+ bytes
+MailScanner\[[0-9]+\]: Requeue: [[:alnum:].]+ to [[:alnum:].]+
+MailScanner\[[0-9]+\]: Silent: Delivered [0-9]+ messages containing silent viruses
+MailScanner\[[0-9]+\]: Spam Checks completed at [0-9]+ bytes per second
+MailScanner\[[0-9]+\]: Spam Checks: Found [0-9]+ spam messages
+MailScanner\[[0-9]+\]: Uninfected: Delivered [0-9]+ messages
+MailScanner\[[0-9]+\]: Using locktype = posix
+MailScanner\[[0-9]+\]: Virus Processing completed at [0-9]+ bytes per second
+MailScanner\[[0-9]+\]: Virus Scanning completed at [0-9]+ bytes per second
+MailScanner\[[0-9]+\]: Virus Scanning: F-Prot found [0-9]+ infections
+MailScanner\[[0-9]+\]: Virus Scanning: F-Prot found virus [^ ]+
+MailScanner\[[0-9]+\]: Virus Scanning: Found [0-9]+ viruses
+MailScanner\[[0-9]+\]: Virus and Content Scanning: Starting
+[^ ]+: MailScanner setting GID to [a-zA-Z0-9_-]+ \([0-9]+\)
+[^ ]+: MailScanner setting UID to [a-zA-Z0-9_-]+ \([0-9]+\)
--- mailscanner-4.74.16.orig/debian/mailscanner.cron.hourly
+++ mailscanner-4.74.16/debian/mailscanner.cron.hourly
@@ -0,0 +1,21 @@
+#! /bin/sh -e
+#
+# Regular cron jobs for the mailscanner package
+#
+# Calls the init-script to start MailScanner if
+# it wasn't stopped by hand (see $stopped_lockfile)
+
+run_mailscanner=0;
+stopped_lockfile=/var/lock/subsys/MailScanner.off;
+
+if [ -f /etc/default/mailscanner ];
+then
+	. /etc/default/mailscanner;
+fi;
+
+[ $run_mailscanner = 0 ] && exit 0;
+[ -f $lockfile ] && exit 0;
+
+invoke-rc.d mailscanner start >/dev/null 2>&1;
+
+exit 0;
--- mailscanner-4.74.16.orig/debian/mailscanner.default
+++ mailscanner-4.74.16/debian/mailscanner.default
@@ -0,0 +1,24 @@
+#
+# This sets how many days files will remain in the "quarantine" area before
+# being automatically removed.
+#
+q_days=7
+
+#
+# This sets how much the priority of the mailscanner daemon should be
+# reduced by (i.e. "nice -X").  Since it is a batch oriented task,
+# there it can easily give up some CPU cycles to more interactive
+# tasks. On a system with the main-task to scan mails set this to 0.
+#
+run_nice=2
+
+#
+# Uncomment this line once MailScanner has been fully configured.
+#
+#run_mailscanner=1
+
+#
+# Lockfile to inform scripts if MailScanner was stopped by hand
+# and should not be started automaticly
+#
+stopped_lockfile=/var/lock/subsys/MailScanner.off
--- mailscanner-4.74.16.orig/debian/README.sendmail.2
+++ mailscanner-4.74.16/debian/README.sendmail.2
@@ -0,0 +1,60 @@
+From: Jim Barber <jim.barber@ddihealth.com>
+Subject: MailScanner, Sendmail, and Queue aging in Debian
+
+To integrate MailScanner with Sendmail do the following steps.
+Note that there are some optional steps for if you want to support Debian's queue aging.
+
+1. Edit the /etc/mail/sendmail.mc file and add the following entries just before the MAILER_DEFINITIONS entry:
+
+	QUEUE_GROUP(`mqueue', `Path=/var/spool/mqueue/incoming, Runners=0')dnl
+	QUEUE_GROUP(`main', `Path=/var/spool/mqueue, Flags=f')dnl
+
+   If you want more queue groups, then add them as well.
+   For this example I'll add a queue group that will be checked hourly and used by the queue aging later.
+
+	QUEUE_GROUP(`hourly', `Path=/var/spool/mqueue/hourly, Flags=f, Interval=1h')dnl
+
+2. Edit the /etc/mail/sendmail.conf file:
+
+	DAEMON_PARMS="-OPrivacyOptions=noetrn -ODeliveryMode=queueonly";
+
+   If you want to use the hourly queue defined earlier for queue aging change the AGE_DATA to:
+
+	AGE_DATA="[\
+	['20m', '-s 3600', 'hourly', '/var/spool/mqueue'],\
+	]";
+
+   This will check the queue every 20 minutes and move all messages older than 3600 seconds (1 hour) into the hourly queue.
+
+3. Rebuild the sendmail configuration and explicitly restart it (important!) by running:
+
+	sendmailconfig
+	/etc/init.d/sendmail restart
+
+4. Edit /etc/MailScanner/MailScanner.conf and change at least the following:
+
+	Run As User = root
+	Run As Group = mail
+	Incoming Queue Dir = /var/spool/mqueue/incoming
+	Outgoing Queue Dir = /var/spool/mqueue
+	MTA = sendmail
+	#Sendmail2 = ...
+
+5. Change owner and group of MailScanner's directories.
+
+	chown -R root:mail /var/spool/MailScanner
+	chown -R root:mail /var/lib/MailScanner
+	chown -R root:mail /var/run/MailScanner
+	chown -R root:mail /var/lock/subsys/MailScanner
+
+6. Edit /etc/default/mailscanner and set run_mailscanner=1
+
+7. Run: /etc/init.d/mailscanner start
+
+---------------------------
+
+The queue directories don't need to be created by hand as specified in the old instructions.
+Sendmail will create them and set them to the correct permission upon start (because of the QUEUE_GROUP definitions).
+
+Note that we no longer pass a -OQueueDirectory= parameter in DAEMON_PARMS.
+The "mqueue" queue group handles this properly.
--- mailscanner-4.74.16.orig/debian/mailscanner.cron.daily
+++ mailscanner-4.74.16/debian/mailscanner.cron.daily
@@ -0,0 +1,75 @@
+#! /bin/bash
+#
+# cron script to clean up mailscanner files
+#
+# $Id: local-clock,v 1.5 2002/03/13 02:18:38 bcwhite Exp $
+#
+# Written by Brian White <bcwhite@precidia.com>
+#
+
+# how many days to keep quarantined messages
+q_days=3
+
+# test existens of directories #435998
+if [[ ! -d /var/spool/MailScanner ]]; then
+		exit 0
+fi
+
+# load user-defaults
+if [[ -f /etc/default/mailscanner ]]; then
+    . /etc/default/mailscanner
+fi
+
+# go to mailscanner spool directory
+cd /var/spool/MailScanner
+
+# remove old files and directories
+find quarantine -type f -ctime +$q_days    -exec rm -f {} \; >/dev/null 2>&1
+find quarantine -type d -depth -mindepth 1 -exec rmdir {} \; >/dev/null 2>&1
+
+# exit if exim4 isn't installed #406643
+if [ ! -x /usr/sbin/exim ]; then
+		exit 0
+fi
+
+# bug #401329 on pre 4.55.10-4 installations with exim
+# cron.daily/exim4-base cleans up /var/spool/exim4_incoming
+# so we have to clean up /var/spool/exim
+# on post 4.55.10-4 the following should do nothing
+
+# what cron.daily/exim4-base should do
+SPOOLDIRDEFAULT="/var/spool/exim4"
+# what cron.daily/exim4-base does
+SPOOLDIR="$(/usr/sbin/exim4 -bP spool_directory | sed 's/.*=[[:space:]]\(.*\)/\1/')"
+
+# if exim-base doesn't do what it should
+if [ "$SPOOLDIR" != "$SPOOLDIRDEFAULT" ]; then
+
+		# and there is the default spool directory
+		if [ -d "$SPOOLDIRDEFAULT" ]; then
+
+        # do what exim-base should have done
+        # run tidydb as Debian-exim:Debian-exim.
+				if [ -x /usr/sbin/exim_tidydb ]; then
+						cd $SPOOLDIRDEFAULT/db || exit 1
+						if ! find $SPOOLDIRDEFAULT/db -maxdepth 1 -name '*.lockfile' -or -type f \
+								-printf '%f\0' | \
+								xargs -0r -n 1 \
+								start-stop-daemon --start --exec /usr/sbin/exim_tidydb \
+								--chuid Debian-exim:Debian-exim -- $SPOOLDIRDEFAULT > /dev/null; then
+                # if we reach this, invoking exim_tidydb from start-stop-daemon has
+                # failed, most probably because of libpam-tmpdir being in use
+                # (see #373786 and #376165)
+								find $SPOOLDIRDEFAULT/db -maxdepth 1 -name '*.lockfile' -or -type f \
+										-printf '%f\0' | \
+										su - --shell /bin/bash \
+										--command "xargs -0r -n 1 /usr/sbin/exim_tidydb $SPOOLDIRDEFAULT > /dev/null" \
+										Debian-exim
+						fi
+				fi
+
+		fi
+fi
+
+# exit cleanly
+exit 0
--- mailscanner-4.74.16.orig/debian/mailscanner.dirs
+++ mailscanner-4.74.16/debian/mailscanner.dirs
@@ -0,0 +1,13 @@
+etc/MailScanner/Custom
+etc/MailScanner/CustomFunctions
+etc/MailScanner/rules
+etc/MailScanner/mcp
+var/lock/subsys/MailScanner
+var/run/MailScanner
+var/lib/MailScanner
+var/spool/MailScanner/archive
+var/spool/MailScanner/incoming
+var/spool/MailScanner/quarantine
+usr/share/doc/mailscanner/examples/mcp/
+usr/share/doc/mailscanner/examples/rules/
+usr/share/doc/mailscanner/examples/CustomFunctions/
--- mailscanner-4.74.16.orig/debian/NEWS
+++ mailscanner-4.74.16/debian/NEWS
@@ -0,0 +1,9 @@
+mailscanner (4.55.10-4) unstable; urgency=low
+
+  The method how to install MailScanner with exim has changed which
+  resolves the bug #401329. /etc/cron.daily/mailscanner now cleans up
+  exim4 if /etc/cron.daily/exim4-base doesn't, so the bug is gone even
+  on old installations but you should consider changing your setup to
+  the one descripted in the new README.exim4.
+
+ -- Simon Walter <simon.walter@hp-factory.de>  Mon,  8 Jan 2007 23:59:44 +0100
--- mailscanner-4.74.16.orig/debian/exim/cron.daily.patch
+++ mailscanner-4.74.16/debian/exim/cron.daily.patch
@@ -0,0 +1,43 @@
+--- /etc/cron.daily/exim4-base	2008-09-28 13:17:08.000000000 +0200
++++ /etc/cron.daily/exim4-outgoing	2009-01-20 22:19:28.000000000 +0100
+@@ -24,7 +24,7 @@
+ 
+ [ -f /etc/default/exim4 ] && . /etc/default/exim4
+ 
+-SPOOLDIR="$(exim4 -bP spool_directory | sed 's/.*=[[:space:]]\(.*\)/\1/')"
++SPOOLDIR="$(exim4 -DOUTGOING -bP spool_directory | sed 's/.*=[[:space:]]\(.*\)/\1/')"
+ 
+ # The log processing code used in this cron script is not very
+ # sophisticated. It relies on this cron job being executed earlier than
+@@ -40,8 +40,8 @@
+ 
+ if [ -n "$E4BCD_DAILY_REPORT_TO" ]; then
+   if [ -x "$(command -v eximstats)" ] && [ -x "$(command -v mail)" ]; then
+-    if [ "$(< /var/log/exim4/mainlog grep -v "$E4BCD_MAINLOG_NOISE" | wc -l)" -gt "0" ]; then
+-      < /var/log/exim4/mainlog grep -v "$E4BCD_MAINLOG_NOISE" \
++    if [ "$(< /var/log/exim4_outgoing/mainlog grep -v "$E4BCD_MAINLOG_NOISE" | wc -l)" -gt "0" ]; then
++      < /var/log/exim4_outgoing/mainlog grep -v "$E4BCD_MAINLOG_NOISE" \
+                 | eximstats $E4BCD_DAILY_REPORT_OPTIONS \
+                 | mail $E4BCD_DAILY_REPORT_TO -s"$(hostname --fqdn) Daily e-mail activity report"
+     else
+@@ -64,15 +64,15 @@
+ }
+ 
+ if [ "$E4BCD_WATCH_PANICLOG" != "no" ]; then
+-  if [ -s "/var/log/exim4/paniclog" ]; then
++  if [ -s "/var/log/exim4_outgoing/paniclog" ]; then
+     if [ -x "/usr/local/lib/exim4/nonzero_paniclog_hook" ]; then
+       /usr/local/lib/exim4/nonzero_paniclog_hook
+     fi
+-    if [ -z "$E4BCD_PANICLOG_NOISE" ] || grep -vq "$E4BCD_PANICLOG_NOISE" /var/log/exim4/paniclog; then
+-      log_this "ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken"
+-      if ! printf "Subject: exim paniclog on %s has non-zero size\nTo: root\n\nexim paniclog /var/log/exim4/paniclog on %s has non-zero size, mail system might be broken. The last ${E4BCD_PANICLOG_LINES} lines are quoted below.\n\n%s\n" \
++    if [ -z "$E4BCD_PANICLOG_NOISE" ] || grep -vq "$E4BCD_PANICLOG_NOISE" /var/log/exim4_outgoing/paniclog; then
++      log_this "ALERT: exim paniclog /var/log/exim4_outgoing/paniclog has non-zero size, mail system possibly broken"
++      if ! printf "Subject: exim paniclog on %s has non-zero size\nTo: root\n\nexim paniclog /var/log/exim4_outgoing/paniclog on %s has non-zero size, mail system might be broken. The last ${E4BCD_PANICLOG_LINES} lines are quoted below.\n\n%s\n" \
+       "$(hostname --fqdn)" "$(hostname --fqdn)" \
+-      "$(tail -n "${E4BCD_PANICLOG_LINES}" /var/log/exim4/paniclog)" \
++      "$(tail -n "${E4BCD_PANICLOG_LINES}" /var/log/exim4_outgoing/paniclog)" \
+       | exim4 root; then
+         log_this "PANIC: sending out e-mail warning has failed, exim has non-zero return code"
+       fi
--- mailscanner-4.74.16.orig/debian/exim/logrotate
+++ mailscanner-4.74.16/debian/exim/logrotate
@@ -0,0 +1,19 @@
+/var/log/exim4_outgoing/mainlog /var/log/exim4_outgoing/rejectlog {
+	daily
+	missingok
+	rotate 10
+	compress
+	delaycompress
+	notifempty
+	create 640 Debian-exim adm
+}
+
+/var/log/exim4_outgoing/paniclog {
+	size 10M
+	missingok
+	rotate 10
+	compress
+	delaycompress
+	notifempty
+	create 640 Debian-exim adm
+}
--- mailscanner-4.74.16.orig/debian/exim/01_mailscanner_config
+++ mailscanner-4.74.16/debian/exim/01_mailscanner_config
@@ -0,0 +1,19 @@
+### 01_mailscanner_config
+#################################
+
+
+.ifdef OUTGOING
+
+# outgoing queue where MailScanner places scanned messages for exim to
+# deliver
+	SPOOLDIR = /var/spool/exim4_outgoing
+	log_file_path = /var/log/exim4_outgoing/%slog
+
+.else
+
+# incoming queue where exim places message for MailScanner to scan
+	queue_only = true
+	queue_only_override = false
+	SPOOLDIR = /var/spool/exim4
+
+.endif
--- mailscanner-4.74.16.orig/debian/patches/MailScanner-File::Temp::VERSION-check.dpatch
+++ mailscanner-4.74.16/debian/patches/MailScanner-File::Temp::VERSION-check.dpatch
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## MailScanner-File::Temp::VERSION-check.dpatch by Anthony Fok <foka@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: MailScanner-4.66.5 checks for Perl IO module > 1.23 which does not
+## DP: yet exist in Debian (1.22 as of perl-base 5.8.8-12) on 2008-02-24.
+## DP: IMHO, checking for File::Temp version is more appropriate.
+
+@DPATCH@
+diff -urNad mailscanner-4.66.5~/bin/MailScanner mailscanner-4.66.5/bin/MailScanner
+--- mailscanner-4.66.5~/bin/MailScanner	2008-02-24 05:39:08.000000000 +0800
++++ mailscanner-4.66.5/bin/MailScanner	2008-02-24 04:56:33.000000000 +0800
+@@ -195,8 +195,8 @@
+ my $error = 0;
+ if ($MIME::Tools::VERSION > 5.420) {
+   # They have a new MIME-tools so must have new File::Temp
+-  if ($IO::VERSION<1.23) {
+-    print STDERR "\n\n**** ERROR: You must upgrade your perl IO module to at least\n**** ERROR: version 1.2301 or MailScanner will not work!\n\n";
++  if ($File::Temp::VERSION<0.17) {
++    print STDERR "\n\n**** ERROR: You must upgrade your perl File::Temp module to at least\n**** ERROR: version 0.17 or MailScanner will not work!\n\n";
+     $error = 1;
+   }
+   if ($IO::Stringy::VERSION<2.110) {
--- mailscanner-4.74.16.orig/debian/patches/clamav-location.dpatch
+++ mailscanner-4.74.16/debian/patches/clamav-location.dpatch
@@ -0,0 +1,38 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## clamav-location.dpatch by Simon Walter <Simon Walter <simon.walter@hp-factory.de>>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad mailscanner-4.74.15~/etc/virus.scanners.conf mailscanner-4.74.15/etc/virus.scanners.conf
+--- mailscanner-4.74.15~/etc/virus.scanners.conf	2009-01-10 19:36:26.000000000 +0100
++++ mailscanner-4.74.15/etc/virus.scanners.conf	2009-01-13 00:27:00.000000000 +0100
+@@ -16,7 +16,7 @@
+ avastd		/opt/MailScanner/lib/avastd-wrapper	/usr
+ avg		/opt/MailScanner/lib/avg-wrapper	/usr/local
+ bitdefender	/opt/MailScanner/lib/bitdefender-wrapper /opt/bdc
+-clamav		/opt/MailScanner/lib/clamav-wrapper	/usr/local
++clamav		/opt/MailScanner/lib/clamav-wrapper	/usr
+ clamd		/bin/false				/usr/local
+ clamavmodule	/bin/false				/tmp
+ command		/opt/MailScanner/lib/command-wrapper	/usr
+diff -urNad mailscanner-4.74.15~/lib/clamav-autoupdate mailscanner-4.74.15/lib/clamav-autoupdate
+--- mailscanner-4.74.15~/lib/clamav-autoupdate	2009-01-10 19:36:26.000000000 +0100
++++ mailscanner-4.74.15/lib/clamav-autoupdate	2009-01-13 00:29:38.000000000 +0100
+@@ -11,13 +11,13 @@
+ # in the syntax "full.host.name:port".
+ $HTTPproxy = "";
+ 
+-$PackageDir = shift || "/usr/local";
++$PackageDir = shift || "/usr";
+ 
+ $LogFile = "/tmp/ClamAV.update.log";
+ 
+ $ClamUpdateCommand = "$PackageDir/bin/freshclam";
+ 
+-$LockFile = shift || "/var/spool/MailScanner/incoming/Locks/clamavBusy.lock";
++$LockFile = shift || "/var/lock/subsys/MailScanner/clamavBusy.lock";
+ 
+ $LOCK_SH = 1;
+ $LOCK_EX = 2;
--- mailscanner-4.74.16.orig/debian/patches/spam.assassin.prefs.conf.dpatch
+++ mailscanner-4.74.16/debian/patches/spam.assassin.prefs.conf.dpatch
@@ -0,0 +1,55 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## spam.assassin.prefs.conf.dpatch by Simon Walter <simon.walter@hp-factory.de>
+##
+## DP: Customize spam.assassin.prefs.conf for debian.
+
+@DPATCH@
+diff -urNad mailscanner-4.57.6~/etc/spam.assassin.prefs.conf mailscanner-4.57.6/etc/spam.assassin.prefs.conf
+--- mailscanner-4.57.6~/etc/spam.assassin.prefs.conf	2007-01-06 20:17:47.000000000 +0100
++++ mailscanner-4.57.6/etc/spam.assassin.prefs.conf	2007-01-06 20:18:59.000000000 +0100
+@@ -89,7 +89,7 @@
+ # In this example, the trailing "bayes" will be the "bayes*" + 
+ # files in the directory "/etc/MailScanner/bayes/"
+ # Thanks to Matt Kettler for pointing this out.
+-#bayes_path /etc/MailScanner/bayes/bayes
++bayes_path /var/lib/MailScanner/bayes
+ 
+ 
+ # This is actually used as a mask, not a raw chmod setting.
+@@ -111,13 +111,13 @@
+ 
+ # This MUST be customized for each site :(
+ 
+-# Change X-YOURDOMAIN-COM to match your %org-name% as 
++# Change unconfigured-debian-site to match your %org-name% as 
+ # set in MailScanner.conf
+ 
+-bayes_ignore_header X-YOURDOMAIN-COM-MailScanner
+-bayes_ignore_header X-YOURDOMAIN-COM-MailScanner-SpamCheck 
+-bayes_ignore_header X-YOURDOMAIN-COM-MailScanner-SpamScore 
+-bayes_ignore_header X-YOURDOMAIN-COM-MailScanner-Information
++bayes_ignore_header unconfigured-debian-site-MailScanner
++bayes_ignore_header unconfigured-debian-site-MailScanner-SpamCheck 
++bayes_ignore_header unconfigured-debian-site-MailScanner-SpamScore 
++bayes_ignore_header unconfigured-debian-site-MailScanner-Information
+ 
+ # When using the scheduled Bayes expiry feature, in MailScanner.conf 
+ # you probably want to turn off auto-expiry in SpamAssassin as it will
+@@ -127,7 +127,7 @@
+ 
+ # FSL Note: we run Bayes expire from a cron job
+ 
+-#bayes_auto_expire 0
++bayes_auto_expire 0
+ 
+ # If you are using a UNIX machine with all database files on local disks,
+ # and no sharing of those databases across NFS filesystems, you can use a
+@@ -159,7 +159,7 @@
+ endif
+ 
+ ifplugin Mail::SpamAssassin::Plugin::DCC
+-dcc_path /usr/local/bin/dccproc
++dcc_path /usr/bin/dccproc
+ endif
+ 
+ # Uncomment the lines below to stop using the specific service
--- mailscanner-4.74.16.orig/debian/patches/upgrade-manpage.dpatch
+++ mailscanner-4.74.16/debian/patches/upgrade-manpage.dpatch
@@ -0,0 +1,73 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## upgrade-manpage.dpatch by Simon Walter <simon.walter@hp-factory.de>
+##
+## DP: Adds documentation to upgrade_MailScanner_conf.
+
+@DPATCH@
+diff -urNad mailscanner-4.56.8.1~/bin/upgrade_MailScanner_conf mailscanner-4.56.8.1/bin/upgrade_MailScanner_conf
+--- mailscanner-4.56.8.1~/bin/upgrade_MailScanner_conf	2006-12-02 14:26:18.000000000 +0100
++++ mailscanner-4.56.8.1/bin/upgrade_MailScanner_conf	2006-12-02 14:26:19.000000000 +0100
+@@ -55,6 +55,63 @@
+   $filescore = "languages_conf";
+ }
+ 
++=head1 NAME
++
++upgrade_MailScanner_conf - upgrades MailScanner.conf config files
++
++=head1 SYNOPSIS
++
++upgrade_MailScanner_conf [--keep-comments] MailScanner.conf MailScanner.conf.newversion > MailScanner.conf.new
++
++RPM
++===
++If you are using the RPM distributions then try this:
++
++cd /etc/MailScanner
++
++upgrade_MailScanner_conf MailScanner.conf MailScanner.conf.rpmnew > MailScanner.new
++
++mv MailScanner.conf MailScanner.old
++
++mv MailScanner.new  MailScanner.conf
++
++TAR
++===
++If you are using the tar distribution so that the old version is in
++/opt/MailScanner and the new one is in /opt/MailScanner.new then:
++
++cd /opt/MailScanner.new/etc
++
++../bin/upgrade_MailScanner_conf /opt/MailScanner/etc/MailScanner.conf /opt/MailScanner.new/etc/MailScanner.conf > MailScanner.new
++
++mv MailScanner.conf MailScanner.old
++
++mv MailScanner.new  MailScanner.conf
++
++=head1 DESCRIPTION
++
++upgrade_MailScanner_conf helps automate the conversion of older MailScanner.conf config
++files to the version of MailScanner you are installing.  This takes care of adding any
++new config items that need to be added, removing old deprecated items and updating the
++comments, unless you specify --keep-comments to signal you want your old comments left.
++
++=head1 OPTIONS
++
++--keep-comments - tells the script to not update the comments that have changed.
++
++Using --keep-comments can cause you to not realize that there are new/more options
++available to you for the item that your old comment was kept with.
++
++=head1 AUTHOR
++
++Julian Field (mailto: Jules@JulianField.net )
++
++=head1 SEE ALSO
++
++perl(1), MailScanner(3)
++
++=cut
++
+ sub Usage {
+   if ($config eq "mailscanner") {
+     print STDERR <<EOU;
--- mailscanner-4.74.16.orig/debian/patches/update_virus_scanners.dpatch
+++ mailscanner-4.74.16/debian/patches/update_virus_scanners.dpatch
@@ -0,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## update_virus_scanners.dpatch by Simon Walter <Simon Walter <simon.walter@hp-factory.de>>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: changes path to debian specific path.
+
+@DPATCH@
+diff -urNad mailscanner-4.74.16~/bin/update_virus_scanners mailscanner-4.74.16/bin/update_virus_scanners
+--- mailscanner-4.74.16~/bin/update_virus_scanners	2009-01-14 00:14:22.000000000 +0100
++++ mailscanner-4.74.16/bin/update_virus_scanners	2009-01-14 00:29:34.000000000 +0100
+@@ -1,16 +1,16 @@
+ #!/bin/sh
+ 
+-SCANNERSCONF=/opt/MailScanner/etc/virus.scanners.conf
+-LOCKDIR=`perl -n -e 'print "$_" if chomp && s/^\s*Lock\s*file\s*Dir\s*=\s*([^\s#]+).*$/$1/i' /opt/MailScanner/etc/MailScanner.conf`
+-RUNASU=`perl -n -e 'print "$_" if chomp && s/^\s*Run\s*As\s*User\s*=\s*([^\s#]+).*$/$1/i' /opt/MailScanner/etc/MailScanner.conf`
+-RUNASG=`perl -n -e 'print "$_" if chomp && s/^\s*Run\s*As\s*Group\s*=\s*([^\s#]+).*$/$1/i' /opt/MailScanner/etc/MailScanner.conf`
++SCANNERSCONF=/etc/MailScanner/virus.scanners.conf
++LOCKDIR=`perl -n -e 'print "$_" if chomp && s/^\s*Lock\s*file\s*Dir\s*=\s*([^\s#]+).*$/$1/i' /etc/MailScanner/MailScanner.conf`
++RUNASU=`perl -n -e 'print "$_" if chomp && s/^\s*Run\s*As\s*User\s*=\s*([^\s#]+).*$/$1/i' /etc/MailScanner/MailScanner.conf`
++RUNASG=`perl -n -e 'print "$_" if chomp && s/^\s*Run\s*As\s*Group\s*=\s*([^\s#]+).*$/$1/i' /etc/MailScanner/MailScanner.conf`
+ 
+ Disabled=no
+ if [ "x$Disabled" = "xyes" ]; then
+   exit 0
+ fi
+ 
+-LOCKFILE=/tmp/MailScanner.autoupdate.lock
++LOCKFILE=/var/lock/subsys/MailScanner/MailScanner.autoupdate.lock
+ [ x`perl -e 'print "link" if -l "'$LOCKFILE'"'` = "xlink" ] && rm -f $LOCKFILE
+ 
+ # the lockfile is not meant to be perfect, it's just in case the
+@@ -32,14 +32,14 @@
+   GREP=grep
+ fi
+ 
+-[ -x /opt/MailScanner/bin/mailscanner_create_locks ] && \
+-/opt/MailScanner/bin/mailscanner_create_locks "$LOCKDIR" "$RUNASU" "$RUNASG"
++[ -x /usr/sbin/mailscanner_create_locks ] && \
++/usr/sbin/mailscanner_create_locks "$LOCKDIR" "$RUNASU" "$RUNASG"
+ 
+ cat ${SCANNERSCONF} | sed -e 's/#.*$//' | ${GREP} -e -wrapper | \
+ while read NAME WRAPPER PACKAGEDIR
+ do
+   #echo String is $NAME $WRAPPER $PACKAGEDIR
+-  UPDATER=`echo $WRAPPER | sed -e 's/wrapper$/autoupdate/g'`
++  UPDATER=`echo $WRAPPER | sed -e 's/wrapper/autoupdate/g'`
+   LOCK=`echo $WRAPPER | sed -e 's/^.*\///g' -e 's/-wrapper$//'`
+   LOCK="${LOCKDIR}/${LOCK}Busy.lock"
+   if [ -n "${NAME}" -a -n "${WRAPPER}" -a -n "${PACKAGEDIR}" ]
--- mailscanner-4.74.16.orig/debian/patches/spam.lists.conf.dpatch
+++ mailscanner-4.74.16/debian/patches/spam.lists.conf.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## spam.lists.conf.dpatch by Simon Walter <simon.walter@hp-factory.de>
+##
+## DP: Add comment about sbl+xbl.
+
+@DPATCH@
+diff -urNad mailscanner-4.58.9~/etc/spam.lists.conf mailscanner-4.58.9/etc/spam.lists.conf
+--- mailscanner-4.58.9~/etc/spam.lists.conf	2007-02-09 02:36:03.000000000 +0100
++++ mailscanner-4.58.9/etc/spam.lists.conf	2007-02-09 02:38:19.000000000 +0100
+@@ -8,6 +8,8 @@
+ # If you want to search other DNSBL's you will need to define them here first,
+ # before referring to them by name in mailscanner.conf (or a rules file).
+ 
++# The spamhaus lists are NOT FREE for commercial/government
++# users. Please see http://www.spamhaus.org
+ spamhaus.org			sbl.spamhaus.org.
+ spamhaus-XBL			xbl.spamhaus.org.
+ spamhaus-PBL			pbl.spamhaus.org.
--- mailscanner-4.74.16.orig/debian/patches/use_spamassassinprefsconf.dpatch
+++ mailscanner-4.74.16/debian/patches/use_spamassassinprefsconf.dpatch
@@ -0,0 +1,72 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## use_spamassassinprefsconf by Simon Walter <simon.walter@hp-factory.de>
+##
+## DP: #399424 load /etc/MailScanner/spam.assassin.prefs.conf.
+
+@DPATCH@
+diff -urNad mailscanner-4.57.6~/etc/spam.assassin.prefs.conf mailscanner-4.57.6/etc/spam.assassin.prefs.conf
+--- mailscanner-4.57.6~/etc/spam.assassin.prefs.conf	2007-02-08 11:56:49.000000000 +0100
++++ mailscanner-4.57.6/etc/spam.assassin.prefs.conf	2007-02-08 12:18:17.000000000 +0100
+@@ -8,25 +8,13 @@
+ 
+ # =============== SpamAssassin Preferences ===============
+ 
+-# This file is linked to mailscanner.cf. The mailscanner.cf link is put
+-# into the site_rules directory by the MailScanner installation scripts. You
+-# can find the directory where the link is, and where all your site-specific
+-# SpamAssassin files should be, by running this perl script:
+-# 
+-# perl -MMail::SpamAssassin -e 'print Mail::SpamAssassin->new->first_existing_path(@Mail::SpamAssassin::site_rules_path)'
+-# 
+-# If you don't have SpamAssassin installed, then I advise you install
+-# it. Without it, you won't catch much spam. There is an easy-to-install
+-# ClamAV and SpamAssassin installation package included on the MailScanner
+-# downloads page on the web.
+-# 
+-# This file is no longer read specially by MailScanner when it starts up
+-# SpamAssassin, it relies on the link being in place to force SpamAssassin
+-# to read the file automatically on its own during its startup code. So
+-# you must have the link in place, or else this file is not read.
+-# 
+-# To check your configuration, run the command
+-# spamassassin -D --lint
++# This file is read specially by MailScanner when it starts up
++# SpamAssassin. Since MailScanner 4.48.4-2 this behavior is
++# debian-specific. Upstream loads this file through a link placed in
++# /etc/spamassassin/
++
++# To check your configuration, run the command spamassassin -D --lint
++# -p /etc/MailScanner/spam.assassin.prefs.conf
+ 
+ # ================== Settings For SpamAssassin ===========================
+ 
+diff -urNad mailscanner-4.57.6~/lib/MailScanner/ConfigDefs.pl mailscanner-4.57.6/lib/MailScanner/ConfigDefs.pl
+--- mailscanner-4.57.6~/lib/MailScanner/ConfigDefs.pl	2007-02-08 11:56:50.000000000 +0100
++++ mailscanner-4.57.6/lib/MailScanner/ConfigDefs.pl	2007-02-08 12:11:14.000000000 +0100
+@@ -252,7 +252,9 @@
+ PhishingWhitelist	/etc/MailScanner/phishing.safe.sites.conf
+ pidfile			/var/run/MailScanner.pid
+ SecondLevelList         /etc/MailScanner/country.domains.conf
+-#spamassassinprefsfile	/etc/MailScanner/spam.assassin.prefs.conf
++# <- reactivated to resolv bug #399424
++spamassassinprefsfile	/etc/MailScanner/spam.assassin.prefs.conf
++# ->
+ SpamListDefinitions	/etc/MailScanner/spam.lists.conf
+ mcpspamassassinprefsfile /etc/MailScanner/mcp/mcp.spam.assassin.prefs.conf
+ VirusScannerDefinitions	/etc/MailScanner/virus.scanners.conf
+diff -urNad mailscanner-4.57.6~/lib/MailScanner/SA.pm mailscanner-4.57.6/lib/MailScanner/SA.pm
+--- mailscanner-4.57.6~/lib/MailScanner/SA.pm	2007-01-06 15:10:06.000000000 +0100
++++ mailscanner-4.57.6/lib/MailScanner/SA.pm	2007-02-08 12:11:14.000000000 +0100
+@@ -94,9 +94,9 @@
+   unless (MailScanner::Config::IsSimpleValue('usespamassassin') &&
+           !MailScanner::Config::Value('usespamassassin')) {
+     $settings{dont_copy_prefs} = 1; # Removes need for home directory
+-    # This file is now read directly by SpamAssassin's normal startup code.
+-    #$prefs = MailScanner::Config::Value('spamassassinprefsfile');
+-    #$settings{userprefs_filename} = $prefs if defined $prefs;
++    # #399424 use /etc/MailScanner/spam.assassin.prefs.conf
++    $prefs = MailScanner::Config::Value('spamassassinprefsfile');
++    $settings{userprefs_filename} = $prefs if defined $prefs;
+     $val = $MailScanner::SA::Debug;
+     $settings{debug} = $val;
+     # for unusual bayes and auto whitelist database locations
--- mailscanner-4.74.16.orig/debian/patches/update_phishing_sites.dpatch
+++ mailscanner-4.74.16/debian/patches/update_phishing_sites.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## update_phishing_sites.dpatch by Simon Walter <simon.walter@hp-factory.de>
+##
+## DP: Fix location of mailscanner configuration directory.
+
+@DPATCH@
+diff -urNad mailscanner-4.55.10~/bin/update_phishing_sites mailscanner-4.55.10/bin/update_phishing_sites
+--- mailscanner-4.55.10~/bin/update_phishing_sites	2006-06-08 23:04:07.000000000 +0200
++++ mailscanner-4.55.10/bin/update_phishing_sites	2006-12-20 21:07:46.000000000 +0100
+@@ -34,8 +34,8 @@
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/etc:/usr/local/bin
+ export PATH
+ 
+-if [ -d /opt/MailScanner/etc ]; then
+-    cd /opt/MailScanner/etc
++if [ -d /etc/MailScanner ]; then
++    cd /etc/MailScanner
+ else
+     logger -p mail.warn -t update.phishing.sites Cannot find MailScanner configuration directory, update failed.
+     echo Cannot find MailScanner configuration directory.
--- mailscanner-4.74.16.orig/debian/patches/00list
+++ mailscanner-4.74.16/debian/patches/00list
@@ -0,0 +1,13 @@
+ConfigDefs.pl.dpatch
+filename.rules.conf.dpatch
+MailScanner.conf.dpatch
+MailScanner.dpatch
+MailScanner-File::Temp::VERSION-check.dpatch
+sophos-autoupdate.dpatch
+spam.assassin.prefs.conf.dpatch
+spam.lists.conf.dpatch
+update_phishing_sites.dpatch
+upgrade-manpage.dpatch
+use_spamassassinprefsconf.dpatch
+mailscanner_create_locks.dpatch
+update_virus_scanners.dpatch
\ No newline at end of file
--- mailscanner-4.74.16.orig/debian/patches/filename.rules.conf.dpatch
+++ mailscanner-4.74.16/debian/patches/filename.rules.conf.dpatch
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## filename.rules.conf.dpatch by Simon Walter <simon.walter@hp-factory.de>
+##
+## DP: Add two well known viruses.
+
+@DPATCH@
+diff -urNad MailScanner-4.56.8~/etc/filename.rules.conf MailScanner-4.56.8/etc/filename.rules.conf
+--- MailScanner-4.56.8~/etc/filename.rules.conf	2006-09-23 15:46:59.000000000 +0200
++++ MailScanner-4.56.8/etc/filename.rules.conf	2006-12-12 23:21:47.000000000 +0100
+@@ -19,11 +19,13 @@
+ deny	\.cur$			Windows cursor file security vulnerability					Possible buffer overflow in Windows
+ deny	\.hlp$			Windows help file security vulnerability					Possible buffer overflow in Windows
+ 
+-# These 4 are well known viruses.
++# These are some well known viruses.
+ deny	pretty\s+park\.exe$	"Pretty Park" virus								"Pretty Park" virus
+ deny	happy99\.exe$		"Happy" virus									"Happy" virus
+ deny	\.ceo$		WinEvar virus attachment							Often used by the WinEvar virus
+ deny	webpage\.rar$	I-Worm.Yanker virus attachment							Often used by the I-Worm.Yanker virus
++deny	your_.*\.zip	"W32/SoBig.E" virus								"W32/SoBig" virus
++deny	message\.zip	"W32/Mimail.A" virus								"W32/Mimail" virus
+ 
+ # JKF 08/07/2005 Several virus scanners may miss this one
+ deny	\.cab$			Possible malicious Microsoft cabinet file					Cabinet files may hide viruses
--- mailscanner-4.74.16.orig/debian/patches/MailScanner.dpatch
+++ mailscanner-4.74.16/debian/patches/MailScanner.dpatch
@@ -0,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## MailScanner.dpatch by Simon Walter <Simon Walter <simon.walter@hp-factory.de>>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Changing paths in MailScanner to debian paths
+
+@DPATCH@
+diff -urNad mailscanner-4.74.15~/bin/MailScanner mailscanner-4.74.15/bin/MailScanner
+--- mailscanner-4.74.15~/bin/MailScanner	2009-01-10 19:59:32.000000000 +0100
++++ mailscanner-4.74.15/bin/MailScanner	2009-01-12 22:27:54.000000000 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -I/opt/MailScanner/lib
++#!/usr/bin/perl -I/usr/share/MailScanner/
+ #
+ #   MailScanner - SMTP E-Mail Virus Scanner
+ #   Copyright (C) 2002  Julian Field
+@@ -250,7 +250,7 @@
+ # Find the mailscanner.conf file, with a default just in case.
+ my $ConfFile = $ARGV[0];
+ # Use the default if we couldn't find theirs. Will save a lot of grief.
+-$ConfFile = '/opt/MailScanner/etc/MailScanner.conf' if $ConfFile eq "" ||
++$ConfFile = '/etc/MailScanner/MailScanner.conf' if $ConfFile eq "" ||
+                                                        !(-f $ConfFile);
+ 
+ # Check the MailScanner version number against what is in MailScanner.conf
+@@ -295,7 +295,7 @@
+ Currently you are using no virus scanners.
+ This is probably not what you want.
+ 
+-In your /opt/MailScanner/etc/MailScanner.conf file, set
++In your /etc/MailScanner.conf file, set
+     Virus Scanners = clamav
+ Then download
+     http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/install-Clam-SA.tar.gz
+@@ -382,7 +382,7 @@
+   }
+   my $cluid = MailScanner::Config::QuickPeek($ConfFile, 'runasuser');
+   my $clgid = MailScanner::Config::QuickPeek($ConfFile, 'runasgroup');
+-  my $clr = system("/opt/MailScanner/bin/mailscanner_create_locks \"$lockdir\" \"$cluid\" \"$clgid\"");
++  my $clr = system("/usr/sbin/mailscanner_create_locks \"$lockdir\" \"$cluid\" \"$clgid\"");
+   print STDERR "Error: Attempt to create locks in $lockdir failed!\n"
+     if ($clr>>8) != 0;
+ 
+@@ -675,7 +675,7 @@
+   print STDERR "Please move your \"Lockfile Dir\" setting in MailScanner.conf.\n";
+   print STDERR "It should point outside /tmp, preferably /var/spool/MailScanner/incoming/Locks\n";
+ }
+-my $cl = system("/opt/MailScanner/bin/mailscanner_create_locks \"$locksdir\" \"$uname\" \"$gname\"");
++my $cl = system("/usr/sbin/mailscanner_create_locks \"$locksdir\" \"$uname\" \"$gname\"");
+ print STDERR "Error: Attempt to create locks in $locksdir failed!\n"
+  if ($cl>>8) != 0;
+ 
--- mailscanner-4.74.16.orig/debian/patches/ConfigDefs.pl.dpatch
+++ mailscanner-4.74.16/debian/patches/ConfigDefs.pl.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ConfigDefs.pl.dpatch by Simon Walter <simon.walter@hp-factory.de>
+##
+## DP: debian modification for mailscanners default config 
+
+@DPATCH@
+diff -urNad mailscanner-4.74.15~/lib/MailScanner/ConfigDefs.pl mailscanner-4.74.15/lib/MailScanner/ConfigDefs.pl
+--- mailscanner-4.74.15~/lib/MailScanner/ConfigDefs.pl	2009-01-10 19:43:30.000000000 +0100
++++ mailscanner-4.74.15/lib/MailScanner/ConfigDefs.pl	2009-01-10 19:44:47.000000000 +0100
+@@ -282,7 +282,7 @@
+ # These should be checked for dir existence
+ [Simple,Dir]
+ incomingworkdir		/var/spool/MailScanner/incoming
+-lockfiledir		/var/spool/MailScanner/incoming/Locks
++lockfiledir		/var/lock/subsys/MailScanner/
+ 
+ # Check the first word of these for file existence
+ [Simple,File]
--- mailscanner-4.74.16.orig/debian/patches/MailScanner.conf.dpatch
+++ mailscanner-4.74.16/debian/patches/MailScanner.conf.dpatch
@@ -0,0 +1,225 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## MailScanner.conf.dpatch by Simon Walter <simon.walter@hp-factory.de>
+##
+## DP: Customize MailScanner.conf for debian.
+
+@DPATCH@
+diff -urNad mailscanner-4.74.15~/etc/MailScanner.conf mailscanner-4.74.15/etc/MailScanner.conf
+--- mailscanner-4.74.15~/etc/MailScanner.conf	2009-01-10 19:45:39.000000000 +0100
++++ mailscanner-4.74.15/etc/MailScanner.conf	2009-01-10 19:47:23.000000000 +0100
+@@ -55,7 +55,10 @@
+ #       So don't put "." or "_" in this setting.
+ #
+ # **** RULE: It must not contain any spaces! ****
+-%org-name% = yoursite
++#
++# Note: This change has to be reflected in the 'bayes_ignore_header'
++# options in /etc/MailScanner/spam.assassin.prefs.conf,
++%org-name% = unconfigured-debian-site
+ 
+ # Enter the full name of your organisation below, this is used in the
+ # signature placed at the bottom of report messages sent by MailScanner.
+@@ -72,17 +75,17 @@
+ %web-site% = www.your-organisation.com
+ 
+ # Configuration directory containing this file
+-%etc-dir% = /opt/MailScanner/etc
++%etc-dir% = /etc/MailScanner
+ 
+ # Set the directory containing all the reports in the required language
+-%report-dir% = /opt/MailScanner/etc/reports/en
++%report-dir% = /etc/MailScanner/reports/en
+ 
+ # Rulesets directory containing your ".rules" files
+-%rules-dir% = /opt/MailScanner/etc/rules
++%rules-dir% = /etc/MailScanner/rules
+ 
+ # Configuration directory containing files related to MCP
+ # (Message Content Protection)
+-%mcp-dir% = /opt/MailScanner/etc/mcp
++%mcp-dir% = /etc/MailScanner/mcp
+ 
+ # One other that is set automatically for you is %version% which is,
+ # unsurprisingly, the string of the MailScanner version. It does not
+@@ -104,7 +107,7 @@
+ # note that each child takes just over 20MB.
+ #
+ # As a rough guide, try 5 children per CPU. But read the notes above.
+-Max Children = 5
++Max Children = 1
+ 
+ # User to run as (not normally used for sendmail)
+ # If you want to change the ownership or permissions of the quarantine or
+@@ -112,12 +115,12 @@
+ # settings later in this file.
+ #Run As User = mail
+ #Run As User = postfix
+-Run As User =
++Run As User = Debian-exim
+ 
+ # Group to run as (not normally used for sendmail)
+ #Run As Group = mail
+ #Run As Group = postfix
+-Run As Group =
++Run As Group = Debian-exim
+ 
+ # How often (in seconds) should each process check the incoming mail
+ # queue for new messages? If you have a quiet mail server, you might
+@@ -130,12 +133,12 @@
+ #
+ # This can be any one of
+ # 1. A directory name
+-#    Example: /var/spool/mqueue.in
++#    Example: /var/spool/exim4/input
+ # 2. A wildcard giving directory names
+ #    Example: /var/spool/mqueue.in/*
+ # 3. The name of a file containing a list of directory names,
+ #    which can in turn contain wildcards.
+-#    Example: /opt/MailScanner/etc/mqueue.in.list.conf
++#    Example: /etc/MailScanner/mqueue.in.list.conf
+ #
+ # If you are using sendmail and have your queues split into qf, df, xf
+ # directories, then just specify the main directory, do not give me the
+@@ -146,11 +149,11 @@
+ # then just tell me /var/spool/mqueue.in. I will find the subdirectories
+ # automatically.
+ #
+-Incoming Queue Dir = /var/spool/mqueue.in
++Incoming Queue Dir = /var/spool/exim4/input
+ 
+ # Set location of outgoing mail queue.
+ # This can also be the filename of a ruleset.
+-Outgoing Queue Dir = /var/spool/mqueue
++Outgoing Queue Dir = /var/spool/exim4_outgoing/input
+ 
+ # Set where to unpack incoming messages before scanning them
+ # This can completely safely use tmpfs or a ramdisk, which will
+@@ -167,7 +170,7 @@
+ Quarantine Dir = /var/spool/MailScanner/quarantine
+ 
+ # Set where to store the process id number so you can stop MailScanner
+-PID file = /opt/MailScanner/var/MailScanner.pid
++PID file = /var/run/MailScanner/MailScanner.pid
+ 
+ # To avoid resource leaks, re-start periodically. Forces a re-read of all
+ # the configuration files too, so new updates to the bad phishing sites list
+@@ -177,22 +180,22 @@
+ # Set whether to use postfix, sendmail, exim or zmailer.
+ # If you are using postfix, then see the "SpamAssassin User State Dir"
+ # setting near the end of this file
+-MTA = sendmail
++MTA = exim
+ 
+ # Set how to invoke MTA when sending messages MailScanner has created
+ # (e.g. to sender/recipient saying "found a virus in your message")
+ # This can also be the filename of a ruleset.
+-Sendmail = /usr/lib/sendmail
++Sendmail = /usr/sbin/sendmail
+ 
+ # Sendmail2 is provided for Exim users.
+ # It is the command used to attempt delivery of outgoing cleaned/disinfected
+ # messages.
+ # This is not usually required for sendmail.
+ # This can also be the filename of a ruleset.
+-#For Exim users: Sendmail2 = /usr/sbin/exim -C /etc/exim/exim_send.conf
+-#For sendmail users: Sendmail2 = /usr/lib/sendmail
+-#Sendmail2 = /usr/sbin/sendmail -C /etc/exim/exim_send.conf
+-Sendmail2 = /usr/lib/sendmail
++#For Exim users: Sendmail2 = /usr/sbin/exim4 -DOUTGOING
++#For sendmail users: Sendmail2 = /usr/sbin/sendmail
++Sendmail2 = /usr/sbin/sendmail -DOUTGOING
++#Sendmail2 = /usr/sbin/sendmail
+ 
+ #
+ # Incoming Work Dir Settings
+@@ -375,7 +378,7 @@
+ # may be. It helps protect against Denial Of Service attacks in TNEF files.
+ # This can also be the filename of a ruleset.
+ #TNEF Expander  = internal
+-TNEF Expander = /opt/MailScanner/bin/tnef --maxsize=100000000
++TNEF Expander = /usr/bin/tnef --maxsize=100000000
+ 
+ # The maximum length of time the TNEF Expander is allowed to run for 1 message.
+ # (in seconds)
+@@ -768,8 +771,8 @@
+ # None of these options can be the filenames of rulesets, they must be just
+ # simple values.
+ Clamd Port = 3310
+-Clamd Socket = /tmp/clamd.socket
+-Clamd Lock File = # /var/lock/subsys/clamd
++Clamd Socket = /var/run/clamav/clamd.ctl
++Clamd Lock File = /var/run/clamav/clamd.pid
+ Clamd Use Threads = no
+ 
+ # There are now sets of signatures available from places such as
+@@ -1254,7 +1257,7 @@
+ # If you don't want an information header at all, just comment out this
+ # setting or set it to be blank.
+ # This can also be the filename of a ruleset.
+-Information Header = X-%org-name%-MailScanner-Information:
++#Information Header = X-%org-name%-MailScanner-Information:
+ 
+ # Do you want to add the Envelope-From: header?
+ # This is very useful for tracking where spam came from as it
+@@ -1486,7 +1489,7 @@
+ # Do you want to notify the people who sent you messages containing
+ # viruses or badly-named filenames?
+ # This can also be the filename of a ruleset.
+-Notify Senders = yes
++Notify Senders = no
+ 
+ # *If* "Notify Senders" is set to yes, do you want to notify people
+ # who sent you messages containing viruses?
+@@ -1821,6 +1824,8 @@
+ # See the "Spam List Definitions" file for more information about what
+ # you can put here.
+ # This can also be the filename of a ruleset.
++# spamhaus-ZEN is NOT FREE for commercial/government users.  Please
++# see http://www.spamhaus.org
+ Spam List = # spamhaus-ZEN # You can un-comment this to enable them
+ 
+ # This is the list of spam domain blacklists which you are using
+@@ -2521,7 +2526,7 @@
+ #       need to modify this location.
+ #       You should not normally need to set this at all.
+ #SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
+-SpamAssassin User State Dir =
++SpamAssassin User State Dir = /var/lib/MailScanner
+ 
+ # This setting is useful if SpamAssassin is installed in an unusual place,
+ # e.g. /opt/MailScanner. The install prefix is used to find some fallback
+@@ -2543,7 +2548,7 @@
+ # the file into mailscanner.cf in the new directory.
+ # If this is set then it replaces the list of places that are searched;
+ # otherwise it has no effect.
+-#SpamAssassin Local Rules Dir = /opt/MailScanner/etc/mail/spamassassin
++#SpamAssassin Local Rules Dir = /etc/MailScanner/mail/spamassassin
+ SpamAssassin Local Rules Dir =
+ 
+ # The rules created by the "sa-update" tool are searched for here.
+@@ -2560,7 +2565,7 @@
+ # /usr/local/share/spamassassin, /usr/share/spamassassin, and maybe others.
+ # If this is set then it adds to the list of places that are searched;
+ # otherwise it has no effect.
+-#SpamAssassin Default Rules Dir = /opt/MailScanner/share/spamassassin
++#SpamAssassin Default Rules Dir = /usr/share/spamassassin
+ SpamAssassin Default Rules Dir =
+ 
+ #
+@@ -2752,5 +2757,5 @@
+ # These lock files are used between MailScanner and the virus signature
+ # "autoupdate" scripts, to ensure that they aren't both working at the
+ # same time (which could cause MailScanner to let a virus through).
+-Lockfile Dir = /var/spool/MailScanner/incoming/Locks
++Lockfile Dir = /var/lock/subsys/MailScanner
+ 
+@@ -2757,8 +2762,8 @@
+ # Where to put the code for your "Custom Functions". No code in this
+ # directory should be over-written by the installation or upgrade process.
+ # All files starting with "." or ending with ".rpmnew" will be ignored,
+ # all other files will be compiled and may be used with Custom Functions.
+-Custom Functions Dir = /opt/MailScanner/lib/MailScanner/CustomFunctions
++Custom Functions Dir = /etc/MailScanner/CustomFunctions
+ 
+ # How to lock spool files.
+ # Don't set this unless you *know* you need to.
--- mailscanner-4.74.16.orig/debian/patches/mailscanner_create_locks.dpatch
+++ mailscanner-4.74.16/debian/patches/mailscanner_create_locks.dpatch
@@ -0,0 +1,30 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## mailscanner_create_locks.dpatch by Simon Walter <Simon Walter <simon.walter@hp-factory.de>>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: changes path in mailscanner_create_locks to debian-specific path
+
+@DPATCH@
+diff -urNad mailscanner-4.74.15~/bin/mailscanner_create_locks mailscanner-4.74.15/bin/mailscanner_create_locks
+--- mailscanner-4.74.15~/bin/mailscanner_create_locks	2009-01-10 19:36:26.000000000 +0100
++++ mailscanner-4.74.15/bin/mailscanner_create_locks	2009-01-12 23:29:41.000000000 +0100
+@@ -11,7 +11,7 @@
+ my $ldgname      = shift;
+ 
+ # Turn them all into numbers and stuff with sensible defaults
+-$locksdirname = '/var/spool/MailScanner/incoming/Locks'
++$locksdirname = '/var/lock/subsys/MailScanner/'
+   unless $locksdirname =~ /^\//;
+ my $lduid = getpwnam($lduname);
+ my $ldgid = getgrnam($ldgname);
+@@ -26,8 +26,8 @@
+ 
+ # Now work through all the virus scanner autoupdate names, building Lock files.
+ my($dh, $fh, $updatename, $lockname, @updatenames, @locknames);
+-$dh = new DirHandle "/opt/MailScanner/lib";
+-die "Can't read dir /opt/MailScanner/lib to build list of -autoupdate scripts, $!" unless $dh;
++$dh = new DirHandle "/etc/MailScanner/autoupdate/";
++die "Can't read dir /etc/MailScanner/autoupdate/ to build list of -autoupdate scripts, $!" unless $dh;
+ while (defined($updatename = $dh->read)) {
+   next unless $updatename =~ s/-autoupdate$//;
+   next unless $updatename =~ /^[a-z0-9_-]+$/i; # No nasty chars thanks!
--- mailscanner-4.74.16.orig/debian/patches/sophos-autoupdate.dpatch
+++ mailscanner-4.74.16/debian/patches/sophos-autoupdate.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sophos-autoupdate.dpatch by Simon Walter <simon.walter@hp-factory.de>
+##
+## DP: Fix sophos directory.
+
+@DPATCH@
+diff -urNad mailscanner-4.56.8.1~/lib/sophos-autoupdate mailscanner-4.56.8.1/lib/sophos-autoupdate
+--- mailscanner-4.56.8.1~/lib/sophos-autoupdate	2006-12-02 14:26:42.000000000 +0100
++++ mailscanner-4.56.8.1/lib/sophos-autoupdate	2006-12-02 14:26:43.000000000 +0100
+@@ -60,7 +60,7 @@
+ 
+ $SophosRoot = "/usr/local/Sophos" unless $SophosRoot;
+ $IDELink    = "$SophosRoot/ide";
+-$VDLDir     = "../lib";
++$VDLDir     = "../sav";
+ 
+ #$Lynx = "/usr/local/bin/lynx -dump";
+ $Lynx = "/usr/bin/wget -q -O-"; # On Linux use this
--- mailscanner-4.74.16.orig/debian/man/Makefile
+++ mailscanner-4.74.16/debian/man/Makefile
@@ -0,0 +1,182 @@
+# $Source$
+# $Author: xmldoc $
+# $Date: 2006-04-19 15:25:42 +0900 (Wed, 19 Apr 2006) $
+# $Revision: 5866 $
+# vim: number
+#
+# -----------------------------------------------------------------
+#  ** Makefile.combine -- combine source files **
+# -----------------------------------------------------------------
+#
+#   This file is part of the DocBook Project XSL Stylesheet
+#   distribution.
+#
+#   See http://docbook.sourceforge.net/release/xsl/current/
+#   for copyright and other information.
+#
+# This makefile creates "wrapper" files that combine sets of
+# individual DocBook source files. The purpose of combining the
+# files is to speed up processing time. By default it puts 20
+# files into each wrapper. Use CHUNKSIZE to configure the number
+# of files per wrapper.
+#
+# Currently, this makefile has only a "man" target and is mainly
+# intended to speed up processing of large numbers if individual
+# refentry instances.
+
+# What file extension do you use for DocBook source files?
+DOCBOOK_FILE_EXTENSION = .xml
+SOURCE_FILES_DBK = $(wildcard *$(DOCBOOK_FILE_EXTENSION))
+
+MAKEFILE_DOCBOOK = Makefile.DocBook
+
+XSLTPROC=xsltproc
+XSLTPROC_FLAGS=
+
+SED=sed
+SED_FLAGS=-i
+
+CHUNKSIZE ?= 20
+
+WRAPPER_ELEMENT = reference
+WRAPPER_TITLE=Combined contents
+
+COMBINE_XSL = <?xml version="1.0"?> \
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
+		xmlns:exsl="http://exslt.org/common" \
+		xmlns:xi="http://www.w3.org/2001/XInclude" \
+		exclude-result-prefixes="exsl xi" \
+		extension-element-prefixes="exsl" \
+		version="1.0"> \
+  <xsl:param name="files"/> \
+  <xsl:param name="chunk.size"/> \
+  <xsl:template match="/"> \
+    <xsl:call-template name="make.file"/> \
+  </xsl:template> \
+ \
+  <xsl:template name="make.file"> \
+    <xsl:param name="count" select="1"/> \
+    <xsl:param name="current.files" select="concat(normalize-space($$files), ^^ ^^)"/> \
+    <xsl:param name="more.files" \
+	       select="concat(normalize-space(substring-after($$current.files, ^^ ^^)),^^ ^^)"/> \
+    <xsl:param name="file.number" select="1"/> \
+    <xsl:param name="filename" select="concat(^^./build/^^,$$file.number,^^.xml^^)"/> \
+ \
+    <xsl:choose> \
+      <xsl:when test="$$more.files = ^^ ^^"/> \
+      <xsl:when test="$$count mod $$chunk.size = 0"> \
+	<xsl:variable name="fileset" select="concat($$current.files, ^^ ^^, \
+	  substring-before($$more.files, ^^ ^^))"/> \
+	<exsl:document href="{$$filename}" \
+		       method="xml" \
+		       encoding="UTF-8" \
+		       indent="yes" \
+		       omit-xml-declaration="yes" \
+		       media-type="" \
+		       standalone="no"> \
+	  <$(WRAPPER_ELEMENT)> \
+	    <title>$(WRAPPER_TITLE)</title> \
+	    <xsl:call-template name="make.xinclude"> \
+	      <xsl:with-param name="file"> \
+		<xsl:choose> \
+		  <xsl:when test="contains($$fileset, ^^ ^^)"> \
+		    <xsl:value-of \
+			select="normalize-space(substring-before($$fileset, ^^ ^^))"/> \
+		  </xsl:when> \
+		  <xsl:otherwise> \
+		    <xsl:value-of select="$$fileset"/> \
+		  </xsl:otherwise> \
+		</xsl:choose> \
+	      </xsl:with-param> \
+	      <xsl:with-param \
+		  name="remaining.files" \
+		  select="concat(normalize-space(substring-after($$fileset, ^^ ^^)),^^ ^^)"/> \
+	    </xsl:call-template> \
+	  </$(WRAPPER_ELEMENT)> \
+	</exsl:document> \
+	<xsl:call-template name="make.file"> \
+	  <xsl:with-param name="count" select="1"/> \
+	  <xsl:with-param name="current.files"  \
+			  select="$$more.files"/> \
+	  <xsl:with-param name="file.number" select="number($$file.number) + 1"/> \
+	  <xsl:with-param name="filename" select="concat(^^./build/^^,$$file.number,^^.xml^^)"/> \
+	</xsl:call-template> \
+      </xsl:when> \
+      <xsl:otherwise> \
+	<xsl:call-template name="make.file"> \
+	  <xsl:with-param name="count" select="$$count + 1"/> \
+	  <xsl:with-param name="current.files"> \
+	    <xsl:choose> \
+	      <xsl:when test="$$count = 1 and $$file.number = 1"> \
+		<xsl:value-of  \
+		    select="concat(substring-before($$current.files, ^^ ^^), \
+			    ^^ ^^, \
+			    substring-before($$more.files, ^^ ^^))"/> \
+	      </xsl:when> \
+	      <xsl:when test="$$count = 1"> \
+		<xsl:value-of  \
+		    select="substring-before($$more.files, ^^ ^^)"/> \
+	      </xsl:when> \
+	      <xsl:otherwise> \
+		<xsl:value-of  \
+		    select="concat($$current.files, ^^ ^^, \
+			    substring-before($$more.files, ^^ ^^))"/> \
+	      </xsl:otherwise> \
+	    </xsl:choose> \
+	  </xsl:with-param> \
+	  <xsl:with-param name="more.files" \
+			  select="substring-after($$more.files, ^^ ^^)"/> \
+	  <xsl:with-param name="file.number" select="$$file.number"/> \
+	</xsl:call-template> \
+      </xsl:otherwise> \
+    </xsl:choose> \
+  </xsl:template> \
+ \
+  <xsl:template name="make.xinclude"> \
+    <xsl:param name="file"/> \
+    <xsl:param name="remaining.files"/> \
+    <xsl:param name="count" select="1"/> \
+    <xsl:if test="not($$file = ^^^^)"> \
+      <xi:include href="../{$$file}"/> \
+      <xsl:call-template name="make.xinclude"> \
+	<xsl:with-param \
+	    name="file" \
+	    select="substring-before($$remaining.files, ^^ ^^)"/> \
+	<xsl:with-param \
+	    name="remaining.files" \
+	    select="substring-after($$remaining.files, ^^ ^^)"/> \
+	<xsl:with-param name="count" select="$$count + 1"/> \
+      </xsl:call-template> \
+    </xsl:if> \
+  </xsl:template> \
+ \
+</xsl:stylesheet>
+
+all: man
+
+man: build/man
+
+build/Makefile:
+	if [ ! -d build ]; then mkdir build; fi
+	cp $(MAKEFILE_DOCBOOK) $@
+
+combine.xsl: Makefile
+	@echo '$(COMBINE_XSL)' > $@
+	$(SED) $(SED_FLAGS) "s/\^\^/'/g" $@
+
+build/1.xml: combine.xsl
+	$(XSLTPROC) $(XSLTPROC_FLAGS) \
+	--stringparam files "$(SOURCE_FILES_DBK)" \
+	--stringparam chunk.size $(CHUNKSIZE) \
+	$< $<
+
+build/man: build/Makefile build/1.xml
+	$(MAKE) -C build man \
+		MAN_PARAMS="--stringparam man.output.quietly 1 \
+		   --stringparam refentry.meta.get.quietly 1 \
+		   --stringparam man.charmap.enabled 0"
+
+debug:
+
+clean:
+	$(RM) -r build
--- mailscanner-4.74.16.orig/debian/man/update_virus_scanners.xml
+++ mailscanner-4.74.16/debian/man/update_virus_scanners.xml
@@ -0,0 +1,123 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+	$(XP) $(DB2MAN) $<
+
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Simon</firstname>">
+  <!ENTITY dhsurname   "<surname>Walter</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>09.12.2006</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>simon.walter@hp-factory.de</email>">
+  <!ENTITY dhusername  "Simon Walter">
+  <!ENTITY dhucpackage "<refentrytitle>update_virus_scanners</refentrytitle>">
+  <!ENTITY dhpackage   "update_virus_scanners">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2006</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose> a script to update virus scanners used by MailScanner.</refpurpose>
+  </refnamediv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> options.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.</para>
+
+    <para><command>&dhpackage;</command> is helper script for
+    MailScanner, a freely distributable E-Mail gateway virus scanner
+    and spam detector. &dhpackage; tests which virus scanners are installed and
+    tries to update them.</para>
+
+		<para>To find installed virus scanners &dhpackage; uses the list
+		of virus scanners, their wrappers and location,
+		in <filename>/etc/MailScanner/virus.scanners.conf</filename>. To
+		update a virus scanner it calls the correspondig update scipt
+		in <filename>/etc/MailScanner/autoupdate/</filename>.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <variablelist>
+      <varlistentry>
+				<term>
+					<citerefentry><refentrytitle>MailScanner</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+					<filename>/etc/MailScanner/virus.scanners.conf</filename>
+					<filename>/etc/MailScanner/wrapper/</filename>
+					<filename>/etc/MailScanner/autoupdate/</filename>
+				</term>
+			</varlistentry>
+		</variablelist>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
--- mailscanner-4.74.16.orig/debian/man/Makefile.DocBook
+++ mailscanner-4.74.16/debian/man/Makefile.DocBook
@@ -0,0 +1,632 @@
+# $Source$
+# $Author: xmldoc $
+# $Date: 2006-09-01 15:47:16 +0900 (Fri, 01 Sep 2006) $
+# $Revision: 6235 $
+# vim: number
+#
+# -----------------------------------------------------------------
+#  ** Makefile.DocBook -- generate output from DocBook sources **
+# -----------------------------------------------------------------
+#
+#   This file is part of the DocBook Project XSL Stylesheet
+#   distribution.
+#
+#   See http://docbook.sourceforge.net/release/xsl/current/
+#   for copyright and other information.
+
+# DOCBOOK_OUTPUT_FORMATS is the default set of targets (output
+# formats) that get built when you type "make" without any targets
+# explicitly specified. To generate a different set of output
+# formats, change the value of DOCBOOK_OUTPUT_FORMATS here or set
+# it in your environment; for example:
+#
+#   set DOCBOOK_OUTPUT_FORMATS="html pdf"; export DOCBOOK_OUTPUT_FORMATS
+#
+# Of course by explicitly specifying particular targets when you
+# invoke "make", you can always override generation of the default
+# set of targets; for example:
+#
+#   make html txt
+#
+# That would generate just HTML (unchunked) and plain-text output.
+#
+DOCBOOK_OUTPUT_FORMATS ?= man chunk txt pdf
+
+# If you want XHTML output instead of HTML, set HTML_OR_XHTML to
+# 'xhtml' or just specify 'xhtml" in DOCBOOK_OUTPUT_FORMATS.
+ifeq ($(findstring xhtml,$(DOCBOOK_OUTPUT_FORMATS)),)
+HTML_OR_XHTML ?= html
+else
+HTML_OR_XHTML ?= xhtml
+endif
+
+# -----------------------------------------------------------------
+#                *** TOOLS and other DEPENDENCIES ***
+# -----------------------------------------------------------------
+# we use rmdir(1) to remove dirs we create for chunked HTML output
+RMDIR = rmdir
+# "-p" causes empty parent dirs to be deleted as well
+RMDIR_FLAGS = --ignore-fail-on-non-empty -p
+
+# possible values for PDF_MAKER are:
+#   dblatex|fop|xep|xmlroff|passivetex
+PDF_MAKER = fop
+
+# possible values for TXT_MAKER are:
+#   links|lynx|w3m|w3mmee
+TXT_MAKER = links
+TXT_MAKER_FLAGS = -dump
+
+# xsl
+XSLT = xsltproc
+XSLT_FLAGS = --nonet --xinclude
+
+# http://dblatex.sourceforge.net/
+DBLATEX = dblatex
+DBLATEX_FLAGS = -b pdftex
+
+FOP = fop
+FOP_FLAGS =
+
+XEP = xep
+XEP_FLAGS =
+
+# http://xmlroff.sourceforge.net/
+XMLROFF = xmlroff
+XMLROFF_FLAGS =
+
+PDFTEX = pdftex
+PDFTEX_FLAGS =
+
+# used by PassiveTeX
+PDFXMLTEX = pdfxmltex
+
+# http://docbook2x.sourceforge.net/
+DB2X_XSLTPROC = db2x_xsltproc
+DB2X_XSLTPROC_FLAGS = 
+DB2X_TEXIXML = db2x_texixml
+DB2X_TEXIXML_FLAGS = 
+
+# we call the man(1) command to generate "foo.N.pdf" and
+# "foo.N.txt" output (see "man-pdf" & "man-txt" targets)
+MAN = man
+MAN_FLAGS =
+
+# The "ps2pdf" command is part of GhostSript (gs) distro.
+# It is just a wrapper script around gs that does this:
+#
+#   gs -dCompatibilityLevel=1.2 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
+#     "-sOutputFile=$outfile" -dCompatibilityLevel=1.2 -c .setpdfwrite -f "$infile"
+#
+# Where, for example: $outfile = foo.pdf and $infile = foo.1
+PS2PDF = ps2pdf
+PS2PDF_FLAGS =
+
+# The "col" command is needed for stripping backspaces and
+# underscores from man(1) output to get pure plain-text
+COL = col
+COL_FLAGS =
+
+# The "expand" command is needed for expanding tabs from files
+# generated from "man foo.1 | col -b" output
+# output to get pure plain-text
+EXPAND = expand
+EXPAND_FLAGS =
+
+# value of DOCBOOK_XSL should either be the canonical
+# (docbook.sourceforge.net) URL for the DocBook Project XSL
+# stylesheets OR it can be a local system path
+DOCBOOK_XSL = http://docbook.sourceforge.net/release/xsl/current
+
+# -----------------------------------------------------------------
+#       names of some DIRECTORIES and FILES we need
+# -----------------------------------------------------------------
+# We create a tmp directory once per make invocation; it's needed
+# for holding a temporary copy of the custom DBLaTeX stylesheet
+# (because dblatex currently can't read a stylesheet from stdin)
+TMP ?= /tmp
+TMPNUM := $(shell echo $$$$)
+DOCBOOK_TMP := $(TMP)/docbook-make-$(TMPNUM)
+
+# MAN_MANIFEST_EXT is file extension added to individual manifest
+# files
+MAN_MANIFEST_EXT = manifest_man
+
+# HTML_MANIFEST_EXT is file extension added to HTML manifest files
+HTML_MANIFEST_EXT = manifest_html
+
+# BASEDIR_SUFFIX is a what you need to set if you want a suffix
+# added to the end of each "base.dir" we create while generating
+# chunked HTML output
+#BASEDIR_SUFFIX = -html
+#BASEDIR_SUFFIX = _html
+BASEDIR_SUFFIX = 
+
+# -----------------------------------------------------------------
+#                        assorted OPTIONS
+# -----------------------------------------------------------------
+# HTML_STYLESHEET -> $html.stylesheet stylesheet param
+# http://docbook.sourceforge.net/snapshots/xsl/doc/html/html.stylesheet.html
+HTML_STYLESHEET = style.css
+# HTML_IMAGES -> $admon.graphics.path
+# http://docbook.sourceforge.net/snapshots/xsl/doc/html/admon.graphics.path.html
+HTML_IMAGES = images/
+# HTML_IMAGES_EXT -> $admon.graphics.extension
+# http://docbook.sourceforge.net/snapshots/xsl/doc/html/admon.graphics.extension.html
+HTML_IMAGES_EXT = .png
+
+# use these to set params on the command-line
+# format is, e.g., HTML_PARAMS="--stringparam variablelist.as.table 1..."
+FO_PARAMS =
+HTML_PARAMS =
+MAN_PARAMS =
+
+# DBX_PARAMS is for dblatex(1); format uses "-p":
+# DBX_PARAMS="-p doc.publisher.show 1 -p term.breakline 1...
+DBX_PARAMS=
+
+# What file extension do you use for DocBook source files?
+DOCBOOK_FILE_EXTENSION = .xml
+
+# -----------------------------------------------------------------
+#       make(1) functions for building file lists
+# -----------------------------------------------------------------
+#
+#    the values of the following are used for determing what needs
+#    to be built and/or cleaned up
+
+SOURCE_FILES_DBK = $(wildcard *$(DOCBOOK_FILE_EXTENSION))
+
+FILES_FO   = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).fo)
+FILES_TXT  = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).txt)
+FILES_PDF  = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).pdf)
+FILES_LOG  = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).log)
+FILES_OUT  = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).out)
+FILES_AUX  = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).aux)
+FILES_HTML = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).html)
+FILES_INFO = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).info)
+DIRS_CHUNK = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base)$(BASEDIR_SUFFIX))
+LISTS_HTML = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).$(HTML_MANIFEST_EXT))
+LISTS_MAN  = $(foreach base,$(basename $(SOURCE_FILES_DBK)),$(base).$(MAN_MANIFEST_EXT))
+FILES_CHNK = $(shell for manifest in $(LISTS_HTML); do if [ -f "$$manifest" ]; then cat $$manifest; fi done)
+FILES_MAN  = $(shell for manifest in $(LISTS_MAN);  do if [ -f "$$manifest" ]; then cat $$manifest; fi done)
+FILES_MANP = $(foreach base,$(FILES_MAN),$(base).pdf)
+FILES_MANT = $(foreach base,$(FILES_MAN),$(base).txt)
+DIRS_MAN   = $(shell for file in $(FILES_MAN); do dirname $$file; done | uniq)
+
+# -----------------------------------------------------------------
+#   ** stylesheet for testing whether a file has a refentry
+# -----------------------------------------------------------------
+REFENTRY_CHECK := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
+                version="1.0" \
+                xmlns:db="http://docbook.org/ns/docbook" \
+                > \
+  <xsl:output method="text"/> \
+  <xsl:template match="/"> \
+    <xsl:if test="//refentry|//db:refentry"> \
+      <xsl:text>true</xsl:text> \
+    </xsl:if> \
+  </xsl:template> \
+</xsl:stylesheet>
+
+# -----------------------------------------------------------------
+#             ** Stylesheet Customization Layers ** 
+# -----------------------------------------------------------------
+#
+# for DBLaTeX
+DBX_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
+                 version="1.0"> \
+  <xsl:param name="co.linkends.show">0</xsl:param> \
+  <xsl:param name="callout.markup.circled">1</xsl:param> \
+  <xsl:param name="callout.linkends.hot">0</xsl:param> \
+  <xsl:param name="doc.publisher.show">1</xsl:param> \
+  <xsl:param name="term.breakline">1</xsl:param> \
+  <xsl:param name="doc.alignment">left</xsl:param> \
+  <xsl:param name="newtbl.use">1</xsl:param> \
+  <xsl:param name="latex.hyperparam"/> \
+  <xsl:param name="latex.style">docbook</xsl:param> \
+  <xsl:param name="latex.biblio.output">all</xsl:param> \
+  <xsl:param name="latex.bibfiles">""</xsl:param> \
+  <xsl:param name="latex.bibwidelabel">WIDELABEL</xsl:param> \
+  <xsl:param name="latex.output.revhistory">0</xsl:param> \
+  <xsl:param name="latex.figure.position">[htbp]</xsl:param> \
+  <xsl:param name="latex.figure.boxed">0</xsl:param> \
+  <xsl:param name="latex.babel.use">1</xsl:param> \
+  <xsl:param name="latex.babel.language"></xsl:param> \
+  <xsl:param name="latex.class.options">twoside</xsl:param> \
+  <xsl:param name="biblioentry.item.separator">, </xsl:param> \
+  <xsl:param name="refentry.xref.manvolnum">1</xsl:param> \
+  <xsl:param name="refsynopsis.title">Synopsis</xsl:param> \
+  <xsl:param name="refnamediv.title"></xsl:param> \
+  <xsl:param name="funcsynopsis.style">ansi</xsl:param> \
+  <xsl:param name="funcsynopsis.decoration">1</xsl:param> \
+  <xsl:param name="function.parens">0</xsl:param> \
+  <xsl:param name="classsynopsis.default.language">java</xsl:param> \
+  <xsl:param name="show.comments">0</xsl:param> \
+</xsl:stylesheet>
+
+# for FO output
+FO_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
+                xmlns:fo="http://www.w3.org/1999/XSL/Format" \
+                version="1.0"> \
+  <xsl:import href="$(DOCBOOK_XSL)/fo/docbook.xsl"/> \
+  <xsl:param name="$(PDF_MAKER).extensions">1</xsl:param> \
+  <xsl:param name="paper.type">A4</xsl:param> \
+  <xsl:param name="draft.watermark.image"></xsl:param> \
+  <xsl:param name="hyphenation">false</xsl:param> \
+  <xsl:param name="hyphenate.verbatim">1</xsl:param> \
+  <xsl:param name="alignment">left</xsl:param> \
+  <xsl:param name="refentry.generate.name">1</xsl:param> \
+  <xsl:param name="refentry.generate.title">0</xsl:param> \
+  <xsl:param name="refentry.pagebreak">1</xsl:param> \
+  <xsl:param name="shade.verbatim">1</xsl:param> \
+  <xsl:param name="variablelist.as.blocks">1</xsl:param> \
+  <xsl:param name="ulink.show">1</xsl:param> \
+  <xsl:param name="ulink.footnotes">1</xsl:param> \
+  <xsl:param name="index.on.type">1</xsl:param> \
+  <xsl:attribute-set name="xref.properties"> \
+    <xsl:attribute name="color">blue</xsl:attribute> \
+  </xsl:attribute-set> \
+  <xsl:attribute-set name="shade.verbatim.style"> \
+    <xsl:attribute name="background-color">\#E0E0E0</xsl:attribute> \
+    <xsl:attribute name="padding-left">4pt</xsl:attribute> \
+    <xsl:attribute name="padding-right">4pt</xsl:attribute> \
+    <xsl:attribute name="padding-top">4pt</xsl:attribute> \
+    <xsl:attribute name="padding-bottom">4pt</xsl:attribute> \
+  </xsl:attribute-set> \
+  <xsl:attribute-set name="section.title.level1.properties"> \
+    <xsl:attribute name="font-size"> \
+      <xsl:value-of select="$$body.font.master * 1.5"></xsl:value-of> \
+      <xsl:text>pt</xsl:text> \
+    </xsl:attribute> \
+  </xsl:attribute-set> \
+  <xsl:attribute-set name="section.title.level2.properties"> \
+    <xsl:attribute name="font-size"> \
+      <xsl:value-of select="$$body.font.master * 1.3"></xsl:value-of> \
+      <xsl:text>pt</xsl:text> \
+    </xsl:attribute> \
+  </xsl:attribute-set> \
+  <xsl:attribute-set name="section.title.level3.properties"> \
+    <xsl:attribute name="font-size"> \
+      <xsl:value-of select="$$body.font.master * 1.1"></xsl:value-of> \
+      <xsl:text>pt</xsl:text> \
+    </xsl:attribute> \
+  </xsl:attribute-set> \
+  <xsl:attribute-set name="section.title.level4.properties"> \
+    <xsl:attribute name="font-size"> \
+      <xsl:value-of select="$$body.font.master"></xsl:value-of> \
+      <xsl:text>pt</xsl:text> \
+    </xsl:attribute> \
+  </xsl:attribute-set> \
+  <xsl:attribute-set name="component.title.properties"> \
+    <xsl:attribute name="font-size"> \
+      <xsl:value-of select="$$body.font.master * 1.5"></xsl:value-of> \
+      <xsl:text>pt</xsl:text> \
+    </xsl:attribute> \
+  </xsl:attribute-set> \
+  <xsl:attribute-set name="monospace.verbatim.properties"> \
+    <xsl:attribute name="wrap-option">wrap</xsl:attribute> \
+    <xsl:attribute name="hyphenation-character">\</xsl:attribute> \
+    <xsl:attribute name="font-size"> \
+      <xsl:value-of select="$$body.font.master * 0.8"></xsl:value-of> \
+      <xsl:text>pt</xsl:text> \
+    </xsl:attribute> \
+  </xsl:attribute-set> \
+</xsl:stylesheet>
+
+# for single-file (X)HTML outpout
+HTML_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
+                version="1.0"> \
+  <xsl:import href="$(DOCBOOK_XSL)/$(HTML_OR_XHTML)/docbook.xsl"/> \
+  <xsl:param name="gentext.custom">local.l10n.xml</xsl:param> \
+  <xsl:param name="local.l10n.xml" select="document($$gentext.custom)"/> \
+  <xsl:param name="refentry.generate.name">1</xsl:param> \
+  <xsl:param name="refentry.generate.title">0</xsl:param> \
+  <xsl:param name="root.filename"></xsl:param> \
+  <xsl:param name="variablelist.as.table">0</xsl:param> \
+  <xsl:param name="html.stylesheet">$(HTML_STYLESHEET)</xsl:param> \
+  <xsl:param name="admon.graphics">0</xsl:param> \
+  <xsl:param name="index.on.type">1</xsl:param> \
+</xsl:stylesheet>
+
+# for chunked (X)HTML output
+CHNK_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
+                version="1.0"> \
+  <xsl:import href="$(DOCBOOK_XSL)/$(HTML_OR_XHTML)/chunk.xsl"/> \
+  <xsl:param name="refentry.generate.name">0</xsl:param> \
+  <xsl:param name="refentry.generate.title">1</xsl:param> \
+  <xsl:param name="variablelist.as.table">0</xsl:param> \
+  <xsl:param name="html.stylesheet">$(HTML_STYLESHEET)</xsl:param> \
+  <xsl:param name="admon.graphics">1</xsl:param> \
+  <xsl:param name="admon.graphics.path">$(HTML_IMAGES)</xsl:param> \
+  <xsl:param name="admon.graphics.extension">$(HTML_IMAGES_EXT)</xsl:param> \
+  <xsl:param name="root.filename"></xsl:param> \
+  <xsl:param name="generate.manifest">1</xsl:param> \
+  <xsl:param name="use.id.as.filename">1</xsl:param> \
+  <xsl:param name="chunker.output.indent">yes</xsl:param> \
+  <xsl:param name="index.on.type">1</xsl:param> \
+</xsl:stylesheet>
+
+# for man-page output
+MAN_CUSTOM := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
+                version="1.0"> \
+  <xsl:import href="$(DOCBOOK_XSL)/manpages/docbook.xsl"/> \
+  <xsl:param name="man.output.manifest.enabled" select="1"/> \
+  <xsl:param name="man.output.in.separate.dir" select="1"/> \
+  <xsl:param name="man.output.base.dir">man/</xsl:param> \
+  <xsl:param name="man.output.subdirs.enabled" select="1"/> \
+</xsl:stylesheet>
+
+# -----------------------------------------------------------------
+#                  ** TARGETS START HERE ** 
+# -----------------------------------------------------------------
+#  prevents make from deleting, e.g. foo.1, after making foo.1.pdf
+#  and foo.1.txt from it.
+.PRECIOUS: %.1 %.2 %.3 %.4 %.5 %.6 %.7 %.8 %.9
+
+docbook: $(DOCBOOK_OUTPUT_FORMATS)
+
+man: $(LISTS_MAN)
+
+# we can generate PDFs from man pages
+man-pdf: man
+	$(MAKE) $(FILES_MANP)
+
+# we can generate plain text from man pages
+man-txt: man
+	$(MAKE) $(FILES_MANT)
+
+html: $(FILES_HTML)
+
+chunk: $(LISTS_HTML)
+
+txt: $(FILES_TXT)
+
+pdf: $(FILES_PDF)
+
+info: $(FILES_INFO)
+
+# use the "debug" target to echo variables, etc., to
+# test/troubleshoot changes you make to this makefile
+debug:
+	@echo $(DIRS_MAN)
+
+# -----------------------------------------------------------------
+#     pattern rule for making (X)HTML and plain-text output
+# -----------------------------------------------------------------
+%.html: %$(DOCBOOK_FILE_EXTENSION)
+	@echo '$(HTML_CUSTOM)' | $(XSLT) $(XSLT_FLAGS) $(HTML_PARAMS) - $< > $@
+
+%.txt: %.html
+	$(TXT_MAKER) $(TXT_MAKER_FLAGS) ./$< \
+	  | sed "s/^\(\s\+[0-9]\+\. \)file:\/\/.\+$$/\\1(local)/g" \
+	  | egrep -v '^	file:///.+$$' \
+	  > $@
+# if DOCBOOK_OUTPUT_FORMATS does not contain "html", then we need
+# to remove the "intermediate" HTML files we used for generating
+# plain-text output
+ifeq ($(findstring html,$(DOCBOOK_OUTPUT_FORMATS)),)
+	$(RM) $<
+endif
+
+# -----------------------------------------------------------------
+#     pattern rule for making chunked (X)HTML pages
+# -----------------------------------------------------------------
+%.$(HTML_MANIFEST_EXT): %$(DOCBOOK_FILE_EXTENSION)
+	@echo '$(CHNK_CUSTOM)' | $(XSLT) $(XSLT_FLAGS) $(HTML_PARAMS) \
+	--stringparam manifest $@  \
+	--stringparam base.dir $(basename $@)$(BASEDIR_SUFFIX)/  \
+	- $< 
+
+# -----------------------------------------------------------------
+#     pattern rules for making FO and PDF stuff
+# -----------------------------------------------------------------
+%.fo: %$(DOCBOOK_FILE_EXTENSION)
+	@echo '$(FO_CUSTOM)' \
+	  | $(XSLT) $(XSLT_FLAGS) $(FO_PARAMS) - $< > $@
+
+ifeq ($(PDF_MAKER),dblatex)
+%.pdf: %$(DOCBOOK_FILE_EXTENSION)
+	mkdir -p $(DOCBOOK_TMP)
+	echo '$(DBX_CUSTOM)' > $(DOCBOOK_TMP)/dblatex.xsl
+	-$(DBLATEX) $(DBLATEX_FLAGS)\
+	  -p $(DOCBOOK_TMP)/dblatex.xsl \
+	  -o $@ \
+	  $<
+	$(RM) -r $(DOCBOOK_TMP)
+endif
+
+%.pdf: %.fo
+ifeq ($(PDF_MAKER),)
+	$(error No PDF_MAKER specified. Cannot make pdf)
+else
+ifeq ($(PDF_MAKER),xep)
+	$(XEP) $(XEP_FLAGS) $< $@
+else
+ifeq ($(PDF_MAKER),fop)
+	$(FOP) $(FOP_FLAGS) $< $@
+else
+ifeq ($(PDF_MAKER),xmlroff)
+	$(XMLROFF) $(XMLROFF_FLAGS) $< -o $@
+else
+ifeq ($(PDF_MAKER),passivetex)
+	$(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $<
+	@if [ `egrep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \
+		$(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< ; \
+	fi
+	@if [ `egrep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \
+		$(PDFTEX) $(PDFTEX_FLAGS) &$(PDFXMLTEX) $< ; \
+	fi
+	$(RM) $(basename $@).log
+	$(RM) $(basename $@).aux
+	$(RM) $(basename $@).out
+else
+	$(error I do not know how to make a PDF using "$(PDF_MAKER)")
+endif
+endif
+endif
+endif
+endif
+
+# -----------------------------------------------------------------
+#     pattern rules for making TeXinfo stuff
+# -----------------------------------------------------------------
+%.txml: %$(DOCBOOK_FILE_EXTENSION)
+	$(DB2X_XSLTPROC) $(DB2X_XSLTPROC_FLAGS) -s texi -o $@ $<
+
+%.texi: %.txml
+	$(DB2X_TEXIXML) $(DB2X_TEXIXML_FLAGS) $<
+
+# the following is actually a built-in rule, but it's redefined
+# here just for the sake of clarity
+%.info: %.texi
+	$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@
+
+# -----------------------------------------------------------------
+#     pattern rule for making man pages
+# -----------------------------------------------------------------
+%.$(MAN_MANIFEST_EXT): %$(DOCBOOK_FILE_EXTENSION)
+	@if [ "$(strip $(shell echo '$(REFENTRY_CHECK)' | $(XSLT) $(XSLT_FLAGS) - $<))" != "true" ]; then \
+	  touch $@; \
+	else \
+	  echo '$(MAN_CUSTOM)' \
+	  | $(XSLT) $(XSLT_FLAGS) $(MAN_PARAMS) \
+	    --stringparam man.output.manifest.filename $@ \
+	    - $<; \
+	fi
+
+# -----------------------------------------------------------------
+#  pattern rule for enabling direct "make foo.1" to work
+# -----------------------------------------------------------------
+
+%.1 %.2 %.3 %.4 %.5 %.6 %.7: %.xml
+	$(MAKE) $(basename $<).$(MAN_MANIFEST_EXT)
+
+# -----------------------------------------------------------------
+#  pattern rules for making Postscript/PDF output from man pages
+# -----------------------------------------------------------------
+%.1.ps: %.1
+	$(MAN) -l $(MAN_FLAGS) -Tps $< > $@
+
+%.2.ps: %.2
+	$(MAN) -l $(MAN_FLAGS) -Tps $< > $@
+
+%.3.ps: %.3
+	$(MAN) -l $(MAN_FLAGS) -Tps $< > $@
+
+%.4.ps: %.4
+	$(MAN) -l $(MAN_FLAGS) -Tps $< > $@
+
+%.5.ps: %.5
+	$(MAN) -l $(MAN_FLAGS) -Tps $< > $@
+
+%.6.ps: %.6
+	$(MAN) -l $(MAN_FLAGS) -Tps $< > $@
+
+%.7.ps: %.7
+	$(MAN) -l $(MAN_FLAGS) -Tps $< > $@
+
+%.8.ps: %.8
+	$(MAN) -l $(MAN_FLAGS) -Tps $< > $@
+
+%.9.ps: %.9
+	$(MAN) -l $(MAN_FLAGS) -Tps $< > $@
+
+# -----------------------------------------------------------------
+#  pattern rule for converting Postscript to PDF
+# -----------------------------------------------------------------
+%.pdf: %.ps
+	$(PS2PDF) $(PS2PDF_FLAGS) $<
+
+# -----------------------------------------------------------------
+#  pattern rules for making plain-text output from man pages
+# -----------------------------------------------------------------
+%.1.txt: %.1
+	$(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@
+
+%.2.txt: %.2
+	$(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@
+
+%.3.txt: %.3
+	$(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@
+
+%.4.txt: %.4
+	$(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@
+
+%.5.txt: %.5
+	$(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@
+
+%.6.txt: %.6
+	$(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@
+
+%.7.txt: %.7
+	$(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@
+
+%.8.txt: %.8
+	$(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@
+
+%.9.txt: %.9
+	$(MAN) -l $(MAN_FLAGS) -Tascii $< | $(COL) -b $(COL_FLAGS) | $(EXPAND) $(EXPAND_FLAGS) > $@
+
+# -----------------------------------------------------------------
+#   target(s) for cleaning up the mess
+# -----------------------------------------------------------------
+clean:
+ifneq ($(FILES_TXT),)
+	$(RM) $(FILES_TXT)
+endif
+ifneq ($(FILES_PDF),)
+	$(RM) $(FILES_PDF)
+endif
+ifneq ($(FILES_FO),)
+	$(RM) $(FILES_FO)
+endif
+ifneq ($(FILES_LOG),)
+	$(RM) $(FILES_LOG)
+endif
+ifneq ($(FILES_OUT),)
+	$(RM) $(FILES_OUT)
+endif
+ifneq ($(FILES_AUX),)
+	$(RM) $(FILES_AUX)
+endif
+ifneq ($(FILES_HTML),)
+	$(RM) $(FILES_HTML)
+endif
+ifneq ($(FILES_CHNK),)
+	$(RM) $(FILES_CHNK)
+endif
+ifneq ($(FILES_MAN),)
+	$(RM) $(FILES_MAN)
+endif
+ifneq ($(FILES_MANT),)
+	$(RM) $(FILES_MANT)
+endif
+ifneq ($(FILES_MANP),)
+	$(RM) $(FILES_MANP)
+endif
+ifneq ($(FILES_INFO),)
+	$(RM) $(FILES_INFO)
+endif
+ifneq ($(DIRS_CHUNK),)
+	for dir in $(DIRS_CHUNK); do \
+	  if [ -d "$$dir" ]; then \
+	    $(RMDIR) $(RMDIR_FLAGS) $$dir; \
+	  fi \
+	done
+endif
+ifneq ($(DIRS_MAN),)
+ifneq ($(DIRS_MAN),.)
+	for dir in $(DIRS_MAN); do \
+	  if [ -d "$$dir" ]; then \
+	    $(RMDIR) $(RMDIR_FLAGS) $$dir; \
+	  fi \
+	done
+endif
+endif
+ifneq ($(LISTS_MAN),)
+	$(RM) $(LISTS_MAN)
+endif
+ifneq ($(LISTS_HTML),)
+	$(RM) $(LISTS_HTML)
+endif
--- mailscanner-4.74.16.orig/debian/man/MailScanner.xml
+++ mailscanner-4.74.16/debian/man/MailScanner.xml
@@ -0,0 +1,258 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<?xml-stylesheet type="text/xsl"
+	href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+	"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Simon</firstname>">
+  <!ENTITY dhsurname   "<surname>Walter</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>09.12.2006</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>simon.walter@hp-factory.de</email>">
+  <!ENTITY dhusername  "Simon Walter">
+  <!ENTITY dhucpackage "<refentrytitle>MailScanner</refentrytitle>">
+  <!ENTITY dhpackage   "MailScanner">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2006</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose> a email virus scanner and spam tagger.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+      <arg><replaceable>options</replaceable></arg>
+			<!-- arg>-value=<replaceable>optionname</replaceable>
+				<group>
+					<arg>-from=<replaceable>from-address</replaceable></arg><sbr/>
+					<arg rep="repeat">-to=<replaceable>to-address</replaceable></arg><sbr/>
+					<arg>-ip=<replaceable>ip-address</replaceable></arg>
+					<arg>-virus=<replaceable>virus-name</replaceable></arg>
+					</group>
+			</arg -->
+			<arg><replaceable>configfile</replaceable></arg>
+
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> options.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.</para>
+
+    <para><command>&dhpackage;</command> is a freely distributable
+    E-Mail gateway virus scanner and spam detector. It uses sendmail
+    or Exim as its basis, and a choice of free/commercial virus
+    scanning engines to do the actual virus scanning. It can decode
+    and scan attachments intended solely for Microsoft Outlook users
+    (MS-TNEF). If possible, it will disinfect infected documents and
+    deliver them automatically. It also has features which protect it
+    against Denial Of Service attacks.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <para>A summary of options is included below.</para>
+
+    <variablelist>
+      <varlistentry>
+	<term>
+					<option>-h</option>
+					<option>-H</option>
+					<option>-help</option>
+	</term>
+	<listitem>
+	  <para>Show summary of options.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term>
+					<option>-v</option>
+					<option>-V</option>
+					<option>-version</option>
+					<option>-Version</option>
+	</term>
+	<listitem>
+	  <para>Show version of program and the perl libraries used.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term><option>-lint</option>
+	</term>
+	<listitem>
+	  <para>Test the configuration and report errors.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term>
+					<option>-c</option>
+					<option>-C</option>
+					<option>-changed</option>
+	</term>
+	<listitem>
+					<para>Show all values in the configuration which differ
+					from the hardcoded defaults.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term>
+					<option>-debug</option>
+	</term>
+	<listitem>
+	  <para>Run MailScanner in debug-mode. In debug-mode
+	  MailScanner doesn't spawn childrens and produce a lot of
+	  output. Can be compined with -debug-sa.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term>
+					<option>-debug-sa</option>
+	</term>
+	<listitem>
+	  <para>Run the spamassassine module inside MailScanner in
+	  debug-mode. Warning: This option doesn't stop MailScanner
+	  from spawning childrens! Can be compined with -debug.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term>
+					<option>-value=optionname</option>
+	</term>
+	<listitem>
+	  <para>Name of the option/rule against which the values of
+	  -to, -from, -ip or/and -virus are tested.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term>
+					<option>-from=from-address</option>
+	</term>
+	<listitem>
+	  <para>From-address to test the option/rule specified by
+	  -value. Can be any part of a mailaddress.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term>
+					<option>-to=to-address</option>
+	</term>
+	<listitem>
+	  <para>To-address to test the option/rule specified by
+	  -value. Can be used multiple times.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term>
+					<option>-ip=ip-address</option>
+	</term>
+	<listitem>
+	  <para>IP-address to test the option/rule specified by
+	  -value.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term>
+					<option>-virus=virus-name</option>
+	</term>
+	<listitem>
+	  <para>Name of the virus to test the option/rule specified by
+	  -value.</para>
+	</listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+	<refsect1>
+		<title>EXAMPLES</title>
+
+		<variablelist>
+			<varlistentry>
+				<term><command>&dhpackage; -debug -debug-sa</command></term>
+				<listitem><para>Starts MailScanner in full debug-mode.</para></listitem>
+			</varlistentry>
+			<varlistentry>
+				<term><command>&dhpackage; -value=&quot;Is Definitely Not Spam&quot; --from=foo@bar.org</command></term>
+				<listitem>
+					<para>Test if mails from foo@bar.org are matched by
+						the rule for the option &quot;Is Definitely Not Spam.&quot;
+						(aka. whitelist). Output:</para>
+					<screen>
+Looked up internal option name &quot;spamwhitelist&quot;
+With sender = foo@bar.org
+Client IP =
+Virus =
+Result is &quot;1&quot;
+
+0=No 1=Yes
+					</screen>
+				</listitem>
+			</varlistentry>
+		</variablelist>
+
+	</refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <variablelist>
+      <varlistentry>
+				<term>
+					<citerefentry><refentrytitle>df2mbox</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+					<citerefentry><refentrytitle>d2mbox</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+					<citerefentry><refentrytitle>update_phising_sites</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+					<citerefentry><refentrytitle>update_virus_scanners</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+					<citerefentry><refentrytitle>upgrade_MailScanner_conf</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+					<filename>/usr/share/doc/mailscanner/html/MailScanner.conf.index.html</filename>
+				</term>
+			</varlistentry>
+		</variablelist>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
--- mailscanner-4.74.16.orig/debian/man/combine.xsl
+++ mailscanner-4.74.16/debian/man/combine.xsl
@@ -0,0 +1 @@
+<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:xi="http://www.w3.org/2001/XInclude" exclude-result-prefixes="exsl xi" extension-element-prefixes="exsl" version="1.0"> <xsl:param name="files"/> <xsl:param name="chunk.size"/> <xsl:template match="/"> <xsl:call-template name="make.file"/> </xsl:template> <xsl:template name="make.file"> <xsl:param name="count" select="1"/> <xsl:param name="current.files" select="concat(normalize-space($files), ' ')"/> <xsl:param name="more.files" select="concat(normalize-space(substring-after($current.files, ' ')),' ')"/> <xsl:param name="file.number" select="1"/> <xsl:param name="filename" select="concat('./build/',$file.number,'.xml')"/> <xsl:choose> <xsl:when test="$more.files = ' '"/> <xsl:when test="$count mod $chunk.size = 0"> <xsl:variable name="fileset" select="concat($current.files, ' ', substring-before($more.files, ' '))"/> <exsl:document href="{$filename}" method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" media-type="" standalone="no"> <reference> <title>Combined contents</title> <xsl:call-template name="make.xinclude"> <xsl:with-param name="file"> <xsl:choose> <xsl:when test="contains($fileset, ' ')"> <xsl:value-of select="normalize-space(substring-before($fileset, ' '))"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$fileset"/> </xsl:otherwise> </xsl:choose> </xsl:with-param> <xsl:with-param name="remaining.files" select="concat(normalize-space(substring-after($fileset, ' ')),' ')"/> </xsl:call-template> </reference> </exsl:document> <xsl:call-template name="make.file"> <xsl:with-param name="count" select="1"/> <xsl:with-param name="current.files" select="$more.files"/> <xsl:with-param name="file.number" select="number($file.number) + 1"/> <xsl:with-param name="filename" select="concat('./build/',$file.number,'.xml')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="make.file"> <xsl:with-param name="count" select="$count + 1"/> <xsl:with-param name="current.files"> <xsl:choose> <xsl:when test="$count = 1 and $file.number = 1"> <xsl:value-of select="concat(substring-before($current.files, ' '), ' ', substring-before($more.files, ' '))"/> </xsl:when> <xsl:when test="$count = 1"> <xsl:value-of select="substring-before($more.files, ' ')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat($current.files, ' ', substring-before($more.files, ' '))"/> </xsl:otherwise> </xsl:choose> </xsl:with-param> <xsl:with-param name="more.files" select="substring-after($more.files, ' ')"/> <xsl:with-param name="file.number" select="$file.number"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="make.xinclude"> <xsl:param name="file"/> <xsl:param name="remaining.files"/> <xsl:param name="count" select="1"/> <xsl:if test="not($file = '')"> <xi:include href="../{$file}"/> <xsl:call-template name="make.xinclude"> <xsl:with-param name="file" select="substring-before($remaining.files, ' ')"/> <xsl:with-param name="remaining.files" select="substring-after($remaining.files, ' ')"/> <xsl:with-param name="count" select="$count + 1"/> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet>
--- mailscanner-4.74.16.orig/debian/man/update_phishing_sites.xml
+++ mailscanner-4.74.16/debian/man/update_phishing_sites.xml
@@ -0,0 +1,115 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+	$(XP) $(DB2MAN) $<
+
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Simon</firstname>">
+  <!ENTITY dhsurname   "<surname>Walter</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>09.12.2006</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>simon.walter@hp-factory.de</email>">
+  <!ENTITY dhusername  "Simon Walter">
+  <!ENTITY dhucpackage "<refentrytitle>update_phishing_sites</refentrytitle>">
+  <!ENTITY dhpackage   "update_phishing_sites">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2006</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose> a script to update the list of phishing safe urls used by MailScanner.</refpurpose>
+  </refnamediv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.</para>
+
+    <para><command>&dhpackage;</command> is helper script for
+    MailScanner, a freely distributable E-Mail gateway virus scanner
+    and spam detector. &dhpackage; downloads the newest definition of
+    phishing safe sites and merge it with the existing.</para>
+
+		<para>The new definition is downloaded
+		from <uri>http://www.mailscanner.info/phishing.safe.sites.conf.master</uri></para>
+
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <variablelist>
+      <varlistentry>
+				<term>
+					<citerefentry><refentrytitle>MailScanner</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+					<filename>/etc/MailScanner/phishing.safe.sites.conf</filename>
+				</term>
+			</varlistentry>
+		</variablelist>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
--- mailscanner-4.74.16.orig/debian/man/mailscanner_create_locks.xml
+++ mailscanner-4.74.16/debian/man/mailscanner_create_locks.xml
@@ -0,0 +1,119 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+	$(XP) $(DB2MAN) $<
+
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Simon</firstname>">
+  <!ENTITY dhsurname   "<surname>Walter</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>14.01.2009</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>simon.walter@hp-factory.de</email>">
+  <!ENTITY dhusername  "Simon Walter">
+  <!ENTITY dhucpackage "<refentrytitle>mailscanner_create_locks</refentrytitle>">
+  <!ENTITY dhpackage   "mailscanner_create_locks">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2006</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose> a script to create the lockfile used by MailScanner.</refpurpose>
+  </refnamediv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> options.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.</para>
+
+    <para><command>&dhpackage;</command> is helper script for
+    MailScanner, a freely distributable E-Mail gateway virus scanner
+    and spam detector. &dhpackage; the locksfiles for MailScanner and
+    ensures they are no symlinks and have the right ownership and
+    permission.</para>
+
+		<para>The directory for the lockfiles is configured
+		in <filename>/etc/MailScanner/MailScanner.conf</filename>.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <variablelist>
+      <varlistentry>
+				<term>
+					<citerefentry><refentrytitle>MailScanner</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+					<filename>/etc/MailScanner/MailScanner.conf</filename>
+				</term>
+			</varlistentry>
+		</variablelist>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
--- mailscanner-4.74.16.orig/debian/man/d2mbox.xml
+++ mailscanner-4.74.16/debian/man/d2mbox.xml
@@ -0,0 +1,126 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+	$(XP) $(DB2MAN) $<
+
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Simon</firstname>">
+  <!ENTITY dhsurname   "<surname>Walter</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>09.12.2006</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>simon.walter@hp-factory.de</email>">
+  <!ENTITY dhusername  "Simon Walter">
+  <!ENTITY dhucpackage "<refentrytitle>d2mbox</refentrytitle>">
+  <!ENTITY dhpackage   "d2mbox">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2006</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose> a script to create an mbox format file from
+    MailScanners quarantine directory when using exim as MTA.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option><replaceable>directories</replaceable></option></arg>
+
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> options.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.</para>
+
+    <para><command>&dhpackage;</command> is a helper script for
+    MailScanner, a freely distributable E-Mail gateway virus scanner
+    and spam detector. &dhpackage; convert all exim queue files into
+    one mbox file for each directory given as parameter. The resulting
+    mbox files are placed in the current directory an named
+    spam.&lt;dir&gt;.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <variablelist>
+      <varlistentry>
+				<term>
+					<citerefentry><refentrytitle>d2mbox</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+					<citerefentry><refentrytitle>MailScanner</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+				</term>
+			</varlistentry>
+		</variablelist>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
--- mailscanner-4.74.16.orig/debian/man/df2mbox.xml
+++ mailscanner-4.74.16/debian/man/df2mbox.xml
@@ -0,0 +1,126 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+	$(XP) $(DB2MAN) $<
+
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Simon</firstname>">
+  <!ENTITY dhsurname   "<surname>Walter</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>09.12.2006</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>simon.walter@hp-factory.de</email>">
+  <!ENTITY dhusername  "Simon Walter">
+  <!ENTITY dhucpackage "<refentrytitle>df2mbox</refentrytitle>">
+  <!ENTITY dhpackage   "df2mbox">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2006</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose> a script to create an mbox format file from
+    MailScanners quarantine directory when using sendmail as MTA.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option><replaceable>directories</replaceable></option></arg>
+
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> options.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.</para>
+
+    <para><command>&dhpackage;</command> is a helper script for
+    MailScanner, a freely distributable E-Mail gateway virus scanner
+    and spam detector. &dhpackage; convert all exim queue files into
+    one mbox file for each directory given as parameter. The resulting
+    mbox files are placed in the current directory an named
+    spam.&lt;dir&gt;.</para>
+
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <variablelist>
+      <varlistentry>
+				<term>
+					<citerefentry><refentrytitle>d2mbox</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+					<citerefentry><refentrytitle>MailScanner</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+				</term>
+			</varlistentry>
+		</variablelist>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
