Solved

Cannot send or receive email except with the root account

Posted on 2008-06-18
22
615 Views
Last Modified: 2013-12-17
Have configured Sendmail 8.14 on a RHEL 5 server. The server is running an isolated LAN not connected to the internet. Therefore, I am not using any DNS and the number of clients is small enough that I've just manually updated the /etc/hosts files. Hence, there is no listing in /etc/hosts or anywhere else on the system for something like "servername.domain"; I simply use "servername" in the /etc/hosts file. Also, I am using just the simple "mail" program as the MUA. Here's the problem.....when I try sending or receiving mail as root, it is successful. However, if I send mail from root to a user on the server or from the user to root, it fails. It complains of "500 5.1.1 Unknown user".  Ideally, I'd like to be able to email from the client terminals, but for now, I am satisfied with just getting emails running on the server from user1@localhost.localdomain to user2@localhost.localdomain. What am I missing here?
0
Comment
Question by:jazzki
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 8
22 Comments
 
LVL 16

Expert Comment

by:The--Captain
ID: 21817034
You might get more responses if I moved this from the "Email Software" TA to the "Sendmail" TA - let me know if you want me to do this for you.

Cheers,
-Jon
EE Misc Networking PE
0
 

Author Comment

by:jazzki
ID: 21821018
Yes please, if you could do that.
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 21841716
What do you get when you send an email to:
    user@[127.0.0.1]

Post the log date from /var/log/maillog after the attempt:
   grep -i user /var/log/maillog

Substitute "user" for the actual username.

Do you have a DNS caching server running?
   ps awx | grep -i named

What IP is sendmail listening on?:
   netstat -an | grep ":25"
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:jazzki
ID: 21849242
Jesper,
   When I send an email to user@127.0.0.1 I get the following:

"Jun 23   14:55:22   ServerName   sendmail[14784] : mSNItMM0014784  to:=user@127.0.0.1, delay=00:00:00, mailer=esmtp, pri=30065, dsn=4.4.3, stat=queued "

I do not have a DNS caching server running, and when I issue the netstat command I get the following:

"tcp      0      0      127.0.0.1:25      0.0.0.0:*      LISTEN"
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 21849419
what is the output of "ps awx | grep sendmail" no quotes?
0
 

Author Comment

by:jazzki
ID: 21849921
This is the ouput from "ps awx | grep sendmail":

  3674   ?      Ss   0:00   sendmail: accepting connections
  3682   ?      Ss   0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
15004 pts/5  S+   0:00 grep sendmail
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 21850010
You are running your client queue every hour.

After an hour has lapsed from your test message, do:

grep mSNItMM0014784 /var/log/maillog and post the result please.
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 21850017
Also, do:

ls -ld /var/spool/clientmqueue
0
 

Author Comment

by:jazzki
ID: 21855275
"grep mSNItMM0014784 /var/log/maillog" yields:

Jun 23 14:55:22 ServerName sendmail[14784]: m5NIt0014784: from=root, size=65, class=0, nrcpts=1, msgid=<200806231855.m5NIt0014784@localhost.localdomain>, relay=root@localhost

Jun 23 14:55:22 ServerName sendmail[14784]: m5NIt0014784: to=user@127.0.0.1, delay=00:00:00, mailer=esmtp, pri=30065, dsn=4.4.3, stat=queued

Jun 23 19:19:21 ServerName sm-msp-queue[15329]: m5Nit0014784: m5NNLIs015329: sender notify: Warning: could not send message for past 4 hours

"ls -ld /var/spool/clientmqueue" gives:

-rw-rw---- 1 smmsp smmsp 19 Jun 23 14:55 dfm5NItMM0014784
-rw-rw---- 1 smmsp smmsp 19 Jun 23 14:56 dfm5NIuiPT014826
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 21855592
Can you stop sendmail and run the command as:

1) What IP address do you have in /etc/mail/submit.cf?
2) Do you have an IP address in /etc/mail/sendmail.mc?
3) Are you allowing localhost and 127.0.0.1 to relay in /etc/mail/access?  
4) Trying stopping sendmail and running -> /usr/sbin/sendmail -L sm-msp-queue -Ac -q30m

I am not seeing a "user unknown".  
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 21855614
Also, please running manually as root on the box and tell me what you get when you try to process it:

sendmail -d8.20 -Ac -qIm5NNLIs015329
0
 

Author Comment

by:jazzki
ID: 21856806
Jesper,
   Don't know what happened, but after I shutdown the sendmail daemon, issued the suggested commands, and later brought it back up, sendmail is no longer logging events to /var/log/maillog. To answer your earlier questions:
1) The IP address in /etc/mail/submit.cf is 127.0.0.1
2) The IP address in /etc/mail/sendmail.mc is also 127.0.0.1; DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1, Name=MTA')dnl
3) The localhost and 127.0.0.1 ARE listed as relays in the /etc/mail/access file
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 21856913
What was the output of:

sendmail -d8.20 -Ac -qIm5NNLIs015329
0
 

Author Comment

by:jazzki
ID: 21858439
I issued the "sendmail -d8.20 -Ac -qIm5NNLIs015329" command with nothing returned.
0
 

Author Comment

by:jazzki
ID: 21858792
Rebooted the server and now sendmail is properly logging to /var/log/maillog
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 21859032
Then that mail must have been delivered.  What does /var/log/maillog say when you grep that smtp id?
0
 

Author Comment

by:jazzki
ID: 21859800
Jesper,
   I've noticed that when I email <user>@127.0.0.1 that it doesn't show any recognizable errors in the log file. But there is no email delivered to <user>. If I try emailing simply <user> on the local machine, THEN I get the error of "Unknown user" and the mail gets bounced back to root. ??????
0
 
LVL 28

Accepted Solution

by:
Jan Springer earned 125 total points
ID: 21884057
Make sure that /etc/mail/local-host-names contains "localhost" (no quotes).

make -C /etc/mail
service sendmail restart

send email to user@localhost
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
As cyber crime continues to grow in both numbers and sophistication, a troubling trend of optimization has emerged over the last year.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question