I was wondering if it is possible to build your own SMTP-server and if it is, then i would like to know how. I have 2 older pcs which i can use to do it.

I wanna give this a go since i have a mail-account where i can receive mails but can't send them unless its done directly online.

It would be nice if someone could tell me what i need and where i can learn it.

I prefer using ubuntu server so thats why i came here.


Have you looked into installing Postfix? Here's another link.

| improve this answer | |

While jia103 gave links to a couple of pages that are a good starting point to start with installing Postfix, there are a few other important considerations that need to be addressed before you dive into setting up your own email server.

  1. Port 25 blocking: most ISP's by default have port 25 blocked. For your Postfix system to communicate with outside mail systems, it has to pass through port 25. You can usually check the help pages of your ISP to determine if they block port 25. You might get lucky and have an ISP that will un-block it for you, but not all ISP's will do this. (There are other work-arounds to port 25 being blocked, like using a Gmail account to relay through, but then all your emails will be routed outgoing from your Gmail address.) The other option, if your ISP provides it, is to upgrade to a "business-class" service, on which they do not block ports. You will have to decide if that service is worth the extra cost.
  2. Domain name: if you want the vanity of having your emails using the address some_user@jochemke.com you'll need to register a domain name with a registrar and use that domain name during the server installation and setup. Really, this isn't a vanity issue - you need a fully qualified domain name for Postfix to communicate to the outside world with.
  3. DNS Service: regardless of what method you work around Problem #1 (port 25) you will need DNS entries for your domain. Some domain registrars will also provide DNS service with your account - others don't offer it. Frankly, until you're ready to start working with BIND and configuring your own DNS server, let someone else handle it for you. Particularly if you opt to not upgrade your ISP service, you'll need a DNS service that provides dynamic DNS listing (because your public IP address is subject to change on most residential services). I use dyn.com for my DNS - there are others, so search for one that suits you - for a nominal yearly fee.
  4. Blacklisting: if you do not go with the "business-class" service from your ISP, you can almost count on having outgoing email get bounced to most other domains like Gmail, Yahoo and many others, because the IP range you're on is blacklisted. This again is common for residential ISP service - usually due to infected PC's being spam sources. The work-around then is to find an outside SMTP relay service that will act as the intermediary between your server and the outside-world SMTP servers. This takes searching for one that suits your needs, and will also incur another cost for the service.

While all of this may seem rather daunting and give you second-thoughts about setting up your own email server, it really isn't as difficult as my points may make it seem. Rather, knowing this before you start can save you a lot of grief once you start in and have to figure out what isn't working when you confront one of these issues.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.