Well I have to admit, I never thought setting up an email server was so hard / time consuming. I initially put “setting up email” as one of the last tasks on my priority to-do list for NoteDump as I thought it only consisted of routing a DNS entry to a database of emails or something, and only took a few minutes to setup. I was sorta right in guessing how email worked, but boy was wrong about how long it took to set everything up… It took me just under 2 days to get everything working. This time included doing some pre-reading on the topic, configuring all settings, as well as troubleshooting issues though.
As my server runs the ubuntu operating system, I decided to use Postfix, Dovecot, and MySQL for configuring my email server as this was the suggested setup for the kind of system that I wanted according to other professionals online.
I hit a massive issue after configuring my email server for the first time. This issue being that I was only able to send emails from my server, and not receive anything. After a few hours of debugging DoveCot and Postfix, I had finally found what the problem was:
dovecot: lmtp(5304): Fatal: Error reading configuration: Invalid settings: postmaster_address setting not given
This suggested to me that I was missing a setting called ‘postmaster_address’ somewhere in my configuration files, so I started googling the problem. I spent a few hours googling for a solution, but whatever I tried, I kept receiving the same error when I sent an email to my server from Gmail. I then decided to go down the manual route of opening each and every file manually and searching for a setting called ‘postmaster_address’. It took a while, but I finally found a setting with the name ‘postmaster_address’ in a file called ’15-lda.conf’ in ‘/etc/dovecot/conf.d/15-lda.conf’.
I set a value for the ‘postmaster_address’ setting within the ’15-lda.conf’ file and restarted DoveCot, then went on to send yet another email to my server using Gmail. I waited about 5 seconds and BOOM! my email client started to go crazy by spitting out all of the email messages that I had sent to my server whilst debugging things 🙂
It seemed pretty bizarre that missing out this simple setting would cause the entire incoming mail server to fail when fetching emails, but it certainly did for whatever reason. Anyhow, everything works now so I’m extremely happy.
Here’s 2 diagrams showing how my email server is setup:
Now it’s time to add security to my brand new mail server. Wish me luck everything works instantly this time…