LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-22-2004, 10:05 AM   #1
htm
Member
 
Registered: Mar 2004
Posts: 162

Rep: Reputation: 30
SMTP issues


Folks,

I believe my server's SMTP server (sendmail) is running, and its
SMTP port is open, also it can send emails to anywhere in the work,
now why I telnet real_ip_address 25, and get connection refused?

One more thing, my sever's real IP address has not binded with my domain
name (now with my web host's), I can send out e-mail from the server, but why
I can send e-mail to my server as root@realip_address?

Thx,
HTM
 
Old 03-22-2004, 12:11 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Re: SMTP issues

Quote:
Originally posted by htm
I believe my server's SMTP server (sendmail) is running, and its
SMTP port is open, also it can send emails to anywhere in the work,
now why I telnet real_ip_address 25, and get connection refused?
Seems to me port 25 is blocked from outside access. You have a firewall setup or are you forwarding port 25 requests to your machine if its behind a router, etc?
 
Old 04-09-2004, 11:25 AM   #3
htm
Member
 
Registered: Mar 2004
Posts: 162

Original Poster
Rep: Reputation: 30
how to?

I have two questions here:

1. How to make my port 25 open? Currently even telnet at local server with 25 port,
it syas connection refused

2. Once 1 is successful, how to make my telnet 25 port from outside succeed as well?
My server adopts Redhat standard firewall (advacned) with currently on http port opne?

Thx,
HTM
 
Old 04-09-2004, 03:06 PM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
If you telnet 127.0.0.1 25 and get connection refused, then most likely you're not running the Sendmail daemon. Your e-mail client or application are most likely invoking sendmail directly and queue the message for delivery, that's not the same as connecting to the daemon.

Obviously you're not going to be able to connect from the outside if you don't have the SMTP port (25/TCP) open through your firewall.

You won't be able to receive mail from that outside for your domain unless you setup an MX record that points to your server. You need an MX record in DNS which points to the A record name of the host that accepts e-mail. That A record name must resolve to the IP that you're using (the Internet IP, not your internal IP).
 
Old 04-09-2004, 03:09 PM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
By the way, what are you basing this statement on?
Quote:
I believe my server's SMTP server (sendmail) is running, and its SMTP port is open
???

Did you view netstat output (netstat -nl |grep 25), or what? Unless netstat shows that port 25/TCP is bound to some IP, then it's not running like you think it is.
 
Old 04-09-2004, 08:35 PM   #6
htm
Member
 
Registered: Mar 2004
Posts: 162

Original Poster
Rep: Reputation: 30
remaining issues

telnet 127.0.0.1 25, it works

here is I do a netstat -nl | grep 25 and got

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTE

Looks like I have top change my firewall rules to open SMTP port
(25)

Now do I need to revise sendmail.c
and commenting the follwing line by adding a dnl in the beginning and recompile:
DAEMON_OPTIONS('port=smtp, adr=127.0.0.1, Name=MTA')

One more question, how to setup an MAX record, by me or by my ISP? On my server,
its IP address is a real IP on the Internet

Thx,
HTM

>You won't be able to receive mail from that outside for your domain unless you setup an MX >record that points to your server. You need an MX record in DNS which points to the A >record name of the host that accepts e-mail. That A record name must resolve to the IP that > you're using (the Internet IP, not your internal IP).
 
Old 04-10-2004, 12:32 PM   #7
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
The MX record (MX, not mAx) has to be changed by whomever is hosting your DNS. If that's your ISP, then your ISP needs to change it (and you need to know what to tell them).
 
Old 04-20-2004, 10:18 AM   #8
htic22
LQ Newbie
 
Registered: Apr 2004
Posts: 29

Rep: Reputation: 15
Chort,

Is that possible?

On sending email side, I use my LAN's server instead of my remote
server, both server uses the same doman name, and different IP
addresses, it works well; now when I set up mailman at my LAN's
server, configue everything, and it web front functions properly,
now after I send a test email to my newly created list, I did not
see any pending mail in the admin menu, why?

I suppose it should be
there for me to appove before distributing to all subscribers in the list

THx,
HTM
 
Old 04-23-2004, 05:45 AM   #9
christopherccv
Member
 
Registered: Jul 2003
Location: malaysia
Distribution: redhat
Posts: 31

Rep: Reputation: 15
actually i also facing the same problem.

event i already stop my iptables and do a telnet on port 25 with ip address it will refuse the connection.

during the installation i already check on the smtp check box during the firewall configuration ( i m using high firewall)

thanks
 
Old 04-23-2004, 10:01 AM   #10
htm
Member
 
Registered: Mar 2004
Posts: 162

Original Poster
Rep: Reputation: 30
this problem has been solved

edit your iptables, just add 1 line to open the port you waana open (do not
trust what netsat told me, just explicitly open it), and run service restart iptables,
you should be OK

I have a question for you, ever used mailman, why it complains "user unkown" when
I send an testing email to mailing list alias, and I did add mailing alias in the alias file

Thx,
HTM
 
Old 04-23-2004, 02:21 PM   #11
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
htm,

netstat will show you what ports are bound on what IPs, but it won't show you whether an outside connection will be able to reach it. The reason is that the kernel handles the network stack so kernel filters may block the traffic before it's passed to the socket.

netstat is correct when it says a certain port is bound. You'll need to review your loaded firewall policy to determine if connections are allow to reach the different ports that you have bound.
 
Old 04-25-2004, 09:57 PM   #12
christopherccv
Member
 
Registered: Jul 2003
Location: malaysia
Distribution: redhat
Posts: 31

Rep: Reputation: 15
but i already stop my firewall to test the telnet port 25.

on the 127.0.0.1 is ok, but from the Linux_ip then the conection refuse.

thanks
 
Old 04-26-2004, 02:57 AM   #13
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
$ netstat -naF inet |grep 25

what's the output?
 
Old 04-26-2004, 08:35 AM   #14
GraemeK
Member
 
Registered: Aug 2003
Location: Essex, UK
Distribution: Windoze 2000, Fedora Core 3
Posts: 325

Rep: Reputation: 30
check with ur ISP that they dont block port 25 inbound?

My ISP does this to stop open relays being used for spam. Once i proved my server was an open relay port 25 was opened.

G
 
Old 04-28-2004, 09:48 PM   #15
christopherccv
Member
 
Registered: Jul 2003
Location: malaysia
Distribution: redhat
Posts: 31

Rep: Reputation: 15
chorts: my netstat same as htm result.

Graemak: thanks for advice. i will check with my ISP about this.
 
  


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
Postfis SMTP forwarding and Incoming SMTP pheasand Linux - Software 0 04-27-2005 05:32 PM
Squid POP3 & SMTP issues mcatman Linux - Networking 5 02-28-2005 10:12 AM
SMTP AUTH Issues keithk23 Linux - Software 15 09-21-2004 12:34 PM
smtp issues allenbdwonderb Linux - General 1 01-15-2004 08:57 AM
SMTP issues NeccoWolf Linux - Networking 2 01-19-2003 12:47 PM

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

All times are GMT -5. The time now is 04:18 AM.

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