Solved

Cannot Receive Email out side of the internet

Posted on 2004-10-04
16
842 Views
Last Modified: 2013-12-23
Operating System: Redhat AS 3.0
Sendmail version: sendmail-8.12.11-4.RHEL3.1
Sendmail-cf version: sendmail-cf-8.12.11-4
There is no firewall on my router or turn on in Redhat

I can send mail out local. I can send it out using a mail client software(outloook)  But I cannot received mail from anyone outside the internet.
Below is the error. Currently in my sendmail.mc I have O DaemonPorOptions=Port=smtp,Addr=0.0.0.0, Name=MTA

I cannot understand the unknown user
 <<< 550 5.7.1 <reggie@truesdales.com>... Relaying denied
> 550 5.1.1 <reggie@truesdales.com>... User unknown

> From MAILER-DAEMON@www.createdbyhand.com  Thu Sep 30 11:18:35 2004
> Date: Thu, 30 Sep 2004 11:18:35 -0400
> From: Mail Delivery Subsystem <MAILER-DAEMON@www.createdbyhand.com>
> Message-Id: <200409301518.i8UFIZKb020857@www.createdbyhand.com>
> To: <root@createdbyhand.com>
> MIME-Version: 1.0
> Content-Type: multipart/report; report-type=delivery-status;
>            boundary="i8UFIZKb020857.1096557515/www.createdbyhand.com"
> Subject: Returned mail: see transcript for details
> Auto-Submitted: auto-generated (failure)
>
> This is a MIME-encapsulated message
>
> --i8UFIZKb020857.1096557515/www.createdbyhand.com
>
> The original message was received at Thu, 30 Sep 2004 11:18:35 -0400
> from localhost [127.0.0.1]
>
>    ----- The following addresses had permanent fatal errors -----
> <reggie@truesdales.com>
>     (reason: 550 5.7.1 <reggie@truesdales.com>... Relaying denied)
>
>    ----- Transcript of session follows -----
> ... while talking to truesdales.com.:
> >>> DATA
> <<< 550 5.7.1 <reggie@truesdales.com>... Relaying denied
> 550 5.1.1 <reggie@truesdales.com>... User unknown
> <<< 503 5.0.0 Need RCPT (recipient)
> 451 4.0.0 hash map "Alias0": unsafe map file /etc/aliases.db: Permission denied
>
> --i8UFIZKb020857.1096557515/www.createdbyhand.com
> Content-Type: message/delivery-status
>
> Reporting-MTA: dns; www.createdbyhand.com
> Received-From-MTA: DNS; localhost
> Arrival-Date: Thu, 30 Sep 2004 11:18:35 -0400
>
> Final-Recipient: RFC822; reggie@truesdales.com
> Action: failed
> Status: 5.7.1
> Remote-MTA: DNS; truesdales.com
> Diagnostic-Code: SMTP; 550 5.7.1 <reggie@truesdales.com>... Relaying denied
> Last-Attempt-Date: Thu, 30 Sep 2004 11:18:35 -0400
>
> --i8UFIZKb020857.1096557515/www.createdbyhand.com
> Content-Type: message/rfc822
>
> Return-Path: <root@createdbyhand.com>
> Received: from www.createdbyhand.com (localhost [127.0.0.1])
>            by www.createdbyhand.com (8.12.8/8.11.6) with ESMTP id i8UFIYKb020855
>            for <reggie@truesdales.com>; Thu, 30 Sep 2004 11:18:35 -0400
> Received: (from root@localhost)
>            by www.createdbyhand.com (8.12.8/8.12.5/Submit) id i8UFIY2w020853
>            for reggie@truesdales.com; Thu, 30 Sep 2004 11:18:34 -0400
> From: root <root@createdbyhand.com>
> Message-Id: <200409301518.i8UFIY2w020853@www.createdbyhand.com>
> Subject: testing22222
> To: reggie@truesdales.com
> Date: Thu, 30 Sep 2004 11:18:34 -0400 (EDT)
> X-Mailer: ELM [version 2.5 PL0pre8]
> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> ddd
>
> --i8UFIZKb020857.1096557515/www.createdbyhand.com--
0
Comment
Question by:reggiet
  • 8
  • 4
  • 3
  • +1
