?
Solved

Cannot send or receive email except with the root account

Posted on 2008-06-18
22
Medium Priority
?
623 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
18 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

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

I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
In this article I will be showing you how to subnet the easiest way possible for IPv4 (Internet Protocol version 4). This article does not cover IPv6. Keep in mind that subnetting requires lots of practice and time.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

840 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