]> diplodocus.org Git - nmh/commitdiff
Add a -credentials argument when we call post.
authorKen Hornstein <kenh@pobox.com>
Fri, 8 Sep 2017 16:08:41 +0000 (12:08 -0400)
committerKen Hornstein <kenh@pobox.com>
Fri, 8 Sep 2017 16:10:34 +0000 (12:10 -0400)
If we are using -check, post(8) will need to talk to a remote SMTP server,
and it might need to perform authentication when doing so.  So include a
-credentials option if there is the appropriate line in the user's profile.

uip/whom.c

index c1ef659..d172f94 100644 (file)
@@ -74,6 +74,12 @@ main (int argc, char **argv)
     vec[vecp++] = "-library";
     vec[vecp++] = getcpy (m_maildir (""));
 
+    if ((cp = context_find ("credentials"))) {
+       /* post doesn't read context so need to pass credentials. */
+       vec[vecp++] = "-credentials";
+       vec[vecp++] = cp;
+    }
+
     /* Don't need to feed fileproc or mhlproc to post because
        it doesn't use them when used for whom. */