this post was submitted on 31 Jul 2023
23 points (92.6% liked)

Selfhosted

39151 readers
321 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
 

Hi there,

what SMTP relay's / services do you use or can recommend for sending monitoring alerts.

I'm running a few services, but mostly all my custom scripts, and tasks are configured to sent an e-mail if something goes "off-script". Before I used my gmail account - but I'm in the middle of migrating away, and my requirements have evolved.

I've searched but I haven't found anything good. Services like Mailgun, Mailtrap etc. are nice - but their bundle's are a bit much for my taste.

The service/ relay should meet the following requirements.

  • bring your own domain (use your own domain/ or sub-domains as sender address)
  • must have DKIM (anything else is not a serious service!)
  • support SMTP via TLS
  • support multiple SMTP clients, with each different credentials/ secrets
  • Allow custom header/ envelope changes

At the moment I'm looking at Amazon SES, because I don't expect a lot of messages (I had 3 alerts in the last 1,5 yrs).

you are viewing a single comment's thread
view the rest of the comments
[–] nothacking@discuss.tchncs.de 1 points 1 year ago (4 children)

For alerts I just have the server directly send email over SMTP to my address, no service needed. You could implement DKIM with such a setup if you wanted to.

[–] thejoker8814@lemmy.world 2 points 1 year ago (3 children)

Sure - but that would be another thing to self-host - because I have at least 5 machines which need to send, and I have a dynamic IP address - so it would involve updating the MX records via DNS API for at least 5 sub domains.

To be honest, I'm a KISS kind of guy - not everything technical possible or imaginable is worthwhile. Especially if it's such a crucial part like alert monitoring. I want it done simple, secure, without caveats and keeping the complexity on the lowest level possible.

[–] wgs@lemmy.sdf.org 2 points 1 year ago* (last edited 1 year ago) (2 children)

Most distro provide either EXIM or Postfix installed by default, and configured to send outbound emails from localhost. All you need to do is start the service, change /etc/aliases to add root: and run newaliases.

You don't need MX records for that. MX is only needed to receive emails on a domain. Worst case is your monitoring emails will end up in spam (because there's no SPF configured for your machine), but your spam filter will eventually accept them as you move them from the spam folder to inbox.

Pretty KISS in my opinion. More than changing all your apps to use an external relay, setup accounts, yada yada...

[–] thejoker8814@lemmy.world 1 points 1 year ago (1 children)

My bad, I meant SPF record.

I have some issue with just that, all emails will end up in a spam filter (if your mail provider is thorough). Also your IP might end up on a public spam/ block list. To much to go wrong, in case some alerts need to reach me.

Plus I use a strict DMARC, so at least a correct SPF is needed.

I’m using postfix on my machines, all services send to it and it just to relays via a SMTP service. So only one point to configure.

I was specifically looking for the last part, a SMTP relay service.

[–] wgs@lemmy.sdf.org 1 points 1 year ago

As you please ;)

Be aware that I've been doing that for all my servers for the past 5 years and it works like a charm. I run OpenBSD, and only need to rcctl start smtpd to start sending outbound emails.

They're all sent from "root@host.domain.tld", which have neither SPF nor DMARK records, and end up in my inbox no problem (I use spamassassin as my spam filter). They won't end up on Blocklist as the volume is just waaayyyyyyy too low anyway.