From c8ed2ffddf05f571546cbf5b66f1b665d8c0c2ef Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Thu, 4 Oct 2007 07:34:10 +0000 Subject: [PATCH] vacation.pl: patch from kope (via forum post at http://sourceforge.net/forum/forum.php?thread_id=1837942&forum_id=676076) - Thankyou git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@127 a1433add-5e2c-0410-b055-b7f2511e0802 --- VIRTUAL_VACATION/vacation.pl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/VIRTUAL_VACATION/vacation.pl b/VIRTUAL_VACATION/vacation.pl index 026a82ee..6392bd9a 100644 --- a/VIRTUAL_VACATION/vacation.pl +++ b/VIRTUAL_VACATION/vacation.pl @@ -315,13 +315,15 @@ $subject=''; # Take headers apart while () { last if (/^$/); - if (/^\s+(.*)/ and $lastheader) { $$lastheader .= " $1"; } - if (/^from:\s+(.*)\n$/i) { $from = $1; $lastheader = \$from; } - if (/^to:\s+(.*)\n$/i) { $to = $1; $lastheader = \$to; } - if (/^cc:\s+(.*)\n$/i) { $cc = $1; $lastheader = \$cc; } - if (/^message-id:\s+(.*)\n$/i) { $messageid = $1; $lastheader = \$messageid; } - if (/^precedence:\s+(bulk|list|junk)/i) { exit (0); } - if (/^x-loop:\s+postfix\ admin\ virtual\ vacation/i) { exit (0); } + if (/^\s+(.*)/ and $lastheader) { $$lastheader .= " $1"; } + elsif (/^from:\s+(.*)\n$/i) { $from = $1; $lastheader = \$from; } + elsif (/^to:\s+(.*)\n$/i) { $to = $1; $lastheader = \$to; } + elsif (/^cc:\s+(.*)\n$/i) { $cc = $1; $lastheader = \$cc; } + elsif (/^subject:\s+(.*)\n$/i) { $subject = $1; $lastheader = \$subject; } + elsif (/^message-id:\s+(.*)\n$/i) { $messageid = $1; $lastheader = \$messageid; } + elsif (/^precedence:\s+(bulk|list|junk)/i) { exit (0); } + elsif (/^x-loop:\s+postfix\ admin\ virtual\ vacation/i) { exit (0); } + else {$lastheader = "" ; } } # If either From: or To: are not set, exit