Maddening sendmail problem -- cant send mail to remote hosts! HELP!
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Maddening sendmail problem -- cant send mail to remote hosts! HELP!
I have a problem sending e-mail from local users to remote addresses using sendmail 8.12 on an apache/sendmail server.
I am inside a LAN, with DSL (dynamic IP, static coming soon), and port forwarding for my server.
The server handles 3 domains (domain1.com, domain2.com, domain3.com)
When I try to send an e-mail to a remote address, mailq reports it Deferred: Connection timed out with remotemailserver.com
Here is what happens to a message from a local user (firstname.lastname@example.org) sent to a remote address (email@example.com), sent via another computer inside my network:
-- Mail-log: Sending message -- Jun 4 22:31:02 mail sendmail: h555V2vR004769: from=<firstname.lastname@example.org>,
size=1203, class=0, nrcpts=1, msgid=<000801c32b23$a5d6bfb0$0200a8c0>,
proto=SMTP, daemon=MTA, relay=[192.168.0.2]
-- Mail-log: Message Deferred -- Jun 4 22:41:09 mail sendmail: h555V2vR004769: to=<email@example.com>,
ctladdr=<firstname.lastname@example.org> (506/506), delay=00:10:07, xdelay=00:10:07,
mailer=esmtp, pri=30459, relay=mx3.hotmail.com. [22.214.171.124], dsn=4.0.0,
stat=Deferred: Connection timed out with mx3.hotmail.com.
-- Mail-Queue: Message status -- qfh555V2vR004769 Wed, 4 Jun 2003 22:31:00 -0700 "User's Name"
<email@example.com> <firstname.lastname@example.org> 1 kB Deferred: Connection timed out with mx3.hotmail.com.
I can think of three things:
1. Sendmail is configured incorrectly (I've been through it very carefully and can't see any problems. I've read all the docs, HOWTOs, etc.)
2. hostname/hosts file is set incorrectly. I am still a bit confused about what exaclty goes there, so this may be causing a problem. My hostname is set to mail.domain1.com, and I have listings in /etc/hosts for 127.0.0.1 which points to localhost.localdomain and localhost, and also for my internal IP and public IP (at the time of sending) that both point to: mail, mail.domain1.com, domain1.com, www.domain1.com, mail.domain2.com, domain2.com, www.domain2.com, and the same for domain 3.
3. A strange but plausible explanation: something is blocking access to port 25 on its way. If I telnet to mx3.hotmail.com from the server, the IP address is resolved, but the connection to it times out. I have also had trouble recently sending mail from other computers on the LAN through remote e-mail servers that always worked before, and should provide access for my account. I have to send my normal mail via web interfaces!
Note that I set my server up as a DMZ server with my router, and the same problem occured with outgoing email. I also had iptables stopped.
Also note that I can recieve mail to my sendmail server from both local and remote addresses without any problem, and it correctly handles all 3 domains.
If anyone has any ideas as to whats going wrong, I'd really appreciate it. I've been trying to get this working for 3 days straight (literally) and finally resorted to asking here!
If anyone would like me to provide more information about my configuration/network or show more logs, I'd be happy to.
man we have the EXACT oposite problem, i can send all the mail out i want but cant recieve mail. mine is on a rh 7.3 box, all i did to get it working was edit my sendmail.mc file, i changed the domain name part to my domain name and then ran the m4 command on it, restarted the server and it worked. but like i said...i cant recieve an email to save my life.
Robert, your problem is different than Bungo's. It's the exact opposite. Robert, I think your problem is with MX records in DNS. Is your mail server also running a DNS server? If it is, setup MX records properly. If not, tell MX records where to point for your name resolution.
Bungo, hmmmmmmmmmm..... This is a strange one... I'm not quite sure, so let me research it and I'll let you know what I find out. Check back later.
recieving mail just fine, that eliminates DNS problems.
you said in the 1st post that the mail was sent through your box and not from
your box.....have you tried sending it from the box itself? Also,
have you tried sending to something other than a hotmail account, it atleast
doest seem to be trying to get out so I assmue you set it up to allow relaying
from the internal hosts.
i telneted to mx3.hotmail.com and it works for me:
[bigPimp@decatur imp]# telnet mx3.hotmail.com 25
Connected to mc7.law1.hotmail.com (126.96.36.199).
Escape character is '^]'.
220 mc7-f2.law1.hotmail.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.5600 ready at Mon, 9 Jun 2003 12:20:01 -0700
221 mc7-f2.law1.hotmail.com Service closing transmission channel
Connection closed by foreign host.
when u tried to telnet, did u specify port 25? if you do that and it still
doesnt work, then like u said before...something could be blocking outgoing
on port 25, i thin som ISPs do that to prevent open mail relay problems (spam).
Yes of course I've tried all those things. I've set up mail servers before, I still believe its a problem with either my router or my ISP (should be contacting my ISP today, and i'll try another router too).
No, it's nothing to do with IPtables, as I said (I don't know if you read the post), IP tables was disabled. As I also said, I cant send any mail out from any computer on the LAN going through port 25 outside the LAN, nor can i telnet to any server on port 25.