File qmail-vacation-multiline.patch of Package qmail-vacation

diff -rU3 qmail-vacation-v1.4m.orig/vacation qmail-vacation-v1.4m/vacation
--- qmail-vacation-v1.4m.orig/vacation	2003-06-30 21:19:04.000000000 +0200
+++ qmail-vacation-v1.4m/vacation	2011-04-27 13:21:45.000000000 +0200
@@ -547,8 +547,6 @@
 
     $header =~ s/\n\s+/ /g;	# Join continuation lines
 
-    $* = 1;			# Multi line matching within a string
-
    #This is used to check for spam ... a copy of the message is placed int /tmp
    #and it is deleted before this script finishes.
     
@@ -566,27 +564,27 @@
 
    #it appears that if you add header checks (exit if exist) they
    #go here :) -- @
-    exit(0) if ($header =~ /^Precedence:\s+(bulk|junk)/i);
-    exit(0) if ($header =~ /^From.*-REQUEST\@/i);
-    exit(0) if ($header =~ /^Mailing-List:/i);
+    exit(0) if ($header =~ /^Precedence:\s+(bulk|junk)/mi);
+    exit(0) if ($header =~ /^From.*-REQUEST\@/mi);
+    exit(0) if ($header =~ /^Mailing-List:/mi);
 
     if ($check_to_and_cc)
     {
-	($to) = ($header =~ /To:\s+(.*)/i);
-	($cc) = ($header =~ /Cc:\s+(.*)/i);
+	($to) = ($header =~ /To:\s+(.*)/mi);
+	($cc) = ($header =~ /Cc:\s+(.*)/mi);
 	$to .= ', ' . $cc if $cc;
 	$to = lc($to);
 
 	for (@aliases)
 	{
-	    ++$alias_match if $to =~ /\b$_\b/;
+	    ++$alias_match if $to =~ /\b$_\b/m;
 	}
 
 	exit(0) unless $alias_match;
     }
 
-    ($subject) = ($header =~ /^Subject:\s+(.*)/);
-    $subject =~ s/\s*$//;		# Remove trailing spaces
+    ($subject) = ($header =~ /^Subject:\s+(.*)/m);
+    $subject =~ s/\s*$//m;		# Remove trailing spaces
 
     $subject = "(No subject)" unless $subject;
 }
openSUSE Build Service is sponsored by