I have a raspberry pi running postfix. I Realised unless I open port 25 I absolutely cannot receive emails (I have 587 open and can send but not receive them). However I heard there are scaries online which someone could potentially send emails from your server without consent. I believe as well my ISP doesn’t block port 25. Is there anything I should do right now before opening port 25, or should everything be safe enough?

10 points

Avoid being an open relay indeed. Some background information : https://www.postfix.org/SMTPD_ACCESS_README.html#relay But with the defaults in postfix you should be fine unless you made a lot of changes and made a mistake in it.

permalink
report
reply
38 points

Ideally, don’t. Self-hosting email is complicated, easy to get wrong (and dangerously wrong, where people could use your server as an open relay and send spam).

That said, if you really want to, make sure you’re not accepting email except for what’s destined for you. There are a bunch of postfix best-practice guides out there that can be easily found with a Google search. I don’t host my own email, so I can’t vouch for any.

permalink
report
reply
11 points

Agreed. I used to host email professionally and would not recommend managing your own mail server. It will constantly be under attack by spammers and if the inbox email address is exposed at all, soon 90% of incoming mail will be spam and you’ll need antispam software to filter it.

permalink
report
parent
reply
8 points
*

Not sure about you latter point tbh. I run an email server, with nothing but grey listing and spamassassin and the amount of spam is absolutely minimal.

Proper config and fail2ban easily takes care of direct attacks.

Nevertheless, I wouldn’t recommend it to anyone but the most determined.

permalink
report
parent
reply
11 points

To be fair, they said that you would need anti spam software and you do use anti spam software.

permalink
report
parent
reply

And even if you do everything 100% right, your emails will mostly get flagged as spam if not outright blocked anyway. Esp. if you’re using a residential IP.

permalink
report
parent
reply
7 points

You can check for being an open relay with tools like this one: https://mxtoolbox.com/diagnostic.aspx

permalink
report
reply
4 points

Thank you so much! It just tested it for me

permalink
report
parent
reply
14 points

You should be aware that a large number of mail hosters will block all mail from your server merely because it is sent from a dynamic IP address.

permalink
report
reply
-3 points

I’ve got a domain

permalink
report
parent
reply
17 points

The domain won’t change that. Even with a static IP if it’s coming from an ISP owned up block you’re likely going to get banned. Even with reputable VPS’ it’s hard. Make sure you have DMARC, DKIM, and SPF setup, but even then almost certainly going to get banned. The big player are creating and inherent monopoly instead of improving their spam filters.

permalink
report
parent
reply
3 points

If you manage to get a good SMTP relay host or authenticated SMTP account for your outgoing email then playing around with small scale self hosting email (Granted that it is not your important daily driver email accounts) can be an interesting and fun experience. But you will have to invest some time reading and tweaking and figuring things out. Slightly comparable with installing Arch Linux. Lots of people will warn you to not do it but you might learn a few valuable things on the way there.

permalink
report
parent
reply
13 points

It’s time to learn the difference between a domain and a dynamic IP.

permalink
report
parent
reply
1 point

Meh that sucks i even have a perfectly working ddns, I mean I know I don’t get something like a PTR record but i wish that mail hosters would allow for more self hosting options

permalink
report
parent
reply
2 points

Have you ensured that your setup will pass email authentication processes?

It has been a long time since email from random hosts is accepted for forwarding or delivery. This Wikipedia may help https://en.wikipedia.org/wiki/Email_authentication

permalink
report
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 5K

    Monthly active users

  • 3.9K

    Posts

  • 84K

    Comments