How do I setup logwatch to send emails without a local mail server?

May 3, 2015 1.3k views
Logging Monitoring Email System Tools Configuration Management Ubuntu


After fighting with postfix and dovecot for 2 days, I decided to just use gandi. So I transferred my domain to gandi (from ovh where I was having a VPS before) and everything works fine now.

But here's the problem. I want to use logwatch to keep an eye on logs. The problem is that logwatch needs an MTA. So, I looked around if there is some standard answer to that problem. There isn't. Most tutorials even ignore the fact that the logwatch has a MTA dependency in the Ubuntu repository.

The standard package here is postfix but postfix is massive and I don't really need something that big. Also, I just spend way to much time fighting with that thing so I'd rather use something else.

I found nullmailer which is just supposed to send off the email through another SMTP. Gandi doesn't do anything. I think my /etc/nullmailer/remotes is correct but I'm also not sure what to do with the other configs.

Gmail is having none of that. After the first test email I've sent, Google told me to add a phone number to my account and verify myself. Now it's saying "please log in to gmail through your browser" in the mail.log.

So, is there an easy way to either get nullmailer so that Gandi eats the emails or to setup a mail server that can deliver but not receive emails without interfering with my emails hosted by gandi? Or is there an alternative tool that just does a better job in general?


Be the first one to answer this question.