> On 08 Dec 2015, at 10:39, Sunil Nimmagadda <su...@nimmagadda.net> wrote: > >> If /etc/mailer.conf doesn't exist, mailwrapper tries to run sendmail, >> giving a confusing error message: >> >> mailwrapper: cannot exec /usr/libexec/sendmail/sendmail: No such >> file or directory >> >> This patch removes this fallback code. I believe this is cleaner than >> updating the fallback since we would have to put two paths in: one for >> sendmail/send-mail/mailq and one for makemap/newaliases. > > I am not sure about removing the fallback code but if we decide to > keep it, this diff should fix the fallback case.
ok jung@ for the fix below. I’m also unsure about the fallback code. It was introduced with -r1.4 more than 16 yrs ago. However, I fail to understand what’s the point of it? I mean why running mailwrapper without a config file, that does not make much sense and defeats it's purpose, right? AFAIU, the mailer.conf is a must-have, so the proposed removal of the fallback code makes sense to me. > Index: mailwrapper.c > =================================================================== > RCS file: /cvs/src/usr.sbin/mailwrapper/mailwrapper.c,v > retrieving revision 1.20 > diff -u -p -r1.20 mailwrapper.c > --- mailwrapper.c 12 Oct 2015 22:01:08 -0000 1.20 > +++ mailwrapper.c 8 Dec 2015 09:36:18 -0000 > @@ -41,7 +41,7 @@ > #include <util.h> > > #define _PATH_MAILERCONF "/etc/mailer.conf" > -#define _PATH_DEFAULTMTA "/usr/libexec/sendmail/sendmail" > +#define _PATH_DEFAULTMTA "/usr/sbin/smtpctl" > > struct arglist { > size_t argc, maxc; >