patch-bin_MailScanner 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. $OpenBSD: patch-bin_MailScanner,v 1.11 2015/04/09 19:55:09 sthen Exp $
  2. --- bin/MailScanner.orig Wed Feb 25 06:38:27 2015
  3. +++ bin/MailScanner Fri Mar 13 03:49:09 2015
  4. @@ -1,4 +1,4 @@
  5. -#!/usr/bin/perl -U -I/opt/MailScanner/lib
  6. +#!/usr/bin/perl -U -I%PREFIX%/lib/MailScanner
  7. #
  8. # MailScanner - SMTP E-Mail Virus Scanner
  9. # Copyright (C) 2002 Julian Field
  10. @@ -73,7 +73,7 @@ BEGIN {
  11. # of each element
  12. foreach $path (reverse @oldinc) {
  13. next unless $path =~ /\//;
  14. - $path =~ s/^\/usr/\/usr\/lib\/MailScanner\/utils/;
  15. + $path =~ s/^\/usr/\/usr\/local\/lib\/MailScanner\/utils/;
  16. unshift @INC, $path;
  17. }
  18. @@ -210,8 +210,6 @@ if ($Versions) {
  19. my($module, $s, $v, $m);
  20. printf("Running on\n%s", `uname -a`);
  21. - printf("This is %s", `cat /etc/redhat-release`) if -f "/etc/redhat-release";
  22. - printf("This is %s", `head -1 /etc/SuSE-release`) if -f "/etc/SuSE-release";
  23. printf("This is Perl version %f (%vd)\n", $], $^V);
  24. print "\nThis is MailScanner version " . $MailScanner::Config::MailScannerVersion . "\n";
  25. print "Module versions are:\n";
  26. @@ -281,7 +279,7 @@ if ($WantLintOnly || $WantLintLiteOnly) {
  27. # Find the mailscanner.conf file, with a default just in case.
  28. my $ConfFile = $ARGV[0];
  29. # Use the default if we couldn't find theirs. Will save a lot of grief.
  30. -$ConfFile = '/opt/MailScanner/etc/MailScanner.conf' if $ConfFile eq "" ||
  31. +$ConfFile = '%SYSCONFDIR%/MailScanner/MailScanner.conf' if $ConfFile eq "" ||
  32. !(-f $ConfFile);
  33. # Tell ConfigSQL where the configuration file is.
  34. $MailScanner::ConfigSQL::ConfFile = $ConfFile;
  35. @@ -338,7 +336,7 @@ if (MailScanner::Config::QuickPeek($ConfFile, 'virussc
  36. Currently you are using no virus scanners.
  37. This is probably not what you want.
  38. -In your /opt/MailScanner/etc/MailScanner.conf file, set
  39. +In your %SYSCONFDIR%/MailScanner/MailScanner.conf file, set
  40. Virus Scanners = clamav
  41. Then download
  42. http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/install-Clam-SA.tar.gz
  43. @@ -425,7 +423,7 @@ if ($WantLintOnly || $WantLintLiteOnly) {
  44. }
  45. my $cluid = MailScanner::Config::QuickPeek($ConfFile, 'runasuser');
  46. my $clgid = MailScanner::Config::QuickPeek($ConfFile, 'runasgroup');
  47. - my $clr = system("/opt/MailScanner/bin/mailscanner_create_locks \"$lockdir\" \"$cluid\" \"$clgid\"");
  48. + my $clr = system("%PREFIX%/bin/mailscanner_create_locks \"$lockdir\" \"$cluid\" \"$clgid\"");
  49. print STDERR "Error: Attempt to create locks in $lockdir failed!\n"
  50. if ($clr>>8) != 0;
  51. @@ -722,7 +720,7 @@ if ($locksdir eq "" || $locksdir =~ /tmp$/i) {
  52. print STDERR "Please move your \"Lockfile Dir\" setting in MailScanner.conf.\n";
  53. print STDERR "It should point outside /tmp, preferably /var/spool/MailScanner/incoming/Locks\n";
  54. }
  55. -my $cl = system("/opt/MailScanner/bin/mailscanner_create_locks \"$locksdir\" \"$uname\" \"$gname\"");
  56. +my $cl = system("%PREFIX%/bin/mailscanner_create_locks \"$locksdir\" \"$uname\" \"$gname\"");
  57. print STDERR "Error: Attempt to create locks in $locksdir failed!\n"
  58. if ($cl>>8) != 0;