Koozali.org: home of the SME Server

Port 25 for dummies

Niels Leeuwis

Port 25 for dummies
« on: May 06, 2003, 12:47:15 PM »
Hello,

First let me thank you all for the support I got with my port 25 problem. After a lot of searching and reconfiguring it seems to be working now. I would appreciate it if you all sent me an email to congratulate me at johndoe@leeuwis.org (also for testing purposes, if it bounces please sent a copy to the mailadres in the header.)

To help people in the future I made a little howto on the subject, maybe someone can place it on the e-smith or contribs.org site.

Niels

---

TROUBLESHOOTING PORT 25 FOR DUMMIES

After installing the e-smith server 5.6 (first time install (newbee))
I encountered a problem with qmail not receiving emails. Propably
I'm not the only one with this problem so here is a litte HOWTO on
the subject.

Situation:
mailserver (mydomain.org) situated at home, placed in the DMZ
(DeMilitarized Zone) after firewall, connected with the internet
through ADSL.

Problem:
outgoing mail is being delivered without any problems
incoming mail returns to sender with the message 'server not responding'
(in my case I was able to receive email that originated from my own
provider (uplink) that should have given me a clou)

Troubleshooting steps:
1. check of qmail is listening on the e-smith server (netstat -a -n)
   you should see something like 0.0.0.0:25 LISTENING (The :25 is
   important, you will have a long list)

2. check of qmail is responding from your internal network
   (telnet 'server IP' 25) (start telnet from the commandline and
   remember to put a space between your server IP and 25)
   If it's working you wil get an answer from your server saying
   220 servername.mydomain.org

If step 1 and 2 give no result you have a qmailproblem on your server
or a bad network connection. More info on qmail at http://www.qmail.org

3. check if your firewall is configured properly, yoo should forward
   port 25 and 110 (sometimes 143) to the server IP and open these ports
   for externel access.

4. check if your server is visible from the internet, goto http://www.grc.com
   and choose 'probe my ports' If it's okay the test should say both port 25
   and 110 OPEN. If both ports are blocked or stealthed go to step 5, the
   problem is your firewall. If only port 25 is stealthed or blocked the problem
   is with your uplink (goto 6)

5. remove the firewall and connect the server directly to the modem (you need
   to reconfigure but that is what troubleshooting is for ...., run step 4
   again, if you see port 110 open this time get the manual for your firewall,
   the solution is in there.

6. here is the hard part, for me, I had to try to get the correct
   configuration information from the helpdesk (they send me an email
   back with instructions howto setup outlook express 3 times ;-))

   To prevent spamming most providers block all SMTP traffic (port 25)
   that is not originated from their downlinks or designated to one of
   their downlinks. The problem is that yourdomain.org is not known by
   the server so it rejects the message. To get this working you have
   change your MX records (at the site you registered your domain).

   your MX records should look something like this:

   mydomain.org 10 smtp.mydomain.org
   mydomain.org 20 relay.provider.com

   (set smtp.mydomain.org also at your e-smith server)

   In your DNS be sure to point mydomain.org to the correct existing
   class A IP adress.

After changing the records let it boil for 24 hours and then it should work.

Andrew Hodgson

Re: Port 25 for dummies
« Reply #1 on: May 06, 2003, 01:15:39 PM »
Hi,

Very good appart from the last part - re downlinks/spam etc.  This is known as mail relaying and is only an issue when sending mail - i.e, probably doesn't need including in the howto.  Stress the point about creating mx records, and also stress the need for more than one record for use when your mail server goes down.  As a backup mx provider, I use <www.microtech.co.gg., and I can trigger mail delivery either with ETRN or they will try to deliver every so often.

Andrew.

Bill Talcott

Re: Port 25 for dummies
« Reply #2 on: May 06, 2003, 05:52:38 PM »
That's a good guide for dummies. Unfortunately, it doesn't address the problem I experienced. One day port 25 just decided it didn't want to be open anymore. Nothing changed on the server. Using the Port Opening contrib to open port 25 fixed the problem, so I know it's something with the SME's firewall, but everything looks fine. It just doesn't work like it should.

http://forums.contribs.org/index.php?topic=17117.msg66425#msg66425
I see that you added to that thread...

If you don't mind, I just may reformat your post and throw it up on my contribs.org space...

Niels Leeuwis

Re: Port 25 for dummies
« Reply #3 on: May 06, 2003, 07:18:39 PM »
Bill Talcott wrote:
>
> If you don't mind, I just may reformat your post and throw it
> up on my contribs.org space...

That's okay with me, main thing is we keep as much info findable for people with problems

Niels