this post was submitted on 20 Jun 2023
23 points (100.0% liked)

Selfhosted

39968 readers
284 users here now

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!

founded 1 year ago
MODERATORS
 

Pay for Sendgrid (100 / day for free is not enough) VS set up your own email server?

For own email server, do you not get flagged a lot as spam ?

top 21 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 1 year ago (2 children)

I wouldnt say that. however setting uo your own mail server is a lot of work, as you have to abide a lot of "security" rules (SPF, DKIM, DMARC, rDNS). Additionally some hosters reuire you to apply for port 25 to be unblocked (e.g. hetzner)

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (1 children)

The set up isn't actually hard at all, if you understand the concepts. Keeping off blacklists is the hard part, as big providers often block entire IP ranges due to one bad actor.

Edit: I meant sometimes your server gets blacklisted for something some neighboring server did

[–] [email protected] 1 points 1 year ago (1 children)

Well I did set one up today and the mails land in the spam folder for GMX, GMail and Microsoft (@live.de), although I set up SPF, rDNS, and DKIM. I have to take a look at how to setup DMARC, beacause my domain hoster doesn't allow free configuration of the TXT entries, you have to use templates and there isn't one for DMARC

[–] [email protected] 1 points 1 year ago (1 children)

Couple things that I've found out,

  • Gmail seems to need your server to have IPv6 with PTR, even if the mail is sent over IPv4
  • Even a DMARC record with no ruf or rua helps lower the spam score
  • For Outlook you need to send some mail to yourself or someone else and mark the messages as not spam manually for a while
  • MS365 will even put mails from Gmail to spam initially
  • Some TLDs like .xyz will go to spam even if everything is set up perfectly
  • Outlook also seems to cache DNS quite long, you may need to wait a day for changes to propagate
  • A recently registered domain will land in spam more easily, if it has been registered for a while it also seems to help

If you're not already familiar with these, https://mxtoolbox.com/SuperTool.aspx (write smtp:your.mx.record is a good tool, and I've also used https://www.mail-tester.com/. Mxtoolbox blacklist check is also good.

I hate it that spammers have made hosting email such a hassle. Hope you get stuff running!

[–] [email protected] 1 points 1 year ago (1 children)

I don't have an IPv6 PTR and I send mails through a .xyz domain and everything still works at least when sending to a gmail inbox.

[–] [email protected] 2 points 1 year ago

Well, in that case Gmail doesn't seem to require the PTR6 :)

None of these are absolute, since determining spam is based on a scoring system

[–] [email protected] 1 points 1 year ago

I managed to set up an SMTP server on my instance, I think I used postfix and dovecot after following some random tutorial. Then followed it with some generic make your mail not fall into spam tutorial to have the DKIM records and whatnot and to my surprise the e-mails reached even my Gmail inbox, which has probably the most strict rules. I must say that setting up postfix with dovecot is the hardest part, at least for me, after that it was just copy-pasting commands and setting some DNS records.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

Not sure if you’re hosting on AWS (if yes, free for the first 62k/month), else the $0.10/1k/month shouldn’t be too bad - https://aws.amazon.com/ses/pricing/

From my past experience with Sendgrid, it is trash, most of their shared IPs have poor reputation anyways, had lots of issues with them.

Running your own email server might be a good learning experience, a quick search brought up this all-in-one container solution - https://mailu.io/2.0/

Messing about with Postfix directly could be a painful experience, but yet another possibility.

Either way, new IPs will probably take some time to warm up, so don’t expect full deliverability for the first few days/weeks.

You should check that your cloud provider doesn’t block outgoing smtp traffic - iirc digital ocean and GCP do block.

[–] [email protected] 4 points 1 year ago (1 children)

If you are hosting public instances where you're sending emails out, you'll probably want to pay for transactional email providers like sendgrid as you've flagged. Sending large amount of email out yourself while ensuring high deliverability rating is doable, but will often result in more headache than cost savings.

[–] porksoda 2 points 1 year ago* (last edited 1 year ago)

Agreed. I use MailJet at work and have had zero issues since integrating it three years ago.

[–] [email protected] 2 points 1 year ago

I'm using mailjet with 200 / day free

[–] [email protected] 2 points 1 year ago

I’m piggybacking off of a mail server for a domain I run. My instance is small though so I’m not worried about a flood of emails.

[–] [email protected] 1 points 1 year ago

I use Zoho, it's only $12 a year.

[–] [email protected] 1 points 1 year ago

Using own email server, all emails are flagged as spam. Just put a message on your sign-up page or something like this. It is what it is when everyone uses gmail.com

[–] [email protected] 1 points 1 year ago

I can send as many emails as I want on my VPS with sendmail configured

[–] Im1Random 1 points 1 year ago

I would use services like SMTP2Go as a relay for your own email server.

[–] [email protected] 1 points 1 year ago (1 children)

On your own email server make sure that you have correctly setup dkim, spf, reverse dns, and the ip of server is not on any known denylist - but it still doesn't guarante that your email server would not get flagged as a spam source.

Or maybe setup transport rules that would try to deliver most emails directly, but to major providers like Gmail/outlook which are quite picky via smtp relay - at work we are using AWS SES to do that, it is not that expensive, but it depends on the volume.

[–] pete 1 points 1 year ago

Further, you can use https://mxtoolbox.com to help validate that the record are correct and the IP you have is not on a black list.

You'll either need to track down the operator of the blacklist and tell them it's no longer a spam address or, get a different IP from a different provider.

Additionally, to stay off black lists you'll need to lock down you relay feature so that only mail you want is going out. I.r. don't allow an open relay from anyone, if you have users, you should throttle them, and probably do outbound spam filtering to protect your IP in the event they use a bad password or something.

[–] [email protected] 1 points 1 year ago

Oh, does sendgrid give you 100/day? I'm currently limited at 200/month with mail jet

[–] [email protected] 1 points 1 year ago

FIRST, you need a host that lets you set PTR records for your IP. Check out Mailcow if you want to host your own server. It automates the security process and generates all the DNS records you need for your server to send email that won't be flagged as spam.

Once your server is set up you can test it with https://www.mail-tester.com/. If you can get a score of 10 you will be golden.

[–] [email protected] 0 points 1 year ago

I vouch for ProtonMail - I have a grandfathered "visionary" plan I'm already paying for. So far haven't run into any rate limiting on the SMTP side.

The biggest benefit to ProtonMail is the guided SPF/DKIM/DMARC/rDNS setup that makes things really easy!

This also sidesteps the port 25 issue since they use STARTTLS on port 587 instead.

load more comments
view more: next ›