Tweak to for Debian distro's and CustomFunctions. Resending

James A. Pattie james at SUDORA.COM
Mon Feb 21 19:08:23 GMT 2005

    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Hash: SHA1

Hi guys,

        Resending since it doesn't seem Julian saw this and the change is still needed
for Debian based distros.

        I just recently updated a CustomFunction application I've debianized
and was wondering why the old code was still being run.  Turns out that
even though I said to replace the
/etc/MailScanner/CustomFunctions/ file (not really the
real name) with the new one, dpkg left a file
around which MailScanner was happily sourcing in and running, instead of
the newer code.

        I updated the exclusion check in to ignore the
.dpkg-{old,new,dist} extensions so this doesn't happen in the future.

        Please review and apply the attached patch.

- --
James A. Pattie
james at

Linux -- SysAdmin / Programmer
Sudora, LLC

GPG Key Available at
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ ( and
the archives (

Support MailScanner development - buy the book off the website!

    [ Part 2: "Attached Text" ]

---   2004-10-21 14:03:00.000000000 -0500
+++       2004-12-06 15:12:02.000000000 -0600
@@ -544,7 +544,7 @@

   while(defined($filename = $dirh->read)) {
     # Skip all dot files and rpmnew files
-    next if $filename =~ /^\./ || $filename =~ /\.rpmnew$/i;
+    next if $filename =~ /^\./ || $filename =~ /\.(rpmnew|dpkg-dist|dpkg-new|dpkg-old)$/i;
     $fullfile = "$dir/$filename";
     next unless -f $fullfile and -s $fullfile;
     eval { require $fullfile; };

More information about the MailScanner mailing list