sendmail "root... User address required." error

I'm running sendmail (8.13.8+Sun/8.13.8/Submit) solaris 10.

When I send mail to root at the command line (whether I use a full-qualified address or just root), I get the error message

root... User address required.

Sending mail to root (either at the command line or in a cron job), fails. I just tried to send to root as me, and the failure notice came to my exchange account.

@root on 6/26/2007 5:25 PM
The format of the e-mail address is incorrect. Check the address, look up the recipient in the Address Book, or contact the recipient directly to find out the correct address.
< host.domain.com #5.1.3>

This is my submit.mc and all mail is correctly relaying to the exchange server, and mail from root shows correctly as root@host.domain.com.

divert(0)dnl
VERSIONID(`$Id: submit.mc,v 8.6.2.4 2002/12/29 03:54:34 ca Exp $')
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
dnl
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
dnl FEATURE(`msp', `[127.0.0.1]')dnl
MASQUERADE_AS(`domain.com')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`msp', `mailhost.domain.com)dnl
LOCAL_USER(`root')dnl
EXPOSED_USER(`root')dnl
kristina#

This is my local.mc

divert(0)dnl
VERSIONID(`@(#)local.mc 1.1 (Sun) 08/01/06')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
FEATURE(`no_default_msa')dnl
DAEMON_OPTIONS(`NAME=NoMTA4, Family=inet, Addr=127.0.0.1')dnl
DAEMON_OPTIONS(`Name=MSA4, Family=inet, Addr=127.0.0.1, Port=587, M=E')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl

LOCAL_NET_CONFIG
R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

Again, thank you.

I found if I removed the LOCAL_USER(`root')dnl
from the submit.mc, I do not get the error. The problem is mail is masquarading as root@domain.com and the exchange server doesn't know what to do with it.

How can I get local root mail to stay local.

THanks

You have many choices.

using and entry in the aliases file
redirecting from virtusertable to another address.
redirect to the aliases file from the access file.

I suggest you go to http://sendmail.org/doc/ and read up, they have an install guide available as a pdf. read it.

Sendmail is "complicated"

At the very least you domain will need to really exist, (as in, visible to a DNS query) if you just want root mail to work, then make sure you have mailhost listed as an alias of 127.0.0.1 (or your IP address)
It is considerably easier if you're just mucking about with UNIX/Linux to install a mail client, (Thunderbird) and have it use gmail as a server.

If you're actually doing this for real, then you need to know what you're doing, so you need to read the document. If you don't know what you're doing don't put an insecure Sendmail system on the internet.

I'd vote for adding entry in aliases file, just "cat /etc/mail/aliases", since this is Solaris and reading the comments in this file should be enough for you to deal with the problem. If you choose to alter this file, invoke "newaliases" to update the aliases' DB.

thank you for the information.

I had already tried the alias method for root, but root is still relaying out to the exchange server (so it doesn't seem to use it the alias file). The alias is the same as a user that I can successifully send mail to. I just want root mail to go to the local root mail box.

Which file does the alias reference go into, the submit.cf or local.cf?

The mailhost is the SmartHost, not 127, which it needs to be for all other outgoing mail. This server is just a mail client. The other mail clients I have are configured the same way but with the earlier version of sendmail.

If this has to be setup differently, so it thinks the localhost is mailhost for root, but not for anything else, how is that setup.

I read that document but it doesn't explain the new cf files and the sequence of processing.

All I want is local mail delivered to the local root mailbox.

Thanks so much.

What is being suggested is that you use the standard client configuration and do not attempt to directly relay all mail.

Instead you construct an alias for each non-local user in /etc/mail/aliases eg:

john:   john@example.com

then type in 'newaliases' to build the alias list.

This will be relayed to the mailhost, you then do not alias the local delivery accounts such as root. Mail will then be relayed to the fully qualified name, and non relayed mail will stay local.

Thank you but I have done that already. I put root: csgonan@domain.com to forward mail to me (and newalias). What I see is with my mc entries, the local.cf file has the alias entry activated, but the submit.cf doesn't.

Beyond that what won't root mail stay local. This is my maillog when I try to send root mail at the command linel. I would think whatever is generating the first entry should be delivering the mail local.

Thank you for responding to this.

Jun 27 15:04:04 kristina sendmail[406]: [ID 801593 mail.info] l5RJ446I000406: from=root, size=140, class=0, nrcpts=1, msgid=<200706271904.l5RJ446I000406@kristina.domain.com>, relay=root@localhost
Jun 27 15:04:05 kristina sendmail[406]: [ID 801593 mail.info] l5RJ446I000406: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30140, relay=directencryptedhccsroute.domain.com. [192.168.0.221], dsn=2.0.0, stat=Sent ( <200706271904.l5RJ446I000406@kristina.domain.com> Queued mail for delivery)

http://solaris-x86.org/documents/tutorials/sendmail.mhtml

Thank you but that document was last revised 2002.

What's that got to do with anything? Sendmail is at least 20 years old, and all you want to do is basic mail relaying, not regexp spam blocking or advanced routing.

Your system is doing as it's told, which is to send all mail to the default mail gateway. You need to create maps that tell the system to route local mail to a local mail box. There are multiple ways to skin a cat with sendmail, pick one.

hi csgonan,
I havec exactly the same problem (local delivery) and after trying
everything (and even more), I found nothing working, and no helpful
answer here.

Did you succeed since your last post?