LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 11-05-2003, 08:48 PM   #1
Douglazb
LQ Newbie
 
Registered: Nov 2003
Location: Columbus, OH
Posts: 2

Rep: Reputation: 0
Send Mail error with Internet mail


Hello all!

I'm a newbie and recently purchased Red Hat Linux 9 (and also the Red Hat Linux 9 Bible).

The Apache web server works well, however I'm experiencing difficulties with the Send Mail mail server. Sending and receiving email to internal users works well, but I'm not able to receive external email.

The return mail error is:
TCP active open: Failed connect() Error: Connection refused

Is anyone else familiar with this error, or how to resolve it?

Thanks in advance!

Douglazb
 
Old 11-06-2003, 05:42 AM   #2
stonux
Member
 
Registered: Oct 2003
Distribution: SuSE, RH
Posts: 55

Rep: Reputation: 15
You might have a firewall or packet filter (iptables) installed without having
punched the holes to allow incoming SMTP traffic. Back up your config file
/etc/sysconfig/iptables and have a look at
redhat-config-securitylevel , but be careful with it.
My version on RH 8.0 does not remember previous settings.
You also can try to run tcpdump -i eth0
to see what happens on the network.
 
Old 11-06-2003, 10:09 AM   #3
usernamenumber
Member
 
Registered: Sep 2003
Location: Somerville, MA
Distribution: Fedora/RHEL currently. Red Hat, Slackware, Debian, SuSe and Mandrake at other times
Posts: 104

Rep: Reputation: 15
While you may also be having a firewall problem as stonux suggests, Sendmail by default only accepts email from local users (on the localhost or lo interface). To change this, you will want to do the following as root:

1) BACK UP the contents of /etc/mail... just in case =
2) Edit /etc/mail/sendmail.mc
a) Look for a line that looks like this:

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

b) Add dnl (which stands for 'do not load') to the beginning of the line so it looks like:

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

3) Run the command 'm4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf'
4) Run 'service sendmail restart'

Notes:
If you get an error during step number 3 about not being able to find sendmail-cf or something to that effect, install the sendmail-cf rpm off of your RedHat CDs or run 'up2date sendmail-cf' if you have up2date set up.

Here's what those instructions have you do -- The config file that sendmail actually uses is called /etc/mail/sendmail.cf, but the syntax for that file is... wierd, to say the least. To avoid having to modify it by hand, the file /etc/mail/sendmail.mc is provided. This file is written in a special macro language called m4, which is supposedly easier to read and modify than the original sendmail.cf. When you run the contents of sendmail.mc through the m4 interpreter (step 3) it interprets those macros and produces a sendmail.cf file. Normally it would spit the new file's contents out to the sceen, but the '> /etc/mail/sendmail.cf' redirects it into a file instead. The modification you made to sendmail.mc and then translated into a new sendmail.cf simply tells sendmail to ignore the line that would normally instruct it to only listen on the local interface. When you restart sendmail (step 4) it re-reads your new sendmail.cf and should accept mail from anyone.

If you're going to run sendmail, do make sure you've got it all up2dated so that you're using all relevant security patches and set up a firewall unless you really do intend for *everyone* to be able to access this service.

Have fun.

Last edited by usernamenumber; 11-06-2003 at 10:12 AM.
 
Old 11-06-2003, 08:26 PM   #4
Douglazb
LQ Newbie
 
Registered: Nov 2003
Location: Columbus, OH
Posts: 2

Original Poster
Rep: Reputation: 0
To stonux: I'm not familiar with the iptables. The router is the firewall and I used port forwarding to direct request for port 80 (http traffic), port 25 (smtp), and port 110 (for pop). Can someone confirm these are the 3 ports that need forwarded to the computer with linux server installed?

To usernamenumber: Excellent information, however the line you referenced had already been dnl and compiled successfully.

Could the error be caused by my ISP, controlling the ip's redirected through DynDNS.org? How can I confirm with port 25 is blocked by my ISP? Any other ideas?

Thanks in advance!
Douglas
 
Old 11-07-2003, 01:21 AM   #5
stonux
Member
 
Registered: Oct 2003
Distribution: SuSE, RH
Posts: 55

Rep: Reputation: 15
Cool

iptables acts like a firewall on your linux machine. If you already have a firewall in your router, you can disable iptables and look if SMTP gets through.
 
Old 11-07-2003, 09:23 AM   #6
usernamenumber
Member
 
Registered: Sep 2003
Location: Somerville, MA
Distribution: Fedora/RHEL currently. Red Hat, Slackware, Debian, SuSe and Mandrake at other times
Posts: 104

Rep: Reputation: 15
Quote:
Originally posted by Douglazb

Could the error be caused by my ISP, controlling the ip's redirected through DynDNS.org? How can I confirm with port 25 is blocked by my ISP? Any other ideas?

Thanks in advance!
Douglas
It is very common for ISPs to block connections to low (ie service) ports on their customers' machines. As for ways to find out if its being blocked...

I think the best way would be to call your ISP and ask. They'll probably tell you that you have to buy a business account. If they say they don't filter then you should continue troubleshooting sendmail.

--Brad
 
Old 11-10-2003, 08:18 AM   #7
stonux
Member
 
Registered: Oct 2003
Distribution: SuSE, RH
Posts: 55

Rep: Reputation: 15
Post

try tcpdump -i eth0 to see whether the SMTP packets come in.
as you have opened port 80 for HTTP, check if you get your web server's test page.
I also heard about ISPs forcing an SMTP relay through them for offering antivirus and antispam services.

sorry: you said http is OK, and I already suggested tcpdump.

Last edited by stonux; 11-10-2003 at 08:22 AM.
 
  


Reply


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
can send and recieve local mail, but not mail from internet Caine101022 Linux - Software 2 09-09-2005 01:35 PM
how to configure mail client to send mail out on different pppd threads vkrishn1 Linux - Newbie 0 12-29-2004 10:54 AM
I CAN NOT SEND MAIL to users in the internet from the windows box. anigug Linux - Newbie 3 08-13-2004 03:22 PM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 06:06 PM
internet line down, cant send mail internally. dashburner Linux - Networking 1 11-12-2003 12:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:25 PM.

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