diff options
| author | fukachan <fukachan> | 2006-11-24 06:51:15 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-11-24 06:51:15 +0000 |
| commit | 6585ccac494cb8f1e726fa02ceb6bcc576e8bc70 (patch) | |
| tree | b0ab5317f1ff93c991c08f42e29e711112be0131 | |
| parent | b5688e74cbf02e442002774ba1e58915dd19ec34 (diff) | |
| download | fml8-6585ccac494cb8f1e726fa02ceb6bcc576e8bc70.tar.gz fml8-6585ccac494cb8f1e726fa02ceb6bcc576e8bc70.tar.bz2 fml8-6585ccac494cb8f1e726fa02ceb6bcc576e8bc70.zip | |
use environment variable FML_EMUL_FROM if specified.
show unix from.
append time information to avoid body checksum loop check.
| -rwxr-xr-x | regress/message/scramble.pl | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/regress/message/scramble.pl b/regress/message/scramble.pl index be3dfc0e..0682e670 100755 --- a/regress/message/scramble.pl +++ b/regress/message/scramble.pl @@ -1,29 +1,29 @@ #!/usr/bin/env perl #-*- perl -*- # -# Copyright (C) 2001,2002 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2004,2006 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: scramble.pl,v 1.2 2002/12/30 13:18:50 fukachan Exp $ +# $FML: scramble.pl,v 1.3 2004/03/28 13:11:59 fukachan Exp $ # use strict; use Carp; -my $from = undef; +my $from = $ENV{ FML_EMUL_FROM } || undef; my $from_found = 0; my $date_found = 0; my $msgid_found = 0; -if (defined $ENV{ FML_EMUL_FROM }) { - $from = $ENV{ FML_EMUL_FROM }; -} +# unix from +print "From $from\n"; +# main part while (<>) { if (/^date:/i) { - $date_found = 1; - } + $date_found = 1; + } if (/^message-id/i) { my $time = time; @@ -38,20 +38,27 @@ while (<>) { if (/^$/) { unless ($msgid_found) { - my $time = time; - my $host = `hostname`; chomp $host; - print "Message-ID: <$time\@$host>\n"; - $msgid_found = 1; + my $time = time; + my $host = `hostname`; chomp $host; + print "Message-ID: <$time\@$host>\n"; + $msgid_found = 1; } unless ($date_found) { - print "Date: "; - print `date +"%a, %d %b %Y %H:%M:%S +0900 (JST)."`; - $date_found = 1; + print "Date: "; + print `date +"%a, %d %b %Y %H:%M:%S +0900 (JST)."`; + $date_found = 1; } } print $_; } +# avoid body loop check. +require 'ctime.pl'; +print "\n"; +print "XXX AVOID BODY CHECKSUM LOOP CHECK: "; +print ctime(time); +print "\n"; + exit 0; |
