From 583d136dce21b72c76ea911883e53ae8ef6faa89 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Tue, 3 Mar 2015 15:51:50 -0800 Subject: [PATCH] sendmail.pl: pick up minor update --- bin/sendmail.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/sendmail.pl b/bin/sendmail.pl index 4580c68..a1270ef 100755 --- a/bin/sendmail.pl +++ b/bin/sendmail.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # sendmail.pl - sendmail to SMTP bridge -# Copyright (c) 2014 Kyle J. McKay. All rights reserved. +# Copyright (C) 2014,2015 Kyle J. McKay. All rights reserved. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -31,7 +31,7 @@ my $HELP; my $USAGE; BEGIN { - *VERSION = \'1.0'; + *VERSION = \'1.0.2'; $VERSIONMSG = "sendmail.pl version $VERSION\n" . "Copyright (c) 2014 Kyle J. McKay. All rights reserved.\n" . "License GPLv2+: GNU GPL version 2 or later.\n" . @@ -87,6 +87,9 @@ OPTIONS headers. If a Bcc: header is found, it's removed after picking up the destination addresses. + -m + Ignored for compatibility. + -- Signals the end of the options. Anything following will be taken as a recipient address even if it starts with a '-'. @@ -150,6 +153,7 @@ sub protect($) sub cleanup($) { my $line = shift; + defined($line) or $line = ''; $line =~ s/(?:\r\n|\r|\n)$//os; return $line; } @@ -166,6 +170,7 @@ sub main while (@ARGV && $ARGV[0] =~ /^-/) { my $opt = shift @ARGV; last if $opt eq '--'; + next if $opt eq '-m' || $opt eq '-om'; print($VERSIONMSG), exit 0 if $opt eq '-V' || $opt eq '--version'; $opt_v = 1, next if $opt eq '-v' || $opt eq '--verbose'; print(($opt_v?$HELP:$USAGE),"\n"), exit 0 if $opt eq '-h' || $opt eq '--help'; -- 2.11.4.GIT