







Well, it depends what you call spam, how well known your server is (are your email addresses spread far and wide on the web or only known to a couple of people) but a lot of spam is automated and algorithmic, so most servers will be showered with speculative mail addressed to likely mailboxes - which your server still has to process, if only to bounce the message; if you have antispam measures, your server can just drop the connection when it detects a spammy sender (e.g. from an address on a black or greylist). I’m not currently running any mail servers, but a few years back when I did, I used to get about 80% spam incoming.


The list is immense, and I didn’t want to clutter my post with all the details. So just listing off things that spring to mind (because I don’t know what OP doesn’t know):
I’ve definitely missed some stuff, and each of those things requires knowing other stuff too, so you can see that it’s really a pretty deep subject. This is precisely why not many people self-host email themselves these days - the big guys have made it harder and harder to do so, in the name of eradicating spam, which they themselves are the biggest vectors for.


I’d suggest you start with a simple static web server if you’re looking for a good beginner project. Use something like Nginx, and just set it up on your local network at first, then work out how to harden it, and open it up to the real internet. There’s a lot less to learn for this usage case, and it’s less likely to get you into trouble.
I say that, because, after reading through the thread, it seems you are hoping to find an (educational) use for an old computer. I did Linux and Unix admin professionally for 15 years, for some famous brands. I would NOT recommend setting up a mail server as a first project - it’s complex in ways you will never expect, and will require learning skills and knowledge that are very specific and you literally can’t “start small and build up” because a lot of the things you don’t know yet will get you into big trouble. Essentially, it’s not too hard to set up the server software, and your hardware is certainly capable of running this task, but making it safe and secure IS hard these days - especially with all the encryption and anti-spam setups you have to learn how to do.