Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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.
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.
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:
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!
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
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.
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
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.
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. )
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.