Page 1 of 1

Mail server and port 25

Posted: Tue Oct 19, 2010 4:38 am
by shiznatix
Hi,

Ok, I am trying to setup a mail server on my local server but am having some problems which I think are due to port 25 blocking but I want to make sure.

The domain I have will be example.com and all of the webserver stuff works just fine, I have ssh, http, virtual desktop, all working just fine and dandy. The problem comes with dovecot and postfix. I setup both of these and it seams to be going well but I can not get outside emails sent or received. I have the server at home and at work I connect to it with Thunderbird, this seams to go well. From work on Thunderbird I can send myself emails from the same email address, they show up in the inbox no problem so at least it seams like things are setup properly.

The problem comes with trying to send an email from an outside domain to that email address. If I send from gmail to the same email address that I have setup on my server then it just bounces for like 2 days then cancels. If I try to send mail to an outside domain from the server then it does nothing and the mail.log just gives errors like this:
Oct 19 12:29:30 shiznatix-server postfix/smtp[6786]: connect to alt3.gmail-smtp-in.l.google.com[74.125.67.27]:25: Connection timed out
so I am leaning to "my isp blocks port 25". I have port 25 pointing to the correct server and whatnot, I just can not connect to it.

Would these problems all point to the block or maybe I am doing something wrong with the configuration?

Re: Mail server and port 25

Posted: Tue Oct 19, 2010 9:25 am
by VladSun
Try using telnet from your server and to your server from outside.

Also

Code: Select all

traceroute -n -p 25 74.125.67.27
would be useful

Re: Mail server and port 25

Posted: Tue Oct 19, 2010 11:49 am
by Weirdan
In addition to what Vlad recommended, check that you have actually set MX record in DNS for your example.com domain to point to your computer.

Re: Mail server and port 25

Posted: Tue Oct 19, 2010 12:15 pm
by John Cartwright
I think you've been around long enough to know to use the right forums :wink:

Moved to Installation and Configuration.

Re: Mail server and port 25

Posted: Tue Oct 19, 2010 2:12 pm
by VladSun
Weirdan wrote:In addition to what Vlad recommended, check that you have actually set MX record in DNS for your example.com domain to point to your computer.
And make sure a reverse DNS zone is set up properly

Re: Mail server and port 25

Posted: Fri Oct 22, 2010 7:06 am
by shiznatix
For the sake of simplicity and because it is not a big deal, I will reveal to you my top secret domains that I am using and pointing to places (good places). Are you ready? It is going to blow your mind! The main domain is...

shiznatix.com (bet you would never have guessed it)
and
revolutsiooni.org (just some leftover domain from a drunken bet, means "Revolution Valley" in Estonian)

To start, it seams that I just can not telnet to another server via port 25. I have another mail server, mail.shiznatix.com but doing telnet mail.shiznatix.com 25 times out but when I do it at work (business connection, fancy stuff) I get through no problem. Maybe this is something or no?

For the rest of the stuff, here is the situation:
I have shiznatix.com on a dreamhost server but I want to get out of dreamhost and just host everything myself. To make sure I am ready for this I am using revolutsiooni.org as my test domain. I have changed the servers hostname to revolutsiooni.org and all the config files are using that domain so essentially, my home computer IS revolutsiooni.org.

DNS
I am using name.com for my domains so here is what I have as far as DNS records go:
Image

Postfix Config
Here you can find the postfix main.cf and master.cf
http://www.shiznatix.com/postfix-conf-master.txt
http://www.shiznatix.com/postfix-conf-main.txt

Dovecot Config
Here you can find the Dovecot.conf file here
http://www.shiznatix.com/dovecot-conf.txt

WHAT WORKS
I am doing all my testing at work (not on the revolutsiooni.org server or even same internet connection). I have Thunderbird setup to connect to imap.revolutsiooni.org and outgoing to smtp.revolutsiooni.org. I can receive emails that are sent from outside to this server, such as gmail, etc. I can send emails to myself so my email account test@revolutsiooni.org can send and receive emails from itself. It can also receive emails from outside.

WHAT DOES NOT WORK
I can not send emails to the outside using my own smtp server (smtp.revolutsiooni.org). If I change this to mail.shiznatix.com it works just fine, it just does not work for my server. When I send an email through smtp.revolutsiooni.org as my outgoing mail server, I get this kind of error and the email never gets delivered:
Oct 22 14:58:30 shiznatix-server postfix/smtpd[10876]: connect from unknown[88.196.158.74]
Oct 22 14:58:30 shiznatix-server postfix/smtpd[10876]: 7AC0E9C2A7: client=unknown[88.196.158.74], sasl_method=PLAIN, sasl_username=test@revolutsiooni.org
Oct 22 14:58:30 shiznatix-server postfix/cleanup[10879]: 7AC0E9C2A7: message-id=<4CC17D70.8060006@revolutsiooni.org>
Oct 22 14:58:30 shiznatix-server postfix/qmgr[10668]: 7AC0E9C2A7: from=<test@revolutsiooni.org>, size=581, nrcpt=1 (queue active)
Oct 22 14:58:30 shiznatix-server postfix/smtpd[10876]: disconnect from unknown[88.196.158.74]
Oct 22 14:58:30 shiznatix-server postfix/smtp[10882]: connect to gmail-smtp-in.l.google.com[74.125.77.27]:25: No route to host
So, I hope this abundant amounts of information, for your viewing pleasure, is enough for someone to give me a hand with. I am not very good with all of this stuff since I never really had to run any of this on my own, I just used stupid GUIs provided by whoever was hosting the server.

Re: Mail server and port 25

Posted: Fri Oct 22, 2010 5:10 pm
by Weirdan
shiznatix wrote: Oct 22 14:58:30 shiznatix-server postfix/smtp[10882]: connect to gmail-smtp-in.l.google.com[74.125.77.27]:25: No route to host
Most probably you're hitting the block your ISP set to prevent direct outgoing mailing (it's common practice, aimed to protect the net from spam bots infecting users' computers). So the first thing I'd do is to send an email to your ISP asking if they block outgoing connections on port 25 (don't call them as people answering support calls are generally not very bright, and with email they'd have the time to forward the message to appropriate person). If they do I'd ask them to lift the block for your account, promising that there will be no spam from this computer.

Alternative option could be registering gmail's account for your domain and just point MX record to gmail servers (http://www.google.com/apps/intl/en/group/index.html). It's free and saves the hassle of configuring and maintaining your own email servers, but not as nearly educational :)