Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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, relay=mydomain.com., dsn=4.0.0, stat=Deferred: Connection timed out with mydomain.com
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.
Distribution: Currently Suse 11.1 but have RH7,8,9 / Fedora 7,8_64,9_64,&10_64
Posts: 634
Rep:
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
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@192.168.0.5>, ctl
addr=<root@mydomain.com> (1068/1068), delay=00:00:00, xdelay=00:00:0
0, mailer=esmtp, pri=30348, relay=192.168.0.5, dsn=5.1.2, stat=Host unknown (Nam
e server: 192.168.0.5: host not found)
Oct 6 06:26:05 zues sendmail[8380]: h96AQ56A008378: h96AQ56A008380: DSN: Host u
nknown (Name server: 192.168.0.5: 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: to=steve@mydomain.com
, delay=00:01:00, xdelay=00:01:00, mailer=esmtp, pri=31391, relay=otherserveralias.mydomain.com. [PUBLIC IP IS LISTED HERE], dsn=4.0.0, stat=Deferred: Connection timed out with
cs5.mydomain.com
I cannot ping either server with public ip, only domain name and local ip, which I think works because of my hosts file.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
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 0.0.127.in-addr.arpa)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.