Solved

Cannot send or receive email except with the root account

Posted on 2008-06-18
22
611 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
  • 9
  • 8
22 Comments
 
LVL 16

Expert Comment

by:The--Captain
Comment Utility
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
Comment Utility
Yes please, if you could do that.
0
 
LVL 28

Expert Comment

by:Jan Springer
Comment Utility
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
 

Author Comment

by:jazzki
Comment Utility
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
Comment Utility
what is the output of "ps awx | grep sendmail" no quotes?
0
 

Author Comment

by:jazzki
Comment Utility
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
Comment Utility
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
Comment Utility
Also, do:

ls -ld /var/spool/clientmqueue
0
 

Author Comment

by:jazzki
Comment Utility
"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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 28

Expert Comment

by:Jan Springer
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
What was the output of:

sendmail -d8.20 -Ac -qIm5NNLIs015329
0
 

Author Comment

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

Author Comment

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

Expert Comment

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

Author Comment

by:jazzki
Comment Utility
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
Comment Utility
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

Do email signature updates give you a headache?

Do you spend too much time managing email signatures? Hate visiting every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Well, let Exclaimer give your company the email signature it deserves!

Join & Write a Comment

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
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…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now