LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Maddening sendmail problem -- cant send mail to remote hosts! HELP! (https://www.linuxquestions.org/questions/linux-networking-3/maddening-sendmail-problem-cant-send-mail-to-remote-hosts-help-63770/)

Bungo2000 06-05-2003 02:52 AM

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 (user@domain1.com) sent to a remote address (remote@hotmail.com), sent via another computer inside my network:

-- Mail-log: Sending message --
Jun 4 22:31:02 mail sendmail[4769]: h555V2vR004769: from=<user@domain1.com>,
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[4771]: h555V2vR004769: to=<remote@hotmail.com>,
ctladdr=<user@domain1.com> (506/506), delay=00:10:07, xdelay=00:10:07,
mailer=esmtp, pri=30459, relay=mx3.hotmail.com. [65.54.254.140], 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"
<user@domain1.com> <remote@hotmail.com> 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.

Thanks a lot!

Robert0380 06-05-2003 02:57 AM

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.

WorldBuilder 06-05-2003 07:50 AM

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.

Chris

Bungo2000 06-07-2003 02:33 PM

Anything?
 
Anyone got any ideas? Still struggling here... can't make any sense out of it.

ANYTHING will help!

Robert0380 06-07-2003 02:57 PM

mine was a setup issue, i had it listening on the default setup IP of 127.0.0.1 instead of 192.168.1.200 (used webmin to catch that).

post your sendmail.mc file here so we can see your configuration (if u dont mind).

Bungo2000 06-07-2003 04:00 PM

Yeah i know, but as you correctly pointed out, you had the opposite problem to mine, so there really is no correlation between your problem and mine.

Thanks though

Robert0380 06-09-2003 02:22 PM

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:

Code:

[bigPimp@decatur imp]# telnet mx3.hotmail.com 25
Trying 65.54.253.99...
Connected to mc7.law1.hotmail.com (65.54.253.99).
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
quit
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).

Bungo2000 06-09-2003 02:26 PM

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).

emence 06-09-2003 02:26 PM

This sounds like an issue with iptables/chains are you running iptables or chains on that box??? If so are you blocking or port re-directing 25 to another box somewhere

Bungo2000 06-09-2003 02:43 PM

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.

Robert0380 06-09-2003 02:47 PM

yea man, your server is set up fine then....sorry if you were frustrated
by my asking you did you try stuff u have already tried....i know how it is.

but...since u cant telnet to mx3.hotmail.com port 25, and i can just fine....
i'd go ahead and contact the ISP. Good luck with it.

Bungo2000 06-09-2003 03:33 PM

Yep, I'll have to. Thanks for your input. Now if only they would pick up the damn phone. . . .


All times are GMT -5. The time now is 09:50 AM.