I use postfix for my mail servers, rather than sendmail. Postfix installs
the sendmail-replacement programs under /usr/local. The programs from
contrib/sendmail are under /usr, so you end up with two copies of these
programs when postfix is installed. To avoid prevent security issues and
other problems I remove the old contrib/sendmail binaries and define
NO_SENDMAIL in /etc/make.conf.
For better integration, postfix can be started through the mailer
configuration in the base system by adding certain lines to /etc/rc.conf and
/etc/mail/mailer.conf. This points sendmail, mailq, etc. to
/usr/local/sbin/sendmail. This works very well, with one exception, the
periodic scripts don't seem to run. I've been able to narrow this down to
this error from /usr/bin/mail:
/usr/bin/mail tries to run /usr/sbin/sendmail directly. This probably isn't
a good idea, since IIRC sendmail can now be package-ized and removed from
the base system as well as excluded from buildworld. This is what seems to
be breaking the periodic script, since I get this error when running
# periodic daily
mail: /usr/sbin/sendmail: No such file or directory
# mail someone
# mail: /usr/sbin/sendmail: No such file or directory
Why would /usr/bin/mail be doing this? I couldn't find any knobs for
periodic.conf or mail.rc that would affect this. I've had this problem with
other programs and shells where if you run a program without giving a path
(forcing a path search), then move the program to another point in the path
(say from /usr/bin to /usr/local/bin), you'll get similar "file not found"
errors. Rebooting fixes the problem, but rebooting hasn't fixed this one.
Also, I can fix the problem by making a symlink from the postfix sendmail
binary to /usr/sbin/sendmail, but that's not really a workable solution.
How do I fix this?
[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"