I'm trying to send logs to my email. I'm doing this via SSH. I edited the file:
/usr/share/logwatch/default.conf/logwatch.conf
and edited these lines:
Output = mail
Format = html
Encode = none
MailTo = [email protected]
I have tried:
sudo logwatch
But the command just hangs there but is still responsive. E.g. I can still press enter to go to the next line.
I've tried doing it manually with:
sudo logwatch --detail Low --mailto email@address --service all --range yesterday
Same problem.
After a few minutes it stops and I can enter another command. I check my email but theres nothing from logwatch. Even in my spam/junk folder.
Any idea what's happening?
EDIT: I have iptables, fail2ban and ufw installed. If that makes any difference.
I have also tried:
echo "This is a test" | mail -s Testing [email protected]
I recieved the email in my spam folder. I feel like the problem is Logwatch.