Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Example:
- # $ python Desktop/mail_agents.py ~/mail/neutron | sort | uniq
- import mailbox
- import sys
- mailbox = mailbox.Maildir(sys.argv[1])
- for email in mailbox:
- try:
- agent = email['User-Agent']
- print agent.replace('\n', '')
- except KeyError:
- continue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement