From 5372681270d71a70f467dfb2644d3db2ce1e97fe Mon Sep 17 00:00:00 2001 From: Bruno Franzini Date: Sat, 20 Apr 2013 21:51:08 +0200 Subject: [PATCH 1/5] One more comman-line option: -xp-file FILE Read the password from the first line of a FILE. --- sendEmail | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sendEmail b/sendEmail index 9f9392e..ddbd0c7 100755 --- a/sendEmail +++ b/sendEmail @@ -366,6 +366,13 @@ sub processCommandLine { } } + elsif ($ARGS[$counter] =~ /^-xp-file$/) { ## AuthSMTP Password in a file ## + $counter++; + open my $pfile, '<', $ARGS[$counter]; + $opt{'password'} = <$pfile>; + close $pfile; + } + elsif ($ARGS[$counter] =~ /^-xp$/) { ## AuthSMTP Password ## $counter++; if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) { @@ -1300,6 +1307,7 @@ Synopsis: $conf{'programName'} -f ADDRESS [options] -bcc ADDRESS [ADDR ...] bcc email address(es) -xu USERNAME username for SMTP authentication -xp PASSWORD password for SMTP authentication + -xp-file FILE read from file the password for SMTP authentication ${colorGreen}Paranormal:${colorNormal} -b BINDADDR[:PORT] local host bind address @@ -1567,6 +1575,7 @@ Options that don't fit anywhere else: -a ATTACHMENT [ATTACHMENT ...] -xu USERNAME -xp PASSWORD + -xp-file FILE -o username=USERNAME -o password=PASSWORD -o tls= @@ -1584,6 +1593,9 @@ Options that don't fit anywhere else: -xp PASSWORD Alias for -o password=PASSWORD +-xp-file FILE + Read the SMTP server password from the specified FILE. + -o username=USERNAME (synonym for -xu) These options allow specification of a username to be used with SMTP servers that require authentication. If a username is specified but a From e41cf4fab13c90293a81859576561af73727dd6f Mon Sep 17 00:00:00 2001 From: Bruno Franzini Date: Sat, 20 Apr 2013 22:01:13 +0200 Subject: [PATCH 2/5] -xp-file FILE - option --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index a902bb4..931d38d 100644 --- a/README +++ b/README @@ -77,6 +77,7 @@ Synopsis: sendEmail -f ADDRESS [options] -bcc ADDRESS [ADDR ...] bcc email address(es) -xu USERNAME username for SMTP authentication -xp PASSWORD password for SMTP authentication + -xp-file FILE read the password for SMTP from FILE Paranormal: -b BINDADDR[:PORT] local host bind address From 2f01e9065d3426fe28a38045439b4b1125d9e761 Mon Sep 17 00:00:00 2001 From: digout Date: Sat, 20 Apr 2013 22:04:33 +0200 Subject: [PATCH 3/5] -xp-file FILE new option --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index a902bb4..931d38d 100644 --- a/README +++ b/README @@ -77,6 +77,7 @@ Synopsis: sendEmail -f ADDRESS [options] -bcc ADDRESS [ADDR ...] bcc email address(es) -xu USERNAME username for SMTP authentication -xp PASSWORD password for SMTP authentication + -xp-file FILE read the password for SMTP from FILE Paranormal: -b BINDADDR[:PORT] local host bind address From bcd8c8e7a24f4da96b228effed55840220a5e1cd Mon Sep 17 00:00:00 2001 From: digout Date: Sat, 20 Apr 2013 22:06:38 +0200 Subject: [PATCH 4/5] -xp-file FILE --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 931d38d..42e8e7e 100644 --- a/README +++ b/README @@ -77,7 +77,7 @@ Synopsis: sendEmail -f ADDRESS [options] -bcc ADDRESS [ADDR ...] bcc email address(es) -xu USERNAME username for SMTP authentication -xp PASSWORD password for SMTP authentication - -xp-file FILE read the password for SMTP from FILE + -xp-file FILE read the password for SMTP server from FILE Paranormal: -b BINDADDR[:PORT] local host bind address From c5784174871cd2b49cd68f3bff7859c7568c08ca Mon Sep 17 00:00:00 2001 From: digout Date: Sat, 20 Apr 2013 23:09:36 +0200 Subject: [PATCH 5/5] Removed duplicated line. --- README | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README b/README index 522f818..42e8e7e 100644 --- a/README +++ b/README @@ -77,11 +77,7 @@ Synopsis: sendEmail -f ADDRESS [options] -bcc ADDRESS [ADDR ...] bcc email address(es) -xu USERNAME username for SMTP authentication -xp PASSWORD password for SMTP authentication -<<<<<<< HEAD -xp-file FILE read the password for SMTP server from FILE -======= - -xp-file FILE read the password for SMTP from FILE ->>>>>>> e41cf4fab13c90293a81859576561af73727dd6f Paranormal: -b BINDADDR[:PORT] local host bind address