Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
08-05-2003, 05:55 AM
|
#1
|
|
Member
Registered: Jan 2003
Location: des moines, ia
Distribution: suse RH
Posts: 117
Rep:
|
connection refused - mail
RH8.0 - when I try to send out an email I get 'Connection refused by <name of my RH server I am sending from>'. Can this be a firewall issue. I'm thinking I had this problem some time ago but cannot find my notes as to how it was resolved. Any ideas?
Thanks! j-me
|
|
|
|
08-05-2003, 07:30 AM
|
#2
|
|
Member
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362
Rep:
|
Assuming you have internet access and are able to browse the web, yes this could be a firewall problem. Check the OUTPUT chain of your filter table with 'iptables -t filter -L OUTPUT' and ensure that you either aren't restricting outbound connections, or that SMTP is allowed out from your machine.
|
|
|
|
08-05-2003, 10:37 AM
|
#3
|
|
Member
Registered: Jan 2003
Location: des moines, ia
Distribution: suse RH
Posts: 117
Original Poster
Rep:
|
output:
target prot opt source destination
Is this "prot" what you are talking about? Do I need to change it? How?
|
|
|
|
08-05-2003, 08:51 PM
|
#4
|
|
Member
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446
Rep:
|
Hi J-me!
I suspect it has got nothing to do with your firewall, since your mail server is running on the same host as that from whihc you are sending the mail, correct?
If you are using sendmail, you probably have forgotten to configure the file --
#*****************************************************************************#
#
# file : /etc/mail/local-host-names
#
#*---------------------------------------------------------------------------*#
#
# All alias names (CNAME and MX records) for the localhost must be included.
#
#.............................................................................#
#
|
|
|
|
08-06-2003, 08:10 AM
|
#5
|
|
Member
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362
Rep:
|
prot is for 'protocol'. The listing you've shown indicates that you've got no output filtering. This is good.
Perhaps sendmail isn't running or listening on the loopback interface. Try running
netstat -a -n -p | grep ':25'
and see what you get. If it is not listening, but started, you'll need to adjust an option in sendmail.cf (using an m4 macro) called DAEMON_OPTIONS.
|
|
|
|
08-06-2003, 02:55 PM
|
#6
|
|
Member
Registered: Jan 2003
Location: des moines, ia
Distribution: suse RH
Posts: 117
Original Poster
Rep:
|
I am sending outside the firewall to a third party exchange server.
I ran the netstat and got:
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 649/sendmail: accep
I tried telnet smptemail 25 and was able to send email fine. sendmail seems to not be configured properly. I have done nothing with it since I installed so any ideas?
Thanks. j-me
|
|
|
|
08-06-2003, 03:01 PM
|
#7
|
|
Member
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446
Rep:
|
What about the idea I posted in post #4?
|
|
|
|
08-06-2003, 05:35 PM
|
#8
|
|
Member
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362
Rep:
|
The fact that it is only listing 127.0.0.1:25 means that it is only going to connect if you 'telnet 127.0.0.1 25'. But, if you try to connect using 'telnet 1.2.3.4 25' it will timeout because sendmail isn't working on this 'interface'. You need to edit your /etc/sendmail.mc (or similar, I can't be certain where your origonal .mc file is) and change
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
and add below it
DAEMON_OPTIONS(`Port=smtp,Addr=1.2.3.4, Name=MTA')
Then, build your .cf file with
m4 /etc/sendmail.mc > /etc/sendmail.cf
Then, restart sendmail
/etc/rc.d/init.d/sendmail restart
Then, try that netstat command again. This time, if you are a pimp, you'll see
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 666/sendmail: accep
tcp 0 0 1.2.3.4:25 0.0.0.0:* LISTEN 666/sendmail: accep
And now you'll be able to connect to the SMTP server from outside the box. 'telnet 1.2.3.4 25' will work.
This is a change in the default configuration of sendmail on RedHat. I had to do this with my box, and it should work for you, too.
Good luck.
|
|
|
|
08-06-2003, 06:18 PM
|
#9
|
|
Member
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446
Rep:
|
And if you are using the latest sendmail with the clientmqueue
submission daemon, you will also need to add the line
FEATURE(`msp', `[your_host.your_domain.COM]')dnl
to the end of /etc/mail/submit.mc
and do not forget to do a
# cd /etc/mail
# make clean
# make
to regenerate you sendmail.cf and submit.cf
|
|
|
|
08-07-2003, 07:06 AM
|
#10
|
|
Member
Registered: Jan 2003
Location: des moines, ia
Distribution: suse RH
Posts: 117
Original Poster
Rep:
|
okay I editted sendmail.mc.
typed #m4 /etc/mail/sendmail > /etc/mail/sendmail.cf
error message:
/etc/mail/sendmail.mc:8: m4: Cannot open /usr/share/sendmail-cf/m4/cf.m4: No such file or directory
I check /usr/share and sure enough there is no sendmail-cf directory.
# rpm -q sendmail
sendmail-8.12.5-7
# rpm -q m4
m4-1.4.1-11
Is this issue new with RH 8.0 cause I do not remember having so much trouble with 7.3? sendmail just worked with very little changes.
Last edited by j-me; 08-07-2003 at 12:18 PM.
|
|
|
|
08-07-2003, 03:03 PM
|
#11
|
|
Member
Registered: Jan 2003
Location: des moines, ia
Distribution: suse RH
Posts: 117
Original Poster
Rep:
|
I found the reason why I could not get m4 to run. should read a little more. now that I've fixed that, ran m4 and restarted sendmail. Still no email sent. On a whim I installed RH7.3 on a laptop and, without any configuration of sendmail, I tested this same issue. It worked! AUGH! The issue is with 8.0 but how do I work around it? Download the latest 8.12.9 and discard RH8.0 sendmail distro. I think I'm gong to give that a try.
Thanks! j-me
|
|
|
|
08-07-2003, 05:26 PM
|
#12
|
|
Member
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446
Rep:
|
Quote:
Originally posted by j-me
okay I editted sendmail.mc.
typed #m4 /etc/mail/sendmail > /etc/mail/sendmail.cf
|
And how about editing the /etc/mail/submit.mc file as I suggested?
|
|
|
|
08-08-2003, 08:24 AM
|
#13
|
|
Member
Registered: Jan 2003
Location: des moines, ia
Distribution: suse RH
Posts: 117
Original Poster
Rep:
|
Corin,
I did edit submit.mc:
FEATURE(`msp', `[your_host.your_domain.COM]')dnl
I understand it to be
FEATURE(`msp', `myhost.mydomain.COM')dnl
Is this correct?
In /etc/mail I did a
# make clean
# make
# lsl (verified date/time stamp changed for submit.cf)
# /etc/rc.d/init.d/sendmail restart
tried to resend mail
# mail -s test2 <address>
I check /var/log and now I get no attempt to send mail.
I even tried lower-case .com. same result.
One thing I noticed in previous attempts compared to those server that work using 7.3, the maillog relay=outlook.kfbs.com.
On 8.0 maillog, the relay is my server I am trying to send from.
(relay=3wtlap.kfbs.com) Just a difference that may be worth noting.
Am I just doing something wrong?
Thanks for your patience and help. j-me
okay, found out what was wrong. It IS working!!! 8)
Thank you all very much!
Last edited by j-me; 08-08-2003 at 08:32 AM.
|
|
|
|
08-08-2003, 01:22 PM
|
#14
|
|
Member
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446
Rep:
|
j-me
For our benefit and other readers of this thread, please could you post what you did to solve the problem?
When other people who have a similar problem read this thread, it would be very helpful for them to see what was your solution.
|
|
|
|
09-18-2003, 02:05 PM
|
#15
|
|
Member
Registered: Jan 2003
Location: des moines, ia
Distribution: suse RH
Posts: 117
Original Poster
Rep:
|
Sorry Corin. Just read this message.
What I did to resolve this issue is to run:
# make clean
# make submit
and sent an email. It worked!
Thanks!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:45 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|