git://git.jankratochvil.net
/
PerlMail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
851ec8b
)
+Option --single to not to process '^From ' lines during --stdin.
author
short
<>
Mon, 23 Aug 2004 11:20:04 +0000
(11:20 +0000)
committer
short
<>
Mon, 23 Aug 2004 11:20:04 +0000
(11:20 +0000)
perlmail-accept
patch
|
blob
|
history
diff --git
a/perlmail-accept
b/perlmail-accept
index
9a8584b
..
7eb3f75
100755
(executable)
--- a/
perlmail-accept
+++ b/
perlmail-accept
@@
-89,6
+89,7
@@
my $opt_mode;
my $opt_smstest; # 1 or $smscount
my $opt_idle;
my $opt_dry;
my $opt_smstest; # 1 or $smscount
my $opt_idle;
my $opt_dry;
+my $opt_single;
sub process;
sub process;
@@
-101,7
+102,7
@@
sub stdin
local $_;
while (<>) {
die "Invalid 'From ' line: $_" if $message eq "" && !/^From /;
local $_;
while (<>) {
die "Invalid 'From ' line: $_" if $message eq "" && !/^From /;
- if (/^From / && $message) {
+ if (
!$opt_single &&
/^From / && $message) {
process $message;
$message="";
}
process $message;
$message="";
}
@@
-662,6
+663,7
@@
$Getopt::Long::ignorecase=0;
die "GetOptions error" if !Getopt::Long::GetOptions(
"inetd" ,sub { $opt_mode=\&inetd; },
"stdin" ,sub { $opt_mode=\&stdin; },
die "GetOptions error" if !Getopt::Long::GetOptions(
"inetd" ,sub { $opt_mode=\&inetd; },
"stdin" ,sub { $opt_mode=\&stdin; },
+ "single!" ,\$opt_single,
"dry" ,\$opt_dry,
"smstest:s",sub { $opt_mode=\&stdin; $opt_smstest=($_[1] || 1); },
"idle!" ,\$opt_idle,
"dry" ,\$opt_dry,
"smstest:s",sub { $opt_mode=\&stdin; $opt_smstest=($_[1] || 1); },
"idle!" ,\$opt_idle,