Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-05-2003, 09:55 PM   #1
LQ Newbie
Registered: Oct 2003
Posts: 3

Rep: Reputation: 0
Sendmail local delivery

I have two Linux servers set up, and I am having a hard time getting them to send mail to each other. They are each set up behind the same firewall, but have a different domain name. What I want to do is be able to have them send mail to each other. Whenever I try, though, the receiving server doesn't seem to get anything, and I see the following in my log on the sending server:

Oct 5 22:11:36 zues sendmail[7858]: h92C5OBe010283: to=admin@mydomain
, delay=3+14:05:12, xdelay=00:00:00, mailer=esmtp, pri=7862515,, dsn=4.0.0, stat=Deferred: Connection timed out with

The servers can "talk" to each other just fine otherwise. I am able to telnet and ftp between each of them no problem.

Is this a problem with Sendmail, DNS, or something else?

I am using Red Hat 9 with the most recent version of Sendmail.
Old 10-05-2003, 11:01 PM   #2
Registered: Jul 2003
Distribution: Currently Suse 11.1 but have RH7,8,9 / Fedora 7,8_64,9_64,&10_64
Posts: 634

Rep: Reputation: 30
do you have dns set up on any of the "local " boxes?
if not it is looking to an "outside" dns server that may or may not know about your
"internal" domains
Old 10-06-2003, 01:14 AM   #3
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
an easier way to get around actually setting up DNS may be to use the /etc/hosts file

put entries in each one for each box. this way you dont have ot setup a DNS server. you cold also send by ipaddress:

To: root@[]

that should also work.
Old 10-06-2003, 05:23 AM   #4
LQ Newbie
Registered: Oct 2003
Posts: 3

Original Poster
Rep: Reputation: 0
I do have an entry in the /etc/hosts file on both my servers, so they can communicate with each other fine, such as with telnet and ftp. I can ping each server by domain name as well.

I do not have DNS set up on any of the local boxes.

When I try to send by ip address, I get the following error in my maillog:

Oct 6 06:26:05 zues sendmail[8380]: h96AQ56A008378: to=<root@>, ctl
addr=<> (1068/1068), delay=00:00:00, xdelay=00:00:0
0, mailer=esmtp, pri=30348, relay=, dsn=5.1.2, stat=Host unknown (Nam
e server: host not found)
Oct 6 06:26:05 zues sendmail[8380]: h96AQ56A008378: h96AQ56A008380: DSN: Host u
nknown (Name server: host not found)

This suggests maybe I do need to set up DNS on one of my local boxes:

Oct 6 06:27:05 zues sendmail[8380]: h96AQ56A008380:
, delay=00:01:00, xdelay=00:01:00, mailer=esmtp, pri=31391, [PUBLIC IP IS LISTED HERE], dsn=4.0.0, stat=Deferred: Connection timed out with

I cannot ping either server with public ip, only domain name and local ip, which I think works because of my hosts file.
Old 12-13-2003, 09:23 AM   #5
Registered: Sep 2003
Location: In front of my LAN
Distribution: Redhat
Posts: 82

Rep: Reputation: 15 DNS must to send/recieve mail in a LAN between two PC...
Old 12-13-2003, 12:57 PM   #6
LQ Newbie
Registered: Oct 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Mairul: I'm not quite sure what your reply meant, but I am trying to send/recieve mail in a LAN between two PC's.

Do I need to have a DNS server set up on one of the local boxes for this to work?
Old 12-13-2003, 01:32 PM   #7
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 75
What you're missing is an MX record. You *may* be able to trick sendmail by putting the alias "mailhost" (without the quotes) behind the IP + name of your other server in the /etc/hosts file, but I rather doubt it... (I think that will send *all* mail to the other server, and vis versa).

What you should do is setup a mini-internet (little 'i') with at least one DNS server and set each box to query it. You will need two domain zones (domain1, domain2) and each one will have a different MX . So at minimum you'll need:
1 DNS server
2 "forward" zones
1 "reverse" zone (not counting
1 "A record" for each zone
1 "MX record" for each zone

By the way, I should point out that this is the way to set it up if you want to simulate two sites on the Internet (for experience). It's possible to use Sendmail's mailer table maps to cause mail for either domain to be delivered to what ever host you want (with no DNS at all).

If you want to get Internet experience, use the setup with DNS. If you want to get LAN/WAN experience, use the mailer table setup.

Last edited by chort; 12-13-2003 at 01:34 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail 30sec delay between ident and delivery... rebel761 Linux - Networking 1 10-05-2005 10:35 AM
exim4: fetchmail and local delivery thw Linux - Networking 3 07-16-2005 04:54 PM
local user on sendmail nabil_boussetta Linux - Networking 1 03-05-2004 07:47 AM
Local mail only in Sendmail jhildebrand Linux - Software 0 06-13-2003 01:46 PM
sendmail local delivery problems jhildebrand Linux - Networking 0 04-24-2003 03:56 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration