Our family mail server quit working today. Maybe it's a bit long in the tooth...
from ExtremeDullard@lemmy.sdf.org to linux@lemmy.ml on 02 Sep 2024 16:30
https://lemmy.sdf.org/post/21785789

Apparently I installed that thing in 2006 and I last updated it in 2016, then I quit updating it for some reason that I totally forgot. Probably laziness…

It’s been running for quite some time and we kind of forgot about it in the closet, until the SSH tunnel we use to get our mail outside our home stopped working because modern openssh clients refuse to use the antiquated key cipher I setup client machines with way back when any longer.

I just generated new keys with a more modern cipher that it understands (ecdsa-sha2-nistp256) and left it running. Because why not 🙂

#linux

threaded - newest

n2burns@lemmy.ca on 02 Sep 2024 16:53 next collapse

Because why not 🙂

Because security.

ExtremeDullard@lemmy.sdf.org on 02 Sep 2024 16:58 next collapse

It’s behind a firewall. The only thing exposed to the outside is port 22 - and only pubkey login too.

And gee dude… It’s been running for 18 years without being pwned 🙂

n2burns@lemmy.ca on 02 Sep 2024 17:01 next collapse

And it’s not like it contains any sensitive information. I’m sure all your emails are just friendly correspondence with your pen pal.

imPastaSyndrome@lemm.ee on 02 Sep 2024 17:10 next collapse

It hasnt been pwned so far

possiblylinux127@lemmy.zip on 03 Sep 2024 03:22 collapse

For that matter, it hasn’t been ransomwared. There are so many ways to hide a compromise.

rhacer@lemmy.world on 02 Sep 2024 17:14 next collapse

Did you really only use it when you were home? If you used it outside the firewall then port 25 must have been open also.

I used to run my own server and this was in the early 90s. Then one day, perusing the logs I realized I was not smart enough on the security front to even attempt such a thing. It was quickly shut down and the MX record moved to an outsourced mail provider.

[deleted] on 02 Sep 2024 17:17 collapse

.

rhacer@lemmy.world on 02 Sep 2024 17:23 collapse

Very very aware.

So you had another mail server elsewhere that port forwarded port 25 via port 22 to your internal mail server’s port 25.

I take it that outside mail server was secure.

That’s an impressive setup.

[deleted] on 02 Sep 2024 17:34 collapse

.

kungen@feddit.nu on 02 Sep 2024 21:36 next collapse

How does the mail come in tho bro? Or is your mail server just a client machine?

possiblylinux127@lemmy.zip on 03 Sep 2024 03:21 collapse

Maybe its for communication between family members

pmc@lemmy.blahaj.zone on 03 Sep 2024 02:29 collapse

Where is the mail server getting incoming mail from?

schizo@forum.uncomfortable.business on 02 Sep 2024 17:27 next collapse

I’d still maybe build a modern OpenSSH package.

There’s been an awful lot of RCEs in the past two decades and uh, if that’s rawdogging the internet, I’m honestly shocked you haven’t been hit with any by now.

Sbauer@lemmy.world on 03 Sep 2024 15:36 collapse

Eh, building anything modern on a system that old would be painful I bet.

Maybe you could use github.com/openssh/openssh-portable since that’s meant to be portable. I’d certainly would give it a try if I didn’t want to bother trying to upgrade that system. Then again, trying to upgrade it through the releases to a modern Debian might be fun too.

ivn@jlai.lu on 02 Sep 2024 17:47 next collapse

without being pwned

How do you know?

Hupf@feddit.org on 03 Sep 2024 11:30 collapse

There’s a file called /pwnedornot and it contains “no, you’re safe bro”

InternetCitizen2@lemmy.world on 04 Sep 2024 00:37 collapse

Mine does

30p87@feddit.org on 02 Sep 2024 18:13 next collapse

How do you know? Do you constantly monitor running processes, performance and network connections?

ReversalHatchery@beehaw.org on 03 Sep 2024 00:29 next collapse

sorry, but what kind of email server listens only on SSH?

