Commit 11e29252 authored by unknown's avatar unknown

Fixed a bug in mail_to_db.pl


tests/mail_to_db.pl:
  Fixed a bug in mail_to_db.pl; the program got confused by carriage
  return, if existed at the end of a line.
parent 25658cc1
...@@ -17,7 +17,7 @@ use DBI; ...@@ -17,7 +17,7 @@ use DBI;
use Getopt::Long; use Getopt::Long;
$| = 1; $| = 1;
$VER = "2.3"; $VER = "2.4";
$opt_help = 0; $opt_help = 0;
$opt_version = 0; $opt_version = 0;
...@@ -213,10 +213,10 @@ sub process_mail_file ...@@ -213,10 +213,10 @@ sub process_mail_file
%values = (); %values = ();
$type = ""; $type = "";
$check = 0; $check = 0;
while (<FILE>) while (<FILE>)
{ {
chop; chop;
chop if (substr($_, -1, 1) eq "\r");
if ($type ne "message") if ($type ne "message")
{ {
if (/^Reply-To: (.*)/i) if (/^Reply-To: (.*)/i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment