So I've been using LogWatch for a little while and wanted to customize it a bit, so this is one of the things I want to edit.
I want LogWatch to verify via SMTP?
My mailserver (iREDmail) has some quite strict rules regarding auth, so that I have to set a password for an account and it has to be in the system.
How do I set up LogWatch to STMP auth with email and password?
Best Answer
Hi if you want logwatch send mail using smtp account you can use package msmtp (debian) and configure logwatch to use it, it send smtp authenticated mail as result. You dont need postfix, setting itself dont affect existing MTA configuration in system.
Step 1 : install and test msmtp
configure it by create config file in user home folder
edit and paste this content to suite your needs
tls_certcheck off # if you dont want check ssl cert of mailserver
tls_trust_file mycacertificatefile # if you want check ca certificate
Save file and check/verify configuration using command
Step 2 : edit configuration of logwatch
find existing mailer line and comment it. make new line and change target mail address
Check that mail address in logwatch match mail in .msmtprc otherwise you will get Non Delivery Report back
save and run logwatch script, check email in target mailbox, if nothing comes check mailbox of user@domain.tld for Non Delivery Report for problems
This solution works for me, i get mail correct way and I using DMARC and DKIM correctly for reports i need.