Information of all from domain mails to a user Amit Srivastava

Get Information of all from domain mails to a user


# This Article is to get Information from the mailbox of a user that from all which domain he/she got the mail.


# Ref: https://wiki.zimbra.com/index.php?title=Account_mailbox_database_structure


# su – zimbra

$ zmprov gmi user@domain.com

mailboxId: 36

quotaUsed: 65146125877


Note: mboxgroup = expr mailboxid % 100

$ expr 36 % 100

36


Note: This means mailbox lie in mboxgroup36


$ mysql mboxgroup36 -e “select * from mail_item where mailbox_id=36” > /tmp/detail.txt


$ cat /tmp/userdetail.txt|grep -E -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z.-]+\b" | sort -nr| uniq | cut -d'@' -f2,2 | sort -nr |uniq > /tmp/domains.txt

Jump to: navigation, search