possiblylinux127@lemmy.zip on 03 Sep 2024 03:19 collapse

The most secure ones

possiblylinux127@lemmy.zip on 03 Sep 2024 03:18 collapse

How do you know? OpenSSH is pretty good but it isn’t impenetrable. Especially for almost 10 years.

psycho_driver@lemmy.world on 02 Sep 2024 17:21 collapse

Most ‘hackers’ are just mid tier (mediocre) IT level types who rely on existing exploits floating around in the wild. It’d probably be hard to find any still in circulation for such an old system.

limonfiesta@lemmy.world on 02 Sep 2024 19:43 next collapse

We’re not talking about some punch card COBOL machine he jimmy rigged with network access, it’s an old Debian Linux box with SSH enabled.

It’s not like Metasploit would have a tough time finding unpatched vulnerabilities for it…

possiblylinux127@lemmy.zip on 03 Sep 2024 03:09 collapse

What makes it a even bigger target is the fact that it is a mail server

limonfiesta@lemmy.world on 03 Sep 2024 03:48 collapse

Unless it’s for SMTP only, it’s probably a back end sever to some other front facing box, or service, that has IP addresses whitelisted for email.

I’m pretty sure I read one of his comments elsewhere talking about tunneling everything over SSH, so I assume that’s what he meant, but I could be mistaken.

Regardless, using an EOL distro as an internet facing SSH server that’s 8 years behind on SSH updates, is probably a bad idea.

possiblylinux127@lemmy.zip on 03 Sep 2024 03:08 collapse

It isn’t the “hackers” you should worry about. Its the nation states that take over huge numbers of machines.

DemocratPostingSucks@lemm.ee on 03 Sep 2024 11:10 next collapse

If the NSA (GCHQ here in the UK) want my emails they’re getting it either way, I’m not able to stop nation states

possiblylinux127@lemmy.zip on 03 Sep 2024 12:57 collapse

I was more referring to foreign countries and cyberwarfare. Like it or not counties have now realized cyberattacks can be very devastating. A compromised server may very well be used for all sorts of purposes that you are probably not ok with.

PlexSheep@infosec.pub on 03 Sep 2024 16:00 collapse

As a private person, defending against nation threat actors is impossible. And not only as a private person, but even as a medium sized company.

possiblylinux127@lemmy.zip on 03 Sep 2024 16:03 collapse

You just need to not be the easy target. You don’t need outrun the bear you just need to be ahead of whatever Joe is doing

Kabutor@lemmy.dbzer0.com on 02 Sep 2024 17:05 next collapse

you name your servers with nuclear subs names?

ExtremeDullard@lemmy.sdf.org on 02 Sep 2024 17:07 collapse

I’m a kid of the cold war.

limelight79@lemm.ee on 02 Sep 2024 17:10 next collapse

I gave up running an email server long ago - I thought it was basically impossible because too many spammers were doing it for nefarious purposes.

psycho_driver@lemmy.world on 02 Sep 2024 17:19 collapse

Nah you can use ghetto smtp to relay incoming mail to a different port on your server if your ISP blocks incoming 25 and sendinblue (it’s changed names but my sendinblue config is still working) to send outgoing mail if they block outgoing 25. It’s less than ideal but doable for low volume private email servers.

schizo@forum.uncomfortable.business on 02 Sep 2024 17:25 collapse

This suggestion always amuses me.

“You can easily run a mail server! All you have to do is route all the mail through someone else’s mail server and bam, you’re running a mail server!”

I mean it’s not wrong, but it causes a case of the giggles.

psycho_driver@lemmy.world on 02 Sep 2024 17:16 next collapse

That was a good test run. I think it’s time to put it into production.

Archer@lemmy.world on 02 Sep 2024 19:20 collapse

Everyone has a test environment. Some people also have production environments

merthyr1831@lemmy.ml on 02 Sep 2024 19:07 next collapse

Genuinely surprised when I see people running mail servers without issue. I suppose getting in relatively early means you’re not immediately sent to junk mail lists by the big players.

