foo

Mark's Blog A developers point of view

30Oct/090

Don’t you hate it when your ISP blocks port 25 so you can’t run a mailserver?

You have an ISP which is just fabulous, great speeds, acceptable pricing and no download limits. Great! Now you can have your own linux/windows server right at home.  Run a webserver, claim some domains, host a few other things (mysql, python, ruby, django, etc) and tinker around with everything you couldnt do at a hosting provider. But when you try to configure your mailserer the fun ends. Mail just doesn't get deliverd... Booo!!!

At first you think you configured your mailserver wrong. Maybe you didnt set up your MX record corectly for your domain or maybe, just maybe, your postfix config is wrong (what could go wrong there? :P). After some tinkering and frustrated tests you come to the annoying conclusion that it is your ISP who is nagging you. It appears they block the SMTP port (port 25) in their firewall, so nothing gets through to your server. Damn it!

So your first thought is to go around it. You are a great tech-buff and you think you can outsmart your ISP blocking a port in its firewall and find a workaround, so you think to yourself "why not run it on port 26 (or something else) instead??". A fine idea indeed. But there is one problem. SMTP servers don't know your mailserver is running on a different port. And it has to know!

Let me illustrate this a bit more.

When someone (user@gmail.com) typing a message and wishes to send you an email (user@somedomain.com), creates the mail, and clicks on send, the google mailserver first contacts the DNS server to request the MX record for the domain (somedomain.com). It receives a response in the form of an IP address.

Then the mailserver will connect to this IP addres on port 25. Why port 25? Because thats the way all SMTP server work. It does not know any better than to connect to port 25. Its the way SMTP works.

So, no dice.. Just using a different port is not enough (and No: tricking the world into thinking port 26 is the new port 25 aint gonna work).

After some thinking the solution came to me. If we can't trick the world into sending to port 25 and we can't go around the port block at the ISP. Why don't we run it before the ISP or at another ISP?

"Uh, but, aint that the most obvious solution?"

Yes ofcourse it is. Running your mailserver on a different location where port 25 is not blocked is the perfect solution. But it is not appropriate in this case indeed. You want to run you own mailserver at home so you have full control over it. Not at a colocated place, hosted by a hosting provider and what not.

But think one step further:

"If someone would be willing to run a mailserver outside of your ISP's influence, and forward all incoming mail which is supposed to be for your domain and forwards this to your machine which has actually running a SMTP server on a port other than port 25 and delivers the mail on that port... Wouldn't that solve the problem?"

And there you have it. The solution to the problem. This way you can run a mailserver yourself even when your ISP blocks port 25!

Now I've been searching around for someone who offers this kind of service, but was not succesful. So I thought to myself, why not create such a service yourself? And so from the need of a solution, there came a solution and maybe a solution which can help other people aswell!

Currently I have this problem solved in a proof-of-concept scenario where a friend of mine is running a SMTP server (on port 25) and he forwards all emails directly to my SMTP server running on port 25. Right now I'm looking into ways of providing this solution to other people.

Update: Recently we (Marc-David and I) have launched our service at http://www.reroutemail.com/

28Oct/090

A New Project - My framework actually didn’t fail!

I recently started working on a new freelance project. Now there's nothing special about that because thats what I do for a living right now... But reading around on the internet and in books made me realize again that blogging about it is a good way to get things 'out there' and a way to clear my own mind.

My new project involves the creation of a pretty straight forward web application. Users logging in, an amount of relations between different objects. Some listings, some variables, some conditions, the works.

The fun part about this project is that, so it turns out, it is the stuff that realy makes me happy doing. Its a project in which I can do everything from start to finish. The basic idea is provided, a basic layout is provided and most of the data which should be available stored in the database is provided. So it basicly comes down to creating a solid DB design, creating a technical design, PHP coding, HTML layout, bug testing, bug fixing and deployment.

There are no real constraints on this project in terms of baggage from previous made stuff. No buggy feature which was previously implemented and results in quircky behaviour. No strange DB Designs which actually don't make sense at all.

Most projects I have done in the past actually have this kind of baggage. I am constraint in how to set up the project and only have the freedom of when I do the work, not in how I do the work.

But with this project, I have total freedom, and it makes me happy!
Right from the start I figured I could again use my freshly created framework which, supposedly, 'failed' according to a previous post. Now I couldn't be more wrong when I wrote it! It turns out that although I hadn't much use for some of the features in the past, the things I had created came in real, REAL handy! I had a basic site up and running in a few minutes and in a day orso I was back into the feeling of how it was to code and make real progress real fast. The need for improving the framework returned. And, more pleasingly, my motivation skyrocketed and the work wasn't work anymore, it became fun.

For me fun is one of the things needed to stimulate progress and creativity. When it is fun to work on a project you are constantly thinking about how to create new stuff and improve stuff. In this project I have fixed more bugs and created more effective functionality in the framwork than when I was actively working on the framework itself. And fixing stuff gives you pleasure/satisfaction, and pleasure drives you to create/improve new things, which in their turn gives you more pleasure/satisfaction. It's a win-win situation. And it is one I realy needed at the moment!

Expect more posts later on the project (and I try to keep my word this time :))

   
( ! ) Fatal error: Call to undefined function plugins_url() in /usr/share/wordpress/wp-content/plugins/wp-followme/followme.php on line 19 Call Stack #TimeMemoryFunctionLocation 10.0002105104{main}( )../index.php:0 20.0004121024require( '/usr/share/wordpress/wp-blog-header.php' )../index.php:4 30.363421141880require_once( '/usr/share/wordpress/wp-includes/template-loader.php' )../wp-blog-header.php:20 40.365421203952include( '/usr/share/wordpress/wp-content/themes/lightword/index.php' )../template-loader.php:61 50.528321386928get_footer( )../index.php:54 60.528321386928do_action( )../general-template.php:15 70.528321386928call_user_func_array ( )../plugin.php:311 80.528321386928show_followme( )../plugin.php:0 90.528421386928wp_followme_url( )../followme.php:121