Anafroj

joined 1 year ago
[–] Anafroj@sh.itjust.works 0 points 11 months ago (1 children)

My favorite cost cutting tip is to avoid big webapps running on docker, and instead do with small UNIX utilities (cron instead of a calendar, text files instead of note taking app, rsync instead of a filehosting dropbox-like app, simple static webserver for file sharing, etc). This allows me to run my server on a simple Raspberry Pi, with less than 500mb of used RAM in average, and mininal energy consumption. So, total cost of the setup:

  • Raspberry Pi : 77€ x 2 = 144€ (I bought two to have a backup if the first one fails)
  • MicroSD 64gb : 13€ x 2 = 26€ (main and backup)
  • average energy consumption : 0.41€ (2kWh) per month

With that, I run all services I need on a single machine, and I have a backup plan for recovery of both hardware and software.

Getting used to a UNIX shell and to UNIX philosophy can take some time, but it's very rewarding in making everything more simple (thus more efficient).

[–] Anafroj@sh.itjust.works 1 points 1 year ago

The good news is that with ircv3 being worked on, it may soon(ish) be quite dusted. :) It adds features like reply threads, history from when you weren't connected, message editing and deletion, and more!

[–] Anafroj@sh.itjust.works 0 points 1 year ago (1 children)

I guess slapping it on my local raspberry pi wouldn’t be enough no?

Oh no, that would be way not enough. :) Managing a mailserver is a sysadmin task by itself. While you don't need to do much once it works (which often is a perk of sysadmin work, compensating for the fact that when it does not work, they may have to wake in the middle of the night to fix it), it's notoriously difficult to get right : you have the configuration of the mailserver to get right first, so that you can send emails, but nobody else can and you don't become a spam relay without knowing it. Then you have a lot of configuration to do to be able to retrieve your emails from your server, which uses other protocols that you must learn about. Then you have "optional" things that you must setup (SPF, DKIM and DMARC), which you won't be able to send mails to gmail or outlook if you don't set them up properly. And when you will have got all of that right, you will have enough experience to be hired as a sysadmin. :)

I can't provide a good resource for learning it, I learned it 15 years ago when it was way more simple (before SPF and DKIM), and picked every addition as they appeared, but any course on how to manage a mail system will do. There is no difference in doing it for your self-hosted server and for a company (except maybe that for a company, they'll make you handle users in a database, which you can forego for your own needs). I would recommend to learn how to use postfix first, then any imap server (courier-imap is a top runner), and when you're comfortable with that, you can learn about SPF, then DKIM, then DMARC. But be aware before going through it that this is basically learning a new skill (sysadmin). You can find docker images that setup everything automatically for you, but I would recommend against that, because at some point, things will break and you will have no idea how to fix them. And if you try to fix them while not knowing well what you're doing, that's a good way to end up being a spam relay. Plus, those docker images are difficult to customize, which quite defeats the point of managing your own mail system to begin with.

[–] Anafroj@sh.itjust.works 0 points 1 year ago* (last edited 1 year ago) (3 children)

Well I didn’t want google to read my mails

Sadly, it only works if no one in the recipients of the mail is on gmail (or if everyone use pgp, which I would tend to think is even more rare).

I host my own mailserver as well, and I would add as benefits:

  • creating as many email address as you want easily, possibly regexp based address (awesome to give every site a different address and know where the spam comes from, without using the well known schema username+something@host). That also makes routing/filtering mails way more easy, you just have to match the recipient address.
  • delivering mails to software, to put email at the center of interapps messaging (basically, that means that postfix pass a matching email to the executable of your choice on your system instead of storing it in your mailbox)
  • advanced rules for handling emails. When I want to block a spammer that managed to get my real email, I use regexps to match their mails and reject it with a "REJECT 5.1.1 Recipient address rejected: User unknown in local recipient table" error, imitating the error for unknown users, which often triggers a mail system to remove your address from their database
  • easily configure apps to send me email. When I write an application that will send emails to me and only me, I configure it to use my smtp on port 25 without authentication instead of the usual smtps configuration they expect. It connects to it and asks to send a mail to me, which is accepted since I'm a local user. It makes everything way easier (try to do that with gmail and get your IP banned)
  • easy backups. Both of the mail system (I backup the whole sdcard of the pi) and of the emails. Never lose an email again.