• Welcome to Peterborough Linux User Group (Canada) Forum.
 

I set up a mail server!

Started by Jason, January 04, 2020, 01:47:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jason

Setting up a mail server on Linux can be a complicated process. I tried doing it with Postfix and sendmail on my own and didn't get very far. But for those trying to do it themselves, I found a much easier way. It's called Modoboa and you can find a good tutorial here. Modoboa automates the install of the pieces you need for a full-fledged mail server which includes webmail access. The tutorial also tells you how to modify the DNS records. The features of Modoboa are:

       
  • Easily create unlimited mailboxes and unlimited mail domains in a web-based admin panel.
  • Easily create email alias in the web-based admin panel.
  • The webmail client provides an easy-to-use message filter to help you organize messages to different folders.
  • It can help you protect your domain reputation by monitoring email blacklists and generating DMARC reports, so your emails have a better chance to land in the inbox instead of the spam folder.
  • Includes amavis frontend to block spam and detect viruses in email.
  • Calendar and address book.
  • Integration with Let’s Encrypt.
  • Includes AutoMX to allow end-users to easily configure mail account in a desktop or mobile mail client.
There were a couple of snafus, one of which was due to something they left out and wasn't mentioned in the tutorial and the other was my fault. Their error was omitting how to set up the FQDN which one piece of the software wouldn't work with out. I found a tutorial here for that, so do that first before following the Modoboa tutorial, or after you get an error about not having a FQDN if that's the way you fly. The other issue was that I had already hardened my Linux server which included configuring and enabling the firewall. But that plan was for a plain webserver that didn't allow the mail protocols. Setting up the firewall is addressed in the Modoboa setup so do any hardening afterwards.

I had tried iRedmail but it didn't work for me. Modoboa is nicer and gives you a web-based interface much earlier in the process than iRedMail.

I already have created and tested the mail server and can send/receive emails for my personal domain - jasonwallwork.ca. It works beautifully. I have the mail server hosted on a DigitalOcean VPS (same as PLUG). Use that link and you get $100 credit for 60 days to try them out. I do get a $25 one-time kickback if you end up buying $25 of hosting from them. The server costs $10 CAD/month + taxes because you need 2 GB RAM to host it. It's a bit of an advert but I'm very happy with their services and wouldn't mention them if I wasn't.

Soon I won't need to use corporate email like Yahoo, Gmail or the like. And like a phone number, I can take my domain name everywhere I go if I change hosts. I'm not stuck with one provider. And I don't have to deal with adverts or have my privacy diminished with profiling.

If any of you or anyone you know wants to set one up and lacks the technical expertise, please let me know and I'll get in touch with them. Or pass on my email address since most of you have it.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

Jason

Another topic of mine that died in childbirth. :D
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

I've been using Thunderbird since forever and my Trent mail, for better or worse, is run on Microsoft's server. I always enjoy reading about the things you try and post on the site, but only some are things I want to do myself. But by all means, keep posting your ideas and the things you try!
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

Jason

You can use whatever client you want with this - it's just a mail server, although the just part makes it seem easy which it wasn't. You can use the web mail client if you want, but it doesn't really have a lot of features. Some people might not realize that Gmail also lets you access outside mail servers.


I'm curious, when you said that Trent mail is run on Microsoft's server, you mean MS software, right? I'm guessing an Exchange server which I've never had any experience with. It's too bad they do it that way, my guess is that they pay huge licensing fees to do that when they could just be using open source software. I believe they used to do it that way once, that all the universities ran Unix servers that handled everything.


Thanks for replying. I was just wondering if anybody actually read this, from the group, I mean. I'm sure the bots have. :)
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

Quote from: Jason Wallwork on April 17, 2020, 08:46:38 PM
....
I'm curious, when you said that Trent mail is run on Microsoft's server, you mean MS software, right? I'm guessing an Exchange server which I've never had any experience with. It's too bad they do it that way, my guess is that they pay huge licensing fees to do that when they could just be using open source software. I believe they used to do it that way once, that all the universities ran Unix servers that handled everything.
....
No, I meant Microsoft's server, and probably it's an Exchange server. Trent didn't used to use Microsoft for this; they used to have their own servers and I have no idea whether they were open source or not. Trent has some kind of broader arrangement with Microsoft - all faculty and students get Office 365 for free and I am allowed 5 installs of Office 2019. (Doesn't do me any good on Linux.) We get OneDrive accounts free through the university as well, but I don't use it. I don't know if we pay huge fees; I think Microsoft would give this to universities for a pretty low price to get all their students and faculty hooked on their software.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

ssfc72

Thanks for the info and your experience in setting up a mail server, Jason. 
I still have to get around to trying to set up a webpage server box using Apache or NginX.  After I get that done then I would also like to try the mail server setup, as well. :-)
Mint 20.3 on a Dell 14" Inspiron notebook, HP Pavilion X360, 11" k120ca notebook (Linux Lubuntu), Dell 13" XPS notebook computer (MXLinux)
Cellphone Samsung A50, Koodo pre paid service

Jason

If you need help with apache or nginx, let me know. I'm more familiar with apache but I've used nginx a bit.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

Do post about your experience if you go ahead with it, Bill.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13