Shdwdrgn@mander.xyz on 02 Sep 2024 19:24 next collapse

Unfortunately that’s not true. I’ve been running mail servers under my domain since around 2000, almost as long as Microsoft has been running Hotmail, and I was certainly following good standards like SPF and DKIM well before they considered such a thing… and yet Microsoft is the bane of my mail server’s existence. Despite no compromises resulting in spam blasts, MS still regularly shuts me out with no reason given and no hits showing on their monitors. If I can find their email address to ask what the problem is, I get a generic “your domain has been cleared” sort of reply but never any reason why they blocked me in the first place.

kungen@feddit.nu on 02 Sep 2024 21:19 next collapse

Do you have a “spammy” TLD?

Shdwdrgn@mander.xyz on 02 Sep 2024 23:08 collapse

My primary domain is something that people have blacklisted because four letters happen to partially match a word that could be spammy (how ridiculous is that?), however the mail servers (the ones they keep blocking) are attached to my computer business name which I registered in 2006, so there’s really no reason why they should block it for that reason.

possiblylinux127@lemmy.zip on 03 Sep 2024 03:07 collapse

To be far you didn’t update for almost a decade. The large email provides fear you

ikidd@lemmy.world on 03 Sep 2024 05:02 next collapse

I’ve started up new domains and never had an issue getting mail accepted.

There’s a right way to do it, and most people that complain that hosting email is impossible don’t know how to configure it correctly.

Avatar_of_Self@lemmy.world on 03 Sep 2024 05:39 collapse

You need SPF, DKIM, DMARC with a RUA set up to an email that doesn’t bounce. That’s pretty much it. I’ve been running email servers a long time and actually set up email from a new domain/IP a couple of years ago as well.

GolfNovemberUniform@lemmy.ml on 02 Sep 2024 19:16 next collapse

That’s the power of Linux. It can work for decades without issues.

UnbalancedFox@lemmy.ca on 03 Sep 2024 03:22 next collapse

Or 5 minutes and you pull your hairs out 😂 then reinstall because you screw up something without any idea how to fix it.

GolfNovemberUniform@lemmy.ml on 03 Sep 2024 05:25 next collapse

You can screw up Windows Server too. My comment wasn’t about that.

UnbalancedFox@lemmy.ca on 04 Sep 2024 14:22 collapse

I know

Nibodhika@lemmy.world on 03 Sep 2024 05:36 collapse

Any OS can break and need reinstalling if you screw stuff up, but the majority of them would have a hard time running constantly for almost a decade without so much as a side glance.

Sbauer@lemmy.world on 03 Sep 2024 15:46 collapse

Eh, plenty of dos machines still used in banks and industry. It’s both scary and impressive. I have worked on cnc machines only a few years back that were from the 80s I think. The data transfer between the computer and the machine used a band of paper that had holes punched into it by a printer like device physically attached to the computer.

GolfNovemberUniform@lemmy.ml on 03 Sep 2024 18:31 collapse

Good old times.

phoenixz@lemmy.ca on 02 Sep 2024 19:22 next collapse

You send mail to Gmail and Hotmail and it’s actually accepted? How?

Max_P@lemmy.max-p.me on 02 Sep 2024 21:41 collapse

Patience. It really helps to have all the latest set up: SPF, DKIM, DMARC. Then after that it’s a matter of IP reputation, you can email the various blocklists and you wait for the rest of them to clear on their own.

I’ve had that IP for 10 years and it has never sent spam, and I’ve sent enough emails that people open that it actually does get through fine. I haven’t had to think about it for a long time, it just keeps on working. Barely had to even adjust my Postfix config through the upgrades.

Avatar_of_Self@lemmy.world on 03 Sep 2024 05:35 collapse

This is true. If you have DMARC and your RUA set up (with a working email (or one that doesn’t bounce at least)) along with SPF and DKIM, Google and MS will accept your mail. The only time it won’t at that point is if your IP is in the same /24 as a known spammer but so long as the spam stops, you’ll fall off the list. Some of the common spamlists allow you to request your IP be removed by request and I can only recall one list that almost nobody uses that makes you pay for the removal though there may be more I don’t recall.

