wks: Take name of sendmail from configure.
authorWerner Koch <wk@gnupg.org>
Tue, 19 Jun 2018 06:06:50 +0000 (08:06 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 19 Jun 2018 06:07:59 +0000 (08:07 +0200)
* configure.ac (NAME_OF_SENDMAIL): New ac_define.
* tools/send-mail.c (run_sendmail): Use it.
--

We used to ac_subst the SENDMAIL in the old keyserver via mail script.
We cab reuse this to avoid a fixed name for sendmail in the
send-mail.c helper.

Signed-off-by: Werner Koch <wk@gnupg.org>
configure.ac
tools/send-mail.c

index 0d270a4..60ec941 100644 (file)
@@ -1219,6 +1219,8 @@ elif test x"$with_mailprog" != xno ; then
     AC_SUBST(SENDMAIL,$with_mailprog)
     AC_MSG_RESULT($with_mailprog)
 fi
     AC_SUBST(SENDMAIL,$with_mailprog)
     AC_MSG_RESULT($with_mailprog)
 fi
+AC_DEFINE_UNQUOTED(NAME_OF_SENDMAIL,"$SENDMAIL",
+                   [Tool with sendmail -t interface])
 
 
 #
 
 
 #
index 9f07c7a..6492c43 100644 (file)
@@ -33,7 +33,7 @@ static gpg_error_t
 run_sendmail (estream_t data)
 {
   gpg_error_t err;
 run_sendmail (estream_t data)
 {
   gpg_error_t err;
-  const char pgmname[] = "/usr/lib/sendmail";
+  const char pgmname[] = NAME_OF_SENDMAIL;
   const char *argv[3];
 
   argv[0] = "-oi";
   const char *argv[3];
 
   argv[0] = "-oi";