this post was submitted on 14 Apr 2024
32 points (92.1% liked)

Selfhosted

40018 readers
671 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
 

I'm looking for a simple sendmail replacement to receive local mail, such as from cron and service failures and forward it to on to a real SMTP server.

I have used msmtpd successfully but thought I'd ask if folks have other solutions they like.

you are viewing a single comment's thread
view the rest of the comments
[–] aard@kyu.de 2 points 6 months ago (1 children)

It has been a while since I touched ssmtp, so take what I'm saying with a grain of salt.

Problem with ssmtp and related when I was testing it was its behaviour in error conditions - due to a lack of any kind of spool it doesn't fail very gracefully, and if the sending software doesn't expect it and implement a spool itself (which it typically doesn't have a reason to, as pretty much the only situation where something like sendmail would fail is a situation where it also wouldn't be able to write a spool) this can very easily lead to loss of mails.

I already had a working SMTP client capable of fishing mails out of a Maildir at that point, so I ended up just doing a simple sendmail program throwing whatever it receives into a Maildir, and a cronjob to send this forward. This might be the most minimalistic setup for reliably sending out mail (and I'm using it an all my computers behind Emacs to do so) - but it is badly documented, so if you don't care about reliability postfix might be a better choice, or if you don't just go with ssmtp or similar. Or if you do want to dig into that message me, and I'll help making things more user friendly.

[–] markstos@lemmy.world 2 points 6 months ago

Thanks. This is just for forwarding from mail and the like, so occasional loss of mail due to lack of spooling could be tolerated.