Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Jul 2002 00:33:58 +0100
From:      Aidan Saunders <aydun@ntlworld.com>
To:        Andrew Lankford <arlankfo@141.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: about a simple (?) sendmail configuration
Message-ID:  <3D20E6E6.8090009@ntlworld.com>
References:  <200206291355531.SM01140@141.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Current versions of sendmail use 2 separate configs (sendmail.cf & 
submit.cf) to get round the old problem of the sendmail binary being 
installed setuid root.  Basically this means when you send mail, 
sendmail is invoked with the submit.cf which connects (normally) to the 
sendmail daemon (using sendmail.cf) running on the same box.  The daemon 
process then either does local delivery or sends on to the next hop.

Take a look at /etc/mail/README - first section.  This means either you 
need either a sendmail daemon running, or to change the submit.cf to 
send somewhere other than your local box (ie your isp).

For first option, set sendmail_enable to NO in rc.conf.  The provided 
sendmail.cf will attempt to deliver directly to other sites.  If you 
want to go via your ISP, edit your sendmail.mc file.  Copy freebsd.mc to 
your_hostname.mc & edit the line:

 dnl define(`SMART_HOST', `your.isp.mail.server')

change your.isp.mail.server appropriately and remove the leading 'dnl' 
 (dnl introduces a comment in m4. "delete to new line").  Then run make. 
 See the comments in /etc/mail/Makefile

For the second option, copy & edit  submit.mc and change
    FEATURE(`msp')dnl
to
    FEATURE(`msp', `your.isp.mail.server')dnl

The first option delivers local mail locally & sends off non-local mail. 
 The second sends off all mail.  Depends what you want.

Sendmail will complain if it can't determine its hostname fully qualified.

One last thing - sendmail isn't really intended for

"echo howdy | sendmail anotheruser "

though that usually works.  Let 'mailx' do the work of prettying it up 
for you.  eg

"echo howdy | mailx anotheruser "

aidan



Andrew Lankford wrote:

>I happen to be a confirmed nMH user.  It handles incoming messages using POP 
>outgoing messages fine, since they're all routed through my isp in the normal
>way.  However, I can't get local mail (the sort of stuff the root user gets 
>from crontab and periodic), send-pr, or just "echo howdy | sendmail anotheruser " to work successfully because sendmail (which I've disabled in rc.conf with 
>"NONE") isn't configured and doesn't know the right host to direct outgoing
>mail with.  So my question is how does one set up sendmail so that it
>can only pass on local messages to the system mail queue and 
>smtpserver.myisp.com?  The latter can be done easily with any crumby windows
>email client.  I had it working a while back, but with the recent changes 
>(yes, probably for the better) I'm at a loss.  
>
>Andrew Lankford
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-questions" in the body of the message
>
>  
>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D20E6E6.8090009>