From 6356071d290e22e2e4a379bd474c4b3a5dbc0e3e Mon Sep 17 00:00:00 2001 From: franck Date: Tue, 23 Nov 2010 20:57:58 +0000 Subject: [PATCH] Add new environment variable SENDMAIL_ARGS to allow user to pass arguments to sendmail (closes: #599409). git-svn-id: svn://svn.debian.org/pgp-tools/trunk@481 b513b33f-fedd-0310-b452-c3deb5f4c849 --- debian/changelog | 2 ++ gpg-mailkeys/example.gpg-mailkeysrc | 7 +++++++ gpg-mailkeys/gpg-mailkeys | 5 ++++- gpg-mailkeys/gpg-mailkeys.1 | 7 ++++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3b40bd6..04958f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ signing-party (1.1.4-1) UNRELEASED; urgency=low springgraph (closes: #604028). * gpg-mailkeys: + Correct path of ~/.gpg-mailkeysrc and ~/.signature in manpage. + + Add new environment variable SENDMAIL_ARGS to allow user to pass + arguments to sendmail (closes: #599409). * caff: + Refactor import of own key and import for keys to sign from keyrings. + Also automatically import keys to sign from the user's normal gpg diff --git a/gpg-mailkeys/example.gpg-mailkeysrc b/gpg-mailkeys/example.gpg-mailkeysrc index 6a75b96..e356ee4 100644 --- a/gpg-mailkeys/example.gpg-mailkeysrc +++ b/gpg-mailkeys/example.gpg-mailkeysrc @@ -15,3 +15,10 @@ Hi, here you are: your signed key. See you! " + +# You can add here whatever arguments you want to pass to sendmail. +# For example, if you use ssmtp, you may want to set your credentials this way +# SENDMAIL_ARGS="-au myusername -aps3cr3t" +# to authenticate to the smtp server with username myusername and password +# s3cr3t. +SENDMAIL_ARGS="" diff --git a/gpg-mailkeys/gpg-mailkeys b/gpg-mailkeys/gpg-mailkeys index 7ba5139..7abe220 100755 --- a/gpg-mailkeys/gpg-mailkeys +++ b/gpg-mailkeys/gpg-mailkeys @@ -61,6 +61,9 @@ Here is your signed GPG key. Enjoy, $NAME" fi +if [ -z "$SENDMAIL_ARGS" ]; then + SENDMAIL_ARGS="" +fi get_local_charset @@ -120,7 +123,7 @@ Content-Disposition: attachment; filename="$1.asc" --$BOUNDARY-- EOM printf " sending" - /usr/sbin/sendmail -ti <$TEMPFILE + /usr/sbin/sendmail $SENDMAIL_ARGS -ti <$TEMPFILE rm $TEMPFILE printf " done.\n" shift 1 diff --git a/gpg-mailkeys/gpg-mailkeys.1 b/gpg-mailkeys/gpg-mailkeys.1 index 3796374..cdd8207 100644 --- a/gpg-mailkeys/gpg-mailkeys.1 +++ b/gpg-mailkeys/gpg-mailkeys.1 @@ -1,5 +1,5 @@ .\" -.TH GPG-MAILKEYS 1 "June 29, 2010" +.TH GPG-MAILKEYS 1 "Nov 23, 2010" .SH NAME .B gpg\-mailkeys \- sends emails containing keys to their owners @@ -31,6 +31,11 @@ Set the subject of the messages you send .TP 13 .I TEXT Set the body text of the messages +.TP 13 +.I SENDMAIL_ARGS +Set arguments to pass to /usr/sbin/sendmail. This can be useful to set +credentials in order to authenticate to an smtp server when using ssmtp +for example. .SH FILES The behavior of -- 2.39.5