nmh-workers
[Top] [All Lists]

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

2018-05-29 11:42:43
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").

--Ken

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>