16 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 12221110
I presume that www.createdbyhand.com is your RHEL mail server.

It sounds like /etc/mail/access doesn't contain:

# by default we allow relaying from localhost...
localhost.localdomain           RELAY
localhost                       RELAY
127.0.0.1                       RELAY

It also appears that the permissions on /etc/access.db are wrong. That file should be owned by root, group smmsp and be rw-r-----.

And finally you don't change the line that read:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

in /etc/mail/sendmail.mc, but rather you comment it out, like:

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
0
 

Author Comment

by:reggiet
ID: 12223416
I presume that www.createdbyhand.com is your RHEL mail server.

>> No, that was a server that was trying to send me email. It did matther who was the sender I continue to get the same error.


It sounds like /etc/mail/access doesn't contain:

>> Here is what i have.
localhost.localdomain           RELAY
localhost                       RELAY
127.0.0.1                       RELAY
truesdals.com                   RELAY
192.168.1.11                    RELAY
172.16                       RELAY  
aol.com                         RELAY
nc.us.ibm.com                   RELAY
192.168.0                

 It also appears that the permissions on /etc/access.db are wrong. That file should be owned by root, group smmsp and be rw-r-----.

 >> I change the access.db to 640 rw-r----. It still did not work.    

And finally you don't change the line that read:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

in /etc/mail/sendmail.mc, but rather you comment it out, like:

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

>> I comment the correct change by comment out the following statement. Yet It did not work.

When I try to send mail to myself from aol account this is what I receive from the maillog.


s.com., dsn=4.0.0, stat=Deferred: Connection refused by truesdales.com.      
Oct  4 22:14:47 server sendmail[4692]: i8UEE8hj004261: to=<reggie@truesdales.c
>, ctladdr=<root@server.truesdales.com> (0/0), delay=4+12:00:39, xdelay=00:00:
, mailer=esmtp, pri=10200480, relay=truesdales.com., dsn=4.0.0, stat=Deferred:
onnection refused by truesdales.com.                                          
Oct  4 22:15:40 server sendmail[4748]: i952FdOp004748: from=<RegTrue@aol.com>,

0
 
LVL 40

Expert Comment

by:jlevie
ID: 12223963
After the changes to sendmail.mc did you restart sendmail? And when you did so did the timestand on /etc/mail/sendmail.cf show as later than that on /etc/mail/sendmail.mc?

What happens if you do:

cd /etc/mail
touch sendmail.mc
m4 sendmail.mc >sendmail.cf

What does hostname return? And what does /etc/hosts contain?

What is in /etc/mail/local-host-names

You probably don't want to have:

aol.com                         RELAY
nc.us.ibm.com                   RELAY

in /etc/mail/access. That would permit hosts outside of your domain or local network the right to relay mail through your server. In the access map you really only want IP's or netblocks that you or your people control to have relay privs. Anything else may leave your mail server open for use by spammers.
0
 

Author Comment

by:reggiet
ID: 12226647
What happens if you do:

cd /etc/mail
touch sendmail.mc
m4 sendmail.mc >sendmail.cf

>> I tried this to no avail.

What does hostname return? And what does /etc/hosts contain?

server.truesdales.com

/etc/hosts contains

127.0.0.1 localhost.localdomain localhost
192.168.1.12         server.truesdales.com server


0
 

Author Comment

by:reggiet
ID: 12226680
What is in /etc/mail/local-host-names

Nothing is in local-host-names file.
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 12227350
Add "truesdale.com" to /etc/local-host-names and restart sendmail.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12228054
> m4 sendmail.mc >sendmail.cf
>> I tried this to no avail.

Meaning that the command completed successfully, or gave errors?

To be certain that there's not a local firewall execute '/sbin/iptables -L' If you see anything other than ACCEPT, there are firewall rules active.

What happens if you 'telnet localhost 25', and 'telnet 192.168.1.12 25'?
0
 

Author Comment

by:reggiet
ID: 12228888
>>Add "truesdale.com" to /etc/local-host-names and restart sendmail.
This appears to work. I do not know how but I now can receive mail from the internet. Thank you all for your help.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 34

Expert Comment

