Subject: Re: Local mail delivery not working on 2.0
To: Gary Thorpe <gathorpe79@yahoo.com>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 03/02/2005 08:25:24
On Wed, 2 Mar 2005, Gary Thorpe wrote:
> I don't think it will be problematic. Is it possible to get local
> delivery without a sendmail daemon running? Can this be done with
> Postfix or do they both require a daemon to get local mail delivery? If
> they must use daemons, can I force them to only listen to the port on
> 127.0.0.1?
Here's a config that only listens on localhost, and only does local
delivery:
--8\----LOCAL.mc------------------------------------------------------
define(`_CF_DIR_', `/usr/share/sendmail/')
include(`/usr/share/sendmail/m4/cf.m4')
VERSIONID(`@(1.0.0)LOCAL.mc')
OSTYPE(bsd4.4)
CLIENT_OPTIONS(`Family=inet, address=127.0.0.1, Name=MTA, Modifiers=O')
DAEMON_OPTIONS(`Family=inet, address=127.0.0.1, Name=MTA, Modifiers=O')
CLIENT_OPTIONS(`Family=inet6, address=IPv6:::1, Name=MTA6, Modifiers=O')
DAEMON_OPTIONS(`Family=inet6, address=IPv6:::1, Name=MTA6, Modifiers=O')
--8\------------------------------------------------------------------
Use it to generate a "cf"-file with "m4 LOCAL.mc > sendmail.cf",
then backup and replace "/etc/mail/sendmail.cf".
Now, if you don't want to run a daemon, you can lose the submission
agent behavior by making sendmail suid root, and moving "submit.cf"
from out of "/etc/mail". That will cause mail to be dropped in
"/var/spool/mqueue", the old fashioned way. You could then run the
queue manually via "sendmail -q", or periodically via cron.
Frederick