SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So I was looking at the SlackDocs going a section about creating an email server.
It looked so dang simple... But everyone in the Linux world tells me that it is tough and that it sucks to maintain.
So, can someone please tell me why it is difficult to setup and maintain? I simply don't understand. Eventually I will be doing this for a fun project, but I just want to understand.
I'll only speak for myself but the hardest part for me was figuring out how to get spamassassin configured properly to deal with those types of mails. Running latest roundcube, postfix, and dovecot with a mysql(mariadb) back-end in 14.2 was a breeze to set up. You have to keep all your packages updated which shouldnt be a problem if you know how to compile slackbuilds...
I say if you're serious about it, fire up a Linode Slackware 14.2 VM and get started with a domain name you plan to use. It's really not that hard.
Try to install and configure an email server, then try to keep it functional for at least half a year. You will find out the answer yourself. I have been doing this for over 10 years and believe me it is the most complicated Linux service I have ever used! All the packages used for this service Postfix, Dovecot, Amavisd-new, SpamAssassin, Clamav and a few others I compile from sources and configure them to my needs.
It's not for the faint-hearted probably. Slackware's dovecot and postfix should run with sane defaults out of the box but adding amavisd-new, spamassassin and clamav is more of a challenge.
I have been running my own mailservers for around 20 years now and before that, for the company I worked for (which is where I discovered Linux and Slackware when we needed to build an Intranet).
At home, that means Cyrus IMAP server to store my family's mailboxes, Sendmail to route the emails, Amavisd-new, SpamAssassin and ClamAV to filter out spam and viruses. Mail traffic being encrypted and using SASLAUTH.
Lots of fun, but always tricky to keep it all up and running when upgrading Slackware to a new release.
I think it's been said your hair will turn white over the weekend running a mail server. I don't have much hair to turn white so I tried my hand at it with NetBSD, Postfix, Dovecot and all the SSL and SASL stuff. A learning experience, but there are professional mail providers out there for 40 or 50 euro a year, outfits who've been doing this for decades. I came to the conclusion it wasn't worth the trouble. Worth doing to learn how the mail system works, but there are so many other things to learn in Linux and BSD. Easy to get bogged down in just one area.
Something to keep in mind when running your own mail server is you have to be careful your domain and IP address don't end up on spam blacklists. Could be quite tricky sanitising them if that happens.
Whatever you do... do it in phases. Take your time before you really dive in with your primary email address... If you do that slowly you can find out how much work it is and if it's something you think you could continue to do.
Whatever you do... do it in phases. Take your time before you really dive in with your primary email address... If you do that slowly you can find out how much work it is and if it's something you think you could continue to do.
Good advice. Perhaps buy a throwaway .com domain to experiment first.
Something to keep in mind when running your own mail server is you have to be careful your domain and IP address don't end up on spam blacklists. Could be quite tricky sanitising them if that happens.
I think from what I've read, the spam blacklist is one of the things I don't quite understand. I run my website from a Raspberry Pi in my home office and would love to run a second pi with a mail server, but I imagine running from a home server would get blacklisted pretty quickly?
I checked, my ISP doesn't give me a static IP address, but it hasn't changed in 6 years. they also say that I am allowed to run a small mail server, but they don't recommend it. So do you know if a home server would get blacklisted? Are there ways to about the blacklist from my home server? If not, I'll just stick with RiseUp, but I think I would really enjoy running my own server.
I sort of take a middle road. I use my ISP's mailserver as my spool, and then I use getmail to fetch those messages onto my private server, procmail to sort them, and then use dovecot IMAP to make them accessible to my MUA, with the mail all nicely pre-sorted on the server side.
I use my ISP's SMTP server. My ISP blocks outgoing SMTP traffic, at least at port 25, so I've never bothered trying to work around that.
I think one of the biggest challenges in running a mailserver (issues of spam, etc. aside) would be maintaining the uptime required. People expect mail to be received by a server at all times. You should never be in a position to have downtime and have messages bounce back as a result.
I think one of the biggest challenges in running a mailserver (issues of spam, etc. aside) would be maintaining the uptime required. People expect mail to be received by a server at all times. You should never be in a position to have downtime and have messages bounce back as a result.
So do you think a backup Pi that is mirroring the original server would solve that? If the first must go down for maintenance, the second takes over until maintanence is complete? Although, now that I think of it, what if my network goes down? It is rare, but would that get me blacklisted when too many messages bounce back?
I'm going to be honest, one of the major motivational factors for doing this is to own my data completely. I have deGoogled almost everything and now email is the one thing that I rely on a third party for. I have no cloud accounts. I run my own pleroma server for social. The only thing left is CalDAV and email. I have CalDAV almost figured out.
It's certainly not the easiest task, but if you are seriuos about it, then it's doable. If you are going to use a standalone e-mail gateway, I would advise to get the basics right:
1. You will need a reverse DNS (PTR) for your mail server. Make sure that your isp/datacenter can provide it.
2. Setup DNS carefully, do use SPF/DMARC records and DKIM is nice too. Make sure your server mail name matches it's DNS and PTR.
3. You will need an ISP which allows outgoing traffic through port 25/587 and incomming on 25/465/587/993/995. It's best to get direct access so you can control firewall yourself.
These things are ussually hardest to get for a home server. In most cases it's best to use some cheap VM from a company like Scaleway, DigitalOcean or simmilar, but they might give you an IP address which might be listed in anti-spam databases. Check for that.
Other than that, it's mostly config files. So if you have some time to burn, go for it. It will be pretty interesting, but it might take a while to get it on the production level.
It's certainly not the easiest task, but if you are seriuos about it, then it's doable. If you are going to use a standalone e-mail gateway, I would advise to get the basics right:
1. You will need a reverse DNS (PTR) for your mail server. Make sure that your isp/datacenter can provide it.
2. Setup DNS carefully, do use SPF/DMARC records and DKIM is nice too. Make sure your server mail name matches it's DNS and PTR.
3. You will need an ISP which allows outgoing traffic through port 25/587 and incomming on 25/465/587/993/995. It's best to get direct access so you can control firewall yourself.
These things are ussually hardest to get for a home server. In most cases it's best to use some cheap VM from a company like Scaleway, DigitalOcean or simmilar, but they might give you an IP address which might be listed in anti-spam databases. Check for that.
Other than that, it's mostly config files. So if you have some time to burn, go for it. It will be pretty interesting, but it might take a while to get it on the production level.
I know I can run an outward facing webserver with no problem. They only warned me once when my traffic started hitting around 1000 a day. I am currently emailing with them to see how they would feel. So far they don't seem to have any issues with this plan.
I'm going to be honest, one of the major motivational factors for doing this is to own my data completely. I have deGoogled almost everything and now email is the one thing that I rely on a third party for. I have no cloud accounts. I run my own pleroma server for social. The only thing left is CalDAV and email. I have CalDAV almost figured out.
I'm running a few mail servers using Postfix, Dovecot, Spamassassin, etc. They're on CentOS now, but before that they were running on Slackware for a few years. Setting up and running a mail server can be a slippery fish to grab, but it's worth it in the end.
Advice: purchase a dummy domain, rent an el-cheapo public server and do lots of experimenting before committing to the real thing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.