Setup mail on unix, to send logs to gmail

1

I'm using logwatch to send email logs, but I'm having a hard time understanding how to set up a simple MTA to actually send them to my gmail. Most information I've found is on creating a full blown two-way mail client (e.g.), but I only need a way to send a log to one gmail.

What is the simplest way to send an email to gmail (no other functionality required)?

Dominykas Mostauskis

Posted 2013-09-23T09:35:42.913

Reputation: 312

Answers

0

Why don't you install exim, for example (debian / ubuntu):

aptitude install exim4

when in the setup dialog (you can relaunch it with dpkg-reconfigure exim4-config), you set:

  • internet site (send mail directly)
  • mail name = (you need a domain name there)
  • listen on connection: 127.0.0.1, that way you don't accept or relay mail
  • no relay
  • minimal DNS = no
  • format = mbox (for example)
  • configuration in only 1 file
  • root and postmaster recipient = root

You get a running configuration in 5-10 minutes max.

Victor von Cacahuete

Posted 2013-09-23T09:35:42.913

Reputation: 36

Works like a charm ;) I created a filter for it in gmail, specifying to label it and not mark as spam. Gmail seems to still give a warning, but no big deal. – Dominykas Mostauskis – 2013-09-23T10:22:33.247