[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [nmh-workers] mts.conf relative sendmail option

From: Ken Hornstein
Subject: Re: [nmh-workers] mts.conf relative sendmail option
Date: Tue, 29 May 2018 12:42:21 -0400

>> sendmail: sendmail
>> it complains that it cannot find the file.
>I think execvp(3) is being used, so PATH is searched?

In fact ... it is not.

It turns out we use execvp() exclusively ... except for this one case.
The code we use in post.c was incorporated from spost.c, and that also
only used execv().  So this is either working exactly as intended or a
mistake that was made probably 30 years ago and we've just been bringing
it forward all of this time :-)

I suspect that it was intended; sendmail has traditionally been a
system utility and it was always intended that it would be in a fixed
location; I admit I don't quite undestand why sendmail isn't always
in the same location on your system; are the system utility locations
randomized for security?  I don't get it, but .... whatever.  I'm not
sure it really makes sense keep on using execv() in preferences to
execvp() (especially since the code that forks sendmail for speaking
SMTP _does_ use execvp()), but spost has always been a sort of weird and
not-very-well supported case and I guess we've kept that tradition alive
with sendmail/pipe.

So, solutions.  You can (a) change post.c to use execvp() instead of
execv(), (b) continue using your wrapper script, or (c) switch to
submitting your mail via SMTP (either direct SMTP to a mail server
or via sendmail using "sendmail/smtp").


reply via email to

[Prev in Thread] Current Thread [Next in Thread]