summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kulbartsch <alexander.kulbartsch@gnupg.com>2022-10-12 18:24:07 +0200
committerWerner Koch <wk@gnupg.org>2022-10-13 09:24:03 +0200
commit55eef71dbed7b98dc5b1a3750d10c8cb0df2cff2 (patch)
treed8e9d5a8ef62fce7260d30bf4d634dff629dcca9
parentagent: Introduce attribute "Remote-list" to KEYINFO. (diff)
downloadgnupg2-55eef71dbed7b98dc5b1a3750d10c8cb0df2cff2.tar.xz
gnupg2-55eef71dbed7b98dc5b1a3750d10c8cb0df2cff2.zip
wkd: gpg-wks-client --send checks if build with sendmail support
* tools/gpg-wks-client.c (main): Return GPG_ERR_NOT_IMPLEMENTED if gnupg was build without sendmail support. (NAME_OF_SENDMAIL=="")
-rw-r--r--tools/gpg-wks-client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/gpg-wks-client.c b/tools/gpg-wks-client.c
index a30457e75..f77df8813 100644
--- a/tools/gpg-wks-client.c
+++ b/tools/gpg-wks-client.c
@@ -306,6 +306,14 @@ main (int argc, char **argv)
cmd = parse_arguments (&pargs, opts);
gpgrt_argparse (NULL, &pargs, NULL);
+ /* Check if gpg is build with sendmail support */
+ if (opt.use_sendmail && !NAME_OF_SENDMAIL[0])
+ {
+ err = gpg_error (GPG_ERR_NOT_IMPLEMENTED);
+ log_error ("sending mail is not supported in this build: %s\n",
+ gpg_strerror (err));
+ }
+
if (log_get_errorcount (0))
exit (2);