From owner-freebsd-questions@FreeBSD.ORG Tue Jul 13 07:59:01 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 143BE16A4CE for ; Tue, 13 Jul 2004 07:59:01 +0000 (GMT) Received: from mail.bitfreak.org (mail.bitfreak.org [65.75.198.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7C7D43D48 for ; Tue, 13 Jul 2004 07:59:00 +0000 (GMT) (envelope-from dmp@bitfreak.org) Received: from speck.techno.pagans (c-24-21-228-149.client.comcast.net [24.21.228.149]) by mail.bitfreak.org (Postfix) with ESMTP id 7BF712A41A for ; Tue, 13 Jul 2004 00:59:00 -0700 (PDT) Received: from spud (w1.techno.pagans [172.21.42.21]) by speck.techno.pagans (Postfix) with ESMTP id 3F3FEA968 for ; Tue, 13 Jul 2004 00:57:15 -0700 (PDT) From: "Darren Pilgrim" To: Date: Tue, 13 Jul 2004 00:57:21 -0700 Message-ID: <000101c468af$09f42fe0$152a15ac@spud> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal Subject: Mail(1) breaks when contrib/sendmail is replaced with postfix? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2004 07:59:01 -0000 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: # periodic daily mail: /usr/sbin/sendmail: No such file or directory # mail someone Subject: foo foo=20 . EOT # 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?