Subject: Re: Local mail delivery not working on 2.0
To: Frederick Bruckman <fredb@immanent.net>
From: Gary Thorpe <gathorpe79@yahoo.com>
List: netbsd-help
Date: 03/02/2005 00:19:22
 --- Frederick Bruckman <fredb@immanent.net> wrote: 
> In article <20050221192340.4670.qmail@web41201.mail.yahoo.com>,
> 	Gary Thorpe <gathorpe79@yahoo.com> writes:
> > 
> > I put sendmail=NO and smmsp=YES in /etc/rc.conf (I didn't want 
> > a daemon running because I only need local delivery on the machine)
> 
> > but that resulted in mail accumulating in /var/spool/clientmqueue
> and
> > messages in /var/log/mailog looking like:
> 
> Right. The "smmsp" sendmail doesn't do local delivery, but only tries
> to hand off what's in the client queue to the network daemon sendmail
> on "localhost", same as "sendmail -oi -t". It's going to give roughly
> the same error that you got on your original submission.
> 
> > Ok, so I messed up here: I then commented out both lines for
> sendmail
> > and smmsp in /etc/rc.conf so it should go back to the install
> default,
> > right? So now when I try to test out local delivery:
> 
> Unfortunately the default doesn't "just work"...

That's really unfortunate as local mail was zero effort before.

> >>>> MAIL From:<myusername@host.local.noinet>
> > 550 5.0.0 Access denied
> 
> This is coming from sendmail's tcpwrapper's check.  If you look in
> "/var/log/maillog", it should say that. The "deny by default" thing
> was done recently, it's contrary to the hosts.allow(5) man page, and
> it's annoying, but since it was done in the name of Security, and it
> tastes bad, it must be good for you.

I figured out that sendmail was using tcp wrappers by looking at what
ldd reported and libwrap was one of the libraries. It isn't mentioned
in the manual pages, which would have been helpful.

> > So it seems that the daemon refuses to accept mail from the local 
> > machine by default. Exactly how am I supposed to get local mail
> > working?
> 
> Short answer, add a line such as "sendmail: localhost." to
> "/etc/hosts.allow".

I have noticed that the host name in this file is very sensitive e.g.
aliases for localhost don't necessarily work automatically (they are
not implied when localhost is used) or is this not true?

> Note that this will permit you to send mail to anyone in the world,
> with your username @ hostname as envelope sender, but not allow you
> to receive the bounces on your host.  At the very least, you should
> have an MX record pointing to a server that accepts mail for your
> host, or you could rewrite the envelope sender domain to a server
> that accepts mail for you.  If you really only send mail to local
> users, this won't be a problem.

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?

> > Why is this necessary at all: in 1.6 no knobs where needed 
> > for local mail. also, what can I do about all the backup up
> messages 
> > in /var/spool/clientmqueue? Sendmail seems to ignore them (it looks
> 
> > at /var/spool/mqueue). The manual page for sendmail doesn't mention
> 
> > smmsp or the clientmqueue. Can anyone offer pointers on how to 
> > proceed?
> 
> I already answered the first question (somewhat)...
> 
> After you open the door in "hosts.allow", "/etc/rc.d/smmsp onestart"
> will deliver all the messages to the network daemon. I.e, you'll see
> them move to "/var/spool/mqueue", and if they're all local users, on
> to "/var/mail". (You could also run the submission queue without
> starting the queue runner via "sendmail -q -Ac", or list the messages
> in the queue via "mailq -Ac".)

Yes, it seems that smmsp is necessary to delivery those messages, so I
just added smmsp=YES to rc.conf for now (in case something happens
later). Thanks for the help! I would appreciate any further pointers on
how to get local mail without the daemons if possible.


______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca