?
Solved

Cannot send or receive email except with the root account

Posted on 2008-06-18
22
Medium Priority
?
620 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 29

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
WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

 

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 29

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 29

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 29

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 29

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 29

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 29

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 29

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 29

Accepted Solution

by:
Jan Springer earned 500 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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

801 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