by:PsiCop
ID: 12229577
It tells sendmail that one of the Domain Names associated with the local host is "truesdale.com", and therefore E-Mail addressed to that Domain should be accepted for local delivery.
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 12229597
Your problem, fundamentally, was that sendmail only "knew" about "createdbyhand.com". When it received an E-Mail addressed to "truesdale.com", it thought it had to relay that. But relaying is denied by default in modern sendmail versions, which you have. So sendmail would refuse to relay.
0
 

Author Comment

by:reggiet
ID: 12230137
I have a similar with another server call unionchapel.us

I have added unionchapel.us to the local-host-names and restart sendmail.
Also I have commented out DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

Below is my error. This example. I am send from machine call server.truesdales.com to a email address  reggie@unionchapel.us

> The original message was received at Tue, 5 Oct 2004 15:09:48 -0400
> from root@localhost
>
>    ----- The following addresses had permanent fatal errors -----
> ldkfldfk
>     (reason: 550 5.1.1 <ldkfldfk@server.truesdales.com>... User unknown)
>     (expanded from: ldkfldfk)
>
>    ----- Transcript of session follows -----
> ... while talking to [127.0.0.1]:
> >>> DATA
> <<< 550 5.1.1 <ldkfldfk@server.truesdales.com>... User unknown
> 550 5.1.1 ldkfldfk... User unknown
>
> --i95J9m4g004467.1097003388/server.truesdales.com
> Content-Type: message/delivery-status
>
> Reporting-MTA: dns; server.truesdales.com
> Arrival-Date: Tue, 5 Oct 2004 15:09:48 -0400
>
> Final-Recipient: RFC822; ldkfldfk@server.truesdales.com
> Action: failed
> Status: 5.1.1
> Remote-MTA: DNS; [127.0.0.1]
> Diagnostic-Code: SMTP; 550 5.1.1 <ldkfldfk@server.truesdales.com>... User unknown
> Last-Attempt-Date: Tue, 5 Oct 2004 15:09:48 -0400
>
> --i95J9m4g004467.1097003388/server.truesdales.com
> Content-Type: message/rfc822
>
> Return-Path: <root>
> Received: (from root@localhost)
>              by server.truesdales.com (8.12.11/8.12.11/Submit) id i95J9m4f004467;
>              Tue, 5 Oct 2004 15:09:48 -0400
> From: root <root>
> Message-Id: <200410051909.i95J9m4f004467@server.truesdales.com>
> Subject: LOVE
> To: reggie@unionchapel.us
> Date: Tue, 5 Oct 2004 15:09:48 -0400 (EDT)
> Cc: ldkfldfk
> X-Mailer: ELM [version 2.5 PL0pre8]
> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> dfsdfd
>
>
> --i95J9m4g004467.1097003388/server.truesdales.com
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 12230323
Is "ldkfldfk" a valid username?
0
 

Author Comment

by:reggiet
ID: 12230344
no I do not understand where he is getting this user from.
0
 

Author Comment

by:reggiet
ID: 12230422
Also from unionchapel.us maillog file

I receive an erro  from LinuxServer sendmail:24.136.221.228(truesdales.com) did not issue MIAL/EXPN/VRFY/ETRN during connection to MTA
0
 

Accepted Solution

by:
fab29 earned 250 total points
ID: 12408277
Edit sendmail.cw and add a line for each domain you want to accept mail for.

sendmail.cw is simply a list of domains that are considered as local domains.
0
 

Author Comment

by:reggiet
ID: 12413852
Ok thanks that seem to work. Thanks again.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
site to site tunnel not autostarting 5 32
NSD FAIL 2 19
Server Room Hardware 5 46
iPad Won't Connect 16 34
Lets look at the default installation and configuration of FreeProxy 4.10 REQUIREMENTS 1. FreeProxy 4.10 Application - Can be downloaded here (http://www.handcraftedsoftware.org/index.php?page=download) 2. Ensure that you disable the windows fi…
What’s a web proxy server? A proxy server is a server that goes between clients and web servers, used in corporate to enforce corporate browsing policy and ensure security. Proxy servers are commonly used in three modes. A)    Forward proxy …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

16 Experts available now in Live!

Get 1:1 Help Now