How can I send email reports to myself from my home server?

by bertalanp99   Last Updated July 10, 2019 12:01 PM

One would think this is a dead simple thing, but apparently it isn't—or I just really suck at it.

Context: I have a little home server hosting things like task-managers (TaskWarrior), my website, my IRC bouncer, etc. I try to keep this server as secure as possible. Also, I would like to keep it well-maintained.

I thought it would be nice to receive some periodic/event-triggered emails from this server to detect possible security breaches, failed services and other problems. The actual implementation is irrelevant, I'd either just send myself the outputs of periodic maintenance scripts or perhaps grep some keywords out of logfiles.

The problem is that I am stuck at simply sending an email to my address. What I tried:

  1. I need an SMTP server to send the email, so I should just use my email service provider's, I guess ( This is how it turned out:
$ openssl s_client -connect
220 ESMTP Postfix
HELO myhostname
MAIL FROM: [email protected]
250 2.1.0 Ok
RCPT TO: [email protected]
554 5.7.1 <my-ip:30920>: Client host rejected: Access denied

I am not sure if this has to do with having to authenticate on the server. I tried with as well, but I got an 530-5.5.1 Authentication Required reply to my MAIL FROM there. However, I would rather like to avoid Google anyway.

  1. Supposing the failure is due to having to authenticate, I face another problem: sure, I could just tell my MTA (let's say dma or msmtp) my password for my account, it doesn't sound like a good idea. I am not experienced enough in setting up security to be certain my server won't be hacked easily. I know that once root access is gained I am done for, but I could still mitigate the damage by I don't know, not having my plaintext passwords scattered around the server? Normally, I keep them GPG-encrypted using password-store.

  2. Perhaps I should run my own SMTP server? I can't use my domain for that though, since I have set up with emails of my own domains, so my MX DNS records point to their servers. I don't really want to buy another domain just for this...

Summary & TL;DR

Is there some way to simply send emails to my own address provided by from my server without

  • running and maintaining a complex SMTP server on my server
  • having to expose sensitive information such as my passphrase on the server to log into the provider's SMTP server?

Related Questions

Datacenters and hosting VMs

Updated October 12, 2017 10:01 AM

Hosting a mobile app and web

Updated September 04, 2015 04:00 AM