Quote:
Originally Posted by yonatan I've got a bit of a "situation" and I need to search the logs on my Zimbra server to see if mail has been sent or received from a particular email address.
Can someone please show me the command(s) necessary.
Thanks |
To search the most recent log
Code:
grep user@domain.com /var/log/zimbra.log | more
However the older logs are compressed, which requires more effort:
Code:
for i in /var/log/zimbra.log.*.gz ; do gunzip -c $i | grep user@domain.com | more; done;
You can vary this a bit and find just the "to" address using...
Code:
for i in /var/log/zimbra.log.*.gz ; do gunzip -c $i | grep "to=<user@domain.com>" | more; done;