LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-16-2002, 02:22 PM   #1
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Rep: Reputation: 15
Unhappy Another SMTP question...


Hi all,

Been a while since i posted here, been having too much fun...stressing people in linux irc channels

Anyway, I'm trying to setup an email server...so far i've got imap working correctly, and it seems like i can recieve email on a windows client (using outlook) but i cant send email using smtp, its like the box isn't accepting any connections from any machine on port 25.

*note i am able to send email from that machine, but cant on the clients*.

I get -

Quote:
The connection to the server has failed. Account: '192.168.0.3', Server: '192.168.0.3', Protocol: SMTP, Port: 25, Secure(SSL): Yes, Socket Error: 10061, Error Number: 0x800CCC0E
I did a search, and realise that this is a popular question, but i have tried doing what people have suggested, but it still comes up with that error. If anybody needs to know, i'm running rh 7.3.

Would somebody kindly help me?
Thankyou.
 
Old 08-16-2002, 03:25 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Try to use
telnet 192.168.0.3 smtp
Look if you get your mail server welcome line. If you get it, it's probebly because of the setup. I don't know which mailserver you use, but browse its documentation for a magic word 'relay'. Relay setup is your problem.
 
Old 08-16-2002, 03:33 PM   #3
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
Thanks for the reply.

Ye, i tried to telnet to the machine,

Quote:
telnet 192.168.0.3

No connection could be made because the target machine actively refused it.
I also tried doing it locally...

Quote:
telnet localhost 25

trying 127.0.0.1...
telnet: connect to 127.0.0.1: connection refused
But i am still able to send mail with balsa.
 
Old 08-17-2002, 10:31 AM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
It looks you don't have smtp running. Download smtp program for the server you're using and install it.
 
Old 08-17-2002, 10:42 AM   #5
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
Hi, Thanks for the reply.

I have just tried installing redhat 7.2, and i am able to connect to it locally and remotely through telnet...but when i try to use outlook to connect to send email i still get -

Quote:
The connection to the server has failed. Account: '192.168.0.3', Server: '192.168.0.3', Protocol: SMTP, Port: 25, Secure(SSL): Yes, Socket Error: 10061, Error Number: 0x800CCC0E
I haven't got a clue whats wrong

Thanks for your time.
 
Old 08-17-2002, 11:24 AM   #6
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
What mail server are you using? Try port scanning yourself (# nmap -sS localhost) and see if the SMTP port is open. Make sure you don't have a firewall blocking the traffic.
 
Old 08-17-2002, 11:26 AM   #7
IanC
LQ Newbie
 
Registered: May 2002
Location: London
Distribution: RedHat 7.3, FreeBSD 4.6
Posts: 12

Rep: Reputation: 0
In Outlook, check your account settings for the outgoing mail server. Make sure it is set to NOT use SSL or authenticate to the SMTP server in any way.

The error message you posted seems to indicate it's trying to encrypt the connection.

Ian
 
Old 08-17-2002, 08:53 PM   #8
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
Still no luck guys

Tried quite a few things now...even searching LQ + through google for mailing lists...
 
Old 08-18-2002, 04:01 AM   #9
IanC
LQ Newbie
 
Registered: May 2002
Location: London
Distribution: RedHat 7.3, FreeBSD 4.6
Posts: 12

Rep: Reputation: 0
Weird...

Try going through this lot:

1. Check your settings in Balsa on the server (you said that worked okay?). Is it set to use localhost:25 as its outgoing mail server? It's possible that it's set to use your ISP's SMTP server, which would explain why that works and other things (including trying to telnet to port 25 locally) don't.

2. If Balsa is set to use localhost:25 and is definitely working, but you still can't telnet to localhost 25, I don't know what could be wrong.

3. As root, run lokkit. Make sure it is set to accept incoming connections on port 25 (SMTP).

4. Again as root, run `ps -aux |grep sendmail` - if sendmail is running, you should see a process named something like "sendmail: accepti" (ignore the 'grep' process).

5. If the above didn't show up, check that sendmail is installed. If you're using RedHat, run (as root) `rpm -qa |grep sendmail`. You should see three entries - mine comes back with:

sendmail-8.11.6-15
sendmail-cf-8.11.6-15
sendmail-devel-8.11.6-15

6. If it is installed, but not running (5 worked, 4 didn't), then you may just need to start it. As root, run `/etc/init.d/sendmail start`.

7. If it's not installed, you'll need to find the above three RPM's (they'll be slightly different versions on 7.2 but otherwise named the same) on your RedHat CDs (/mnt/cdrom/RedHat/RPMS/) and run `rpm -Uvh sendmail*.rpm`. Then run step 6 again.

8. Now try telnet localhost 25 from the server, and telnet ip.add.of.server 25 from the client.

Let us know how you got on, and if it's still not working, which of these steps worked and which didn't!

Ian
 
Old 08-18-2002, 04:02 AM   #10
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
Why don't you just post the o/p of nmap localhost as TruckStuff suggested?. Since you can't even do telnet localhost 25, I feel either it is not running or some firewall setting is trying to block it.
I just forgot, The normal problem with smtp is that RH by default binds it with 127.0.0.1. But somehow, I feel it is not the case here since you can't even telnet to 127.0.0.1 25. But it is good to look for a line like O DaemonPortOptions..... in your sendmail.cf and send set the bindings correctly if it is wrong.
--Sarin

Last edited by sarin; 08-18-2002 at 04:08 AM.
 
Old 08-18-2002, 06:39 AM   #11
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
IanC,

I followed your steps, heres the results.

1)nah, i dont use my isp's smtp server. It's set to localhost.

