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=="")
This commit is contained in:
Alexander Kulbartsch 2022-10-12 18:24:07 +02:00 committed by Werner Koch
parent 1383aa4750
commit 55eef71dbe
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 8 additions and 0 deletions

View File

@ -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);