List top sender address emails in zimbra


How to List top sender address emails in zimbra from command line. From MTA zimbra I will run command to list 6 sender address email Zimbra.

The command as below:

$ cat /var/log/zimbra.log | awk -F 'from=<' '{print $2}' | awk -F'>' '{print $1}' | sed '/^$/d' | sort | uniq -c | sort -nk1 -r | sed -n '1,6p'
Note:

sed '/^$/d' : To delete only blank lines
sed -n '1,6p' : To print 1 line to 6 line.
awk -F 'from=<' '{print $2}' | awk -F'>' '{print $1}' : To print the email of sender address

Comments

Popular posts from this blog

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Error "Unable to retrive Zimbra GPG key for package validation"