RegalPotoo@lemmy.world on 02 Sep 2024 20:41 next collapse

Good thing there hasn’t been any remotely exploitable security bugs in any of the mail system components in the 6 years since Debian 7 went EoL

possiblylinux127@lemmy.zip on 03 Sep 2024 02:55 collapse

security-tracker.debian.org/tracker/

Depending on how it was configured it may or not be have been compromised. Probably better to go the nuclear option.

strubbl@lemmy.ml on 06 Sep 2024 19:42 collapse

Why? Then somebody else takes care that it still can send mails

some_guy@lemmy.sdf.org on 03 Sep 2024 02:32 next collapse

It’s had a good run. Let the little guy have a rest. Whatever you replace it with will consume less electricity.

possiblylinux127@lemmy.zip on 03 Sep 2024 02:54 next collapse

I hope you get your data off and then burn it and everything around it. It could be easily compromised you knowing. It could easily be used for spamming

mlg@lemmy.world on 03 Sep 2024 03:32 next collapse

Not to be that guy but why not use Curve25519?

I still remember all the conspiracies surrounding NIST and now 25519 is the default standard.

In 2013, interest began to increase considerably when it was discovered that the NSA had potentially implemented a backdoor into the P-256 curve based Dual_EC_DRBG algorithm.[11] While not directly related,[12] suspicious aspects of the NIST’s P curve constants[13] led to concerns[14] that the NSA had chosen values that gave them an advantage in breaking the encryption.[15][16]

Sbauer@lemmy.world on 03 Sep 2024 15:30 collapse

If you are worried that the NSA might be reading your email maybe it’ll be better for society if you don’t update … just saying.

possiblylinux127@lemmy.zip on 03 Sep 2024 16:01 collapse

It took me a while to get this

Nibodhika@lemmy.world on 03 Sep 2024 05:41 next collapse

I’m fairly certain that SSH and whatever else you’re exposing has had vulnerabilities fixed since then, especially if modern distros refuse to use the ssh key you were using, this screams of “we found something so critical here we don’t want to touch it”. If your server exposes anything in a standard port, e.g. SSH on 22, you probably should do a fresh install (although I would definitely not know how to rebuild a system I built almost 20 years ago).

That being said, it’s amazing that an almost 20 year old system can work for almost 10 years without touching anything.

Sbauer@lemmy.world on 03 Sep 2024 15:28 collapse

The amount of dos systems I have seen powering critical infrastructure in banks and hospitals is quite frankly nightmare fuel.

possiblylinux127@lemmy.zip on 03 Sep 2024 16:00 next collapse

They normally are isolated systems with controlled access. Same with shipping and any other critical industry.

Not to say that there aren’t exceptions but these days there is a required level of compliance

lepinkainen@lemmy.world on 03 Sep 2024 20:22 next collapse

A basic DOS system has zero networking or open ports

InternetCitizen2@lemmy.world on 04 Sep 2024 00:36 collapse

Remember its what the market determined is the best course of action.

Charadon@lemmy.sdf.org on 03 Sep 2024 14:00 next collapse

Please tell you to at least have Freexian patches installed…

possiblylinux127@lemmy.zip on 03 Sep 2024 15:59 collapse

This is how massive botnets form

hamid@vegantheoryclub.org on 03 Sep 2024 16:13 next collapse

Believe it or not I’ve come into contact with Microsoft Exchange 2010 running on Server 2008 for 2000 days once. The company had ransomware.

Findmysec@infosec.pub on 03 Sep 2024 19:57 collapse

Family email server? Your family have an email server to themselves? You managed to deal with block lists over 2 decades and more?

My utmost respect to your dedication

pastermil@sh.itjust.works on 03 Sep 2024 23:58 next collapse

It takes a special kind to run and maintain a mail server. More so for doing it for such a long time.

superkret@feddit.org on 06 Sep 2024 19:46 collapse

If it’s 2 decades old, it was probably grandfathered into all whitelists.