1 |
brianr |
1.1 |
diff -Nur smeserver-vacation-1.1/root/usr/local/bin/vacation smeserver-vacation-1.1_bz8742/root/usr/local/bin/vacation |
2 |
|
|
--- smeserver-vacation-1.1/root/usr/local/bin/vacation 2014-12-24 10:04:10.100000000 +0100 |
3 |
|
|
+++ smeserver-vacation-1.1_bz8742/root/usr/local/bin/vacation 2014-12-24 10:06:32.588000000 +0100 |
4 |
|
|
@@ -413,30 +413,28 @@ |
5 |
|
|
$header = <STDIN>; |
6 |
|
|
$header =~ s/\n\s+/ /g; # Join continuation lines |
7 |
|
|
|
8 |
|
|
- $* = 1; # Multi line matching within a string |
9 |
|
|
- |
10 |
|
|
- exit(0) if ($header =~ /^Precedence:\s+(bulk|junk|list)/i); |
11 |
|
|
- exit(0) if ($header =~ /^From.*-REQUEST\@/i); |
12 |
|
|
- exit(0) if ($header =~ /^Mailing-List:/i); |
13 |
|
|
- exit(0) if ($header =~ /^X-Spam-Status:\s+Yes/i); |
14 |
|
|
+ exit(0) if ($header =~ /^Precedence:\s+(bulk|junk|list)/im); |
15 |
|
|
+ exit(0) if ($header =~ /^From.*-REQUEST\@/im); |
16 |
|
|
+ exit(0) if ($header =~ /^Mailing-List:/im); |
17 |
|
|
+ exit(0) if ($header =~ /^X-Spam-Status:\s+Yes/im); |
18 |
|
|
|
19 |
|
|
if ($check_to_and_cc) |
20 |
|
|
{ |
21 |
|
|
- ($to) = ($header =~ /To:\s+(.*)/i); |
22 |
|
|
- ($cc) = ($header =~ /Cc:\s+(.*)/i); |
23 |
|
|
+ ($to) = ($header =~ /To:\s+(.*)/im); |
24 |
|
|
+ ($cc) = ($header =~ /Cc:\s+(.*)/im); |
25 |
|
|
$to .= ', ' . $cc if $cc; |
26 |
|
|
$to = lc($to); |
27 |
|
|
|
28 |
|
|
for (@aliases) |
29 |
|
|
{ |
30 |
|
|
- ++$alias_match if $to =~ /\b$_\b/; |
31 |
|
|
+ ++$alias_match if $to =~ /\b$_\b/im; |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
exit(0) unless $alias_match; |
35 |
|
|
} |
36 |
|
|
|
37 |
|
|
- ($subject) = ($header =~ /^Subject:\s+(.*)/); |
38 |
|
|
- $subject =~ s/\s*$//; # Remove trailing spaces |
39 |
|
|
+ ($subject) = ($header =~ /^Subject:\s+(.*)/m); |
40 |
|
|
+ $subject =~ s/\s*$//m; # Remove trailing spaces |
41 |
|
|
|
42 |
|
|
$subject = "(No subject)" unless $subject; |
43 |
|
|
} |