Setting up a mailserver - where to start & problems

I have a LEMP running for over a year without many problems, but I seem to be unable to install a mailserver.

I have a 2nd Linode 512, I installed Ubuntu 12.10, I used the getting started guide on Linode, ssh is set up, the status of the firewall (ufw)is:

To                         Action      From
--                         ------      ----
143                        ALLOW       Anywhere
993                        ALLOW       Anywhere
25/tcp                     ALLOW       Anywhere
465/tcp                    ALLOW       Anywhere
22                         ALLOW       Anywhere
80                         ALLOW       Anywhere
443                        ALLOW       Anywhere
143                        ALLOW       Anywhere (v6)
993                        ALLOW       Anywhere (v6)
25/tcp                     ALLOW       Anywhere (v6)
465/tcp                    ALLOW       Anywhere (v6)
22                         ALLOW       Anywhere (v6)
80                         ALLOW       Anywhere (v6)
443                        ALLOW       Anywhere (v6)

First I used the documentation on Linode: ~~[http://library.linode.com/email/postfix/dovecot-mysql-ubuntu-10.04-lucid" target="_blank">](http://library.linode.com/email/postfix … 0.04-lucid">http://library.linode.com/email/postfix/dovecot-mysql-ubuntu-10.04-lucid](, but this guide is apparently outdated. Can't remember which variables exactly, but some of them were no longer in use. Tried to replace them, but ended up with FUBAR situation.

Second howto I tried was this one ~~[http://www.pixelinx.com/2010/10/creating-a-mail-server-on-ubuntu-using-postfix-courier-ssltls-spamassassin-clamav-and-amavis/" target="_blank">](http://www.pixelinx.com/2010/10/creatin … nd-amavis/">http://www.pixelinx.com/2010/10/creating-a-mail-server-on-ubuntu-using-postfix-courier-ssltls-spamassassin-clamav-and-amavis/](. Followed the manual, but in the end it didn't work. I tried with telnet, restarting services, … Nada. And no logs. Nothing in mysql.log, mail.log, …

Third howto I tried was this one: http://flurdy.com/docs/postfix/. Everytime I started from scratch with new server. After the basic mailserver setup I wanted to test it. Telnet doesn't respond, no log files, .. It's like no daemon logs. Only lastlog and wtmp. And yes debugging and logging is on.

I figured out how to install a LEMP by RTFM, trial & error, and asking, but this is my 5th attempt in trying to install a mailserver in a year and nothing works and I have no idea what I am doing wrong (or right). If you could point me to a step-by-step guide which explains what every step means that would be fine.

PS: I need to upgrade my LEMP server and thought to install new one, add mailserver and move sites and then use old Linode512 to try out LAMP, … Before I started with the mailserver I already noticed that logwatch send almost empty reports. Fail2ban logs remained empty. When Munin didn't display any graphs either I knew something was wrong, but I have no idea what. I installed my new Ubuntu 12.10 LEMP server using my notes (very brief) for my current LEMP server (Ubuntu 11.10). Is 12.10 very different from 11.10? Something wrong with Linode image?

PPS: I want to install a mailserver for the fun of it (I admit, I am not having fun right now) and because Google decided to start charging for new Apps accounts.

8 Replies

Thanx, gonna give it a try with 12.04 LTS and report back.

This is by far the best tutorial for setting up a mail server on Ubuntu 12.04, but it will work in 12.10, too. Tried it myself on 12.10 and it works.

You will probably want to ignore the first part where it sets up a LAMP server, but the rest will be of a tremendous use. If you get stuck somewhere, just ask here.

The problem with Linode's 10.04 guide is that it uses Dovecot 1.x which is not present in 12.10/12.04, there's v2.0, and it has a little bit different syntax than 1.x.

I've decided to follow derfy's suggestion first. I did ran into some problems but have asked the question in the original thread http://forum.linode.com/viewtopic.php?f=11&t=9047.

I went with petar's link and it worked great. Restored a backup to a new linode, did the upgrade there, modified the config files as needed, and swapped the ips. All set.

Do you have a LAMP or LEMP?

I want to use a LEMP, but maybe I should follow that howto to the letter in order to understand how to set up a mail-server and later try to apply it to a LEMP. Interesting times ahead.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct