/[smecontribs]/rpms/smeserver-vacation/contribs9/smeserver-vacation-1.1-multiline_matching.patch
ViewVC logotype

Annotation of /rpms/smeserver-vacation/contribs9/smeserver-vacation-1.1-multiline_matching.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Wed Dec 24 09:08:46 2014 UTC (9 years, 10 months ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-vacation-1_1-6_el6_sme, smeserver-vacation-1_1-14_el6_sme, smeserver-vacation-1_1-9_el6_sme, smeserver-vacation-1_1-13_el6_sme, smeserver-vacation-1_1-23_el6_sme, smeserver-vacation-1_1-22_el6_sme, smeserver-vacation-1_1-21_el6_sme, smeserver-vacation-1_1-17_el6_sme, smeserver-vacation-1_1-26_el6_sme, smeserver-vacation-1_1-18_el6_sme, smeserver-vacation-1_1-4_el6_sme, smeserver-vacation-1_1-24_el6_sme, smeserver-vacation-1_1-25_el6_sme, smeserver-vacation-1_1-7_el6_sme, smeserver-vacation-1_1-3_el6_sme, smeserver-vacation-1_1-8_el6_sme, smeserver-vacation-1_1-15_el6_sme, smeserver-vacation-1_1-10_el6_sme, smeserver-vacation-1_1-5_el6_sme, smeserver-vacation-1_1-20_el6_sme, smeserver-vacation-1_1-16_el6_sme, smeserver-vacation-1_1-12_el6_sme, smeserver-vacation-1_1-19_el6_sme, HEAD
*  Wed Dec 24 2014 Daniel Berteaud <daniel@firewall-services.com> 1.1-3.sme
- Fix multiline matching [SME: 8741]

1 vip-ire 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     }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed