SF.net SVN: postfixadmin: [127] trunk/VIRTUAL_VACATION/vacation.pl
Brought to you by:
christian_boltz,
gingerdog
From: <Gin...@us...> - 2007-10-04 07:34:07
|
Revision: 127 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=127&view=rev Author: GingerDog Date: 2007-10-04 00:34:10 -0700 (Thu, 04 Oct 2007) Log Message: ----------- vacation.pl: patch from kope (via forum post at http://sourceforge.net/forum/forum.php?thread_id=1837942&forum_id=676076) - Thankyou Modified Paths: -------------- trunk/VIRTUAL_VACATION/vacation.pl Modified: trunk/VIRTUAL_VACATION/vacation.pl =================================================================== --- trunk/VIRTUAL_VACATION/vacation.pl 2007-10-04 00:01:07 UTC (rev 126) +++ trunk/VIRTUAL_VACATION/vacation.pl 2007-10-04 07:34:10 UTC (rev 127) @@ -315,13 +315,15 @@ # Take headers apart while (<STDIN>) { 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |