0

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 = foo@bar.com

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 foobar@gmail.com

I recieved the email in my spam folder. I feel like the problem is Logwatch.

  • 1
    I've never used it, but based on reading the man page I think the problem may be logwatch as well. It's clearly a syslog based tool, and I don't think recent versions of Raspbian use that; I may be wrong as I am too lazy to check a virgin image right now. Check systemctl status rsyslog. If it's not installed and running, you'll have to make it so. – goldilocks Aug 18 at 15:21
  • 1
    Have you turned off rsyslog (which is on by default)? As goldilocks noted, there are changes required if you've disabled rsyslog. Also, try the following command: 'sudo logwatch --range today --output stdout | less' . This is kind of like the bare minimum and outputs to your ssh console. – bls Aug 19 at 2:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.