Changeset 3111 for trunk/gsdl
- Timestamp:
- 2002-05-07T15:33:35+12:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/EMAILPlug.pm
r3073 r3111 94 94 # mbx/email for mailbox file format, \d+ for maildir (each message is 95 95 # in a separate file, with a unique number for filename) 96 return q@([\\/]\d+|\.(mbx|email))$@; 96 # mozilla and IE will save individual mbx format files with a ".eml" ext. 97 return q@([\\/]\d+|\.(mbx|email|eml))$@; 97 98 } 98 99 99 100 # This plugin splits the mbox mail files at lines starting with From<sp> 101 # It is supposed to be "\n\nFrom ", but this isn't always used. 100 102 sub get_default_split_exp { 101 103 return q^\nFrom .*\n^; … … 111 113 112 114 # Check that we're dealing with a valid mail file 113 return undef unless (($$textref =~ /From:/m) || ($$textref =~ /To:/m)); 114 115 # slightly more strict validity check, to prevent us from matching 116 # .so.x files ... 117 return undef unless (($$textref =~ /^From /) || 118 ($$textref =~ /^[-A-Za-z]{2,100}:/m)); 115 # mbox message files start with "From " 116 # maildir messages usually start with Return-Path and Delivered-To 117 # mh is very similar to maildir 118 my $startoffile=substr($$textref,0,256); 119 if (($startoffile !~ /^(From )/) && 120 ($startoffile !~ /^(From|To|Envelope.*|Received|Return-Path|Date|Subject|Content\-.*|MIME-Version|Forwarded):/im)) { 121 return undef; 122 } 123 119 124 120 125 print $outhandle "EMAILPlug: processing $file\n"
Note:
See TracChangeset
for help on using the changeset viewer.