openbsd-ports/mail/mailscanner/patches/patch-bin_MailScanner
sthen 7eb95b50f0 update to 4.69.9-1 and fix typo in @sample line
(spam.assasin.prefs.conf -> spam.assassin.prefs.conf)

from brad, ok todd (maintainer)
2008-05-16 16:38:36 +00:00

58 lines
2.4 KiB
Plaintext

$OpenBSD: patch-bin_MailScanner,v 1.4 2008/05/16 16:38:36 sthen Exp $
--- bin/MailScanner.orig Thu May 1 04:33:27 2008
+++ bin/MailScanner Fri May 2 18:36:15 2008
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -I/opt/MailScanner/lib
+#!/usr/bin/perl -I%PREFIX%/lib/MailScanner
#
# MailScanner - SMTP E-Mail Virus Scanner
# Copyright (C) 2002 Julian Field
@@ -48,7 +48,7 @@ BEGIN {
# of each element
foreach $path (reverse @oldinc) {
next unless $path =~ /\//;
- $path =~ s/^\/usr/\/usr\/lib\/MailScanner\/utils/;
+ $path =~ s/^\/usr/\/usr\/local\/lib\/MailScanner\/utils/;
unshift @INC, $path;
}
@@ -177,8 +177,6 @@ if ($Versions) {
my($module, $s, $v, $m);
printf("Running on\n%s", `uname -a`);
- printf("This is %s", `cat /etc/redhat-release`) if -f "/etc/redhat-release";
- printf("This is %s", `head -1 /etc/SuSE-release`) if -f "/etc/SuSE-release";
printf("This is Perl version %f (%vd)\n", $], $^V);
print "\nThis is MailScanner version " . $MailScanner::Config::MailScannerVersion . "\n";
print "Module versions are:\n";
@@ -205,9 +203,10 @@ $Debug = 1 if $DebugSpamAssassin;
# Check version of MIME-tools against its requirements
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) {
+ if ($IO::VERSION<1.22) {
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";
$error = 1;
}
@@ -248,7 +247,7 @@ if ($WantLintOnly || $WantLintLiteOnly) {
# 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 = '%SYSCONFDIR%/MailScanner/MailScanner.conf' if $ConfFile eq "" ||
!(-f $ConfFile);
# Check the MailScanner version number against what is in MailScanner.conf
@@ -293,7 +292,7 @@ if (MailScanner::Config::QuickPeek($ConfFile, 'virussc
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 %SYSCONFDIR%/MailScanner.conf file, set
Virus Scanners = clamav
Then download
http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/install-Clam-SA.tar.gz