Thursday, October 15, 2015

Logwatch + MailGun

I really like the way Logwatch works but I hate when I can't properly send mail due to reverse DNS restrictions, based on this post [1] I came with the idea of leveraging the power of MailGun in order to send Logwatch email notifications and it went successfuly.

In the logwatch main configuration file (/etc/logwatch/conf/logwatch.conf) on Debian, change the following:

  1. comment out the sendmail line

  2. # mailer = "/usr/sbin/sendmail -t"

  3. add a line to use our custom mailgun mailer script

  4. mailer = "/usr/local/sbin/mailgun"

After changing the values, you can run a test with the following command line


The mailgun shell script can be (literally) checked out here [2].


    = ^ . ^ =

No comments:

Post a Comment