System: Ubuntu: 16.04 Monit: 5.16 Postfix: 3.1.0
I'm using Postfix as an MTA for alerts coming from Monit with:
SET MAILSERVER 127.0.0.1
It seems that Monit decides to connect and disconnect from postfix every time it runs checks. This isn't an outright bug, just a weird behaviour. It means that my /var/log/mail.log contains a lot of lines letting me know (every minute) someone connected and immediately disconnected. It adds noise to the logs, making it harder to see the important lines.
Jul 5 15:35:03 gator postfix/smtpd: connect from localhost[127.0.0.1] Jul 5 15:35:03 gator postfix/smtpd: disconnect from localhost[127.0.0.1] ehlo=1 quit=1 commands=2
It would be nice to have Monit only connect when there's something to send.
I'm still unfamiliar with the code at the moment. Do you think this would be an easy+worthwhile change to make? Would anyone be willing to guide me in making this kind of contribution? What files should I read to understand how to write the change?