mail to root, local only

Troy Bowman troy at
Tue Aug 15 22:54:58 MDT 2006

Wade Preston Shearer wrote:
>> It might be helpful to know what MTA you're using so that we don't have
>> to telnet in and discover for ourselves.
> Sorry, I assumed that that was irrelevant. I assumed it was a standard 
> unix thing; such as with the aliases file.
> I am using sendmail.

Hmm, no one replied to this.  I guess everyone is truly scared of 
Sendmail?  Hah.  I read this list once every few weeks.  Sorry for a 
delay in response.

It should be as simple as taking the smtp MAILER directive out of your 
.mc file and rebuild your .cf.  If you want to start a .mc from scratch, 
you could do something like this:, cut/paste
dnl # your m4 file (this is where gentoo keeps it)
dnl # host type
dnl # listen on localhost only
DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')dnl
dnl # undefine the alias file
dnl # define local only

Then, you just run:

# m4 >

( usually goes in /etc/mail)

Then, restart sendmail.

I tested this, and local delivery worked, while I indeed got a bounce 
for my normal (and quite valid) address, for example:

The original message was received at Tue, 15 Aug 2006 22:33:40 -0600
from root at localhost

    ----- The following addresses had permanent fatal errors -----
troy at
     (reason: 553 5.1.2 <troy at>... Unrecognized host name
     (expanded from: troy at

    ----- Transcript of session follows -----
... while talking to []:
 >>> DATA
<<< 553 5.1.2 <troy at>... Unrecognized host name
550 5.1.1 troy at User unknown
<<< 503 5.0.0 Need RCPT (recipient)


More information about the PLUG mailing list