2)yep, it's definately working...I did a clean install rh 7.3 earlier on, and now i am able to - telnet localhost 25. heres the result of telnet localhost 25 -

Quote:

Connected to localhost.
escape character is '^]'.
220 localhost.localdomain ESMTP sendmail 8.11.6/8.11.6;sun 18 august 2002 12:17:10 +0100
but my clients aren't able to connect, says connection refused.

3)Ye, i turned the firewall off for a lil while, until i know where my problem is & its fixed, I'm behind a networked computer acting as a firewall, so i should be OK to turn the email server firewall off for the time being.

4)
Quote:
root 1803 0.0 0.3 4540 1772 ? S 12:02 0:00 s endmail accepti

I can now telnet to the SMTP daemon locally, but i get connection refused from clients.

heres the result from nmap

Code:
port     state    service
22/tcp   open       ssh
25/tcp   open       SMTP
109/tcp  open       pop-2
110/tcp  open       pop-3
143/tcp  open       imap
6000/tcp open       X11
I hope You's can help

thankyou for your time everybody, it is all much appreciated.
 
Old 08-18-2002, 06:52 AM   #12
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
As I told earlier, See your sendmail.cf and make sure it is not set to bind to 127.0.0.1. If you made a new RH installation, mostly this is your problem. Take it in your favourite editor and search for 127.0.0.1. If preesnt just commenting that line should do (O Daemon... ). Restart sendmail and try
mail -v -s "Test mail" postmaster@yourhost <.
( I don't know how to do it from windows. I hope you have a linux client. Or use outlook and wait till you get a reply)
--Sarin
 
Old 08-18-2002, 07:08 AM   #13
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
Hi, This is what my sendmail.cf looks like.


Code:
divert(-1)
dnl This is the sendmail macro config file. If you make changes to this file,
dnl you need the sendmail-cf rpm installed and then have to generate a
dnl new /etc/sendmail.cf by running the following command:
dnl
dnl        m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
OSTYPE(`linux')
dnl Uncomment and edit the following line if your mail needs to be sent out
dnl through an external mail server:
dnl define(`SMART_HOST',`smtp.your.provider')
define(`confDEF_USER_ID',``8:12'')dnl
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
dnl define(`STATUS_FILE', `/etc/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
dnl TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl The '-t' option will retry delivery if e.g. the user runs over his quota.
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl This changes sendmail to only listen on the loopback device 127.0.0.1
dnl and not on any other network devices. Comment this out if you want
dnl to accept email over the network.
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
dnl NOTE: binding both IPv4 and IPv6 daemon to the same port requires
dnl       a kernel patch
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')
dnl We strongly recommend to comment this one out if you want to protect
dnl yourself from spam. However, the laptop and users on computers that do
dnl not have 24x7 DNS do need this.
FEATURE(`accept_unresolvable_domains')
dnl FEATURE(`relay_based_on_MX')dnl
MAILER(smtp)
MAILER(procmail)
Cwlocalhost.localdomain
But it still fails to accept connections other than localhost/127.0.0.1.
 
Old 08-18-2002, 07:17 AM   #14
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
I think you posted sendmail.mc. Look for the file /etc/sendmail.cf. But seeing your mc file I think you don't have that option. ( It is commented out as you see here. )

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

Now I really don't know what is going wrong. Any way try posting o/p of
grep -i daemon /etc/sendmail.cf
--Sarin
sendmail.mc is the file form which you generate sendmail.cf
 
Old 08-18-2002, 07:31 AM   #15
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
Hi sarin,

I see what you mean, i did a lil search, and was able to generate the sendmail.cf from sendmail.mc by using

Quote:
m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
I am now able to telnet to the email server, but when i try to send an email to my address. I get

Quote:
The message could not be sent because one of the recipients was rejected by the server. The rejected e-mail address was 'kjoy96@hotmail.com'. Subject 'sdfsdf', Account: '192.168.0.3', Server: '192.168.0.3', Protocol: SMTP, Server Response: '550 5.7.1 <my@email.com>... Relaying denied. IP name lookup failed [192.168.0.2]', Port: 25, Secure(SSL): No, Server Error: 550, Error Number: 0x800CCC79
I'll be glad when i get this to work
 
  


Reply



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
Squirrelmail smtp authentication question craven Linux - Software 1 01-28-2013 11:43 PM
Qmail SMTP Question kemplej Linux - Networking 4 04-13-2004 03:35 AM
qmail SMTP forward question.... rabbate Linux - General 2 04-01-2004 01:27 PM
qmail SMTP forward question.... rabbate Linux - Software 0 03-31-2004 12:07 AM
noob question about pop/smtp and ssl caid Linux - Security 3 02-16-2004 06:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:12 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