I would like to process incoming e-mails (on IMAP account) as a e-mail fetching client and feed e-mail data into a scripting language to fill up a specific tables in database. The main goal is to process e-mail body text for data mining and metrics.
Best if run on common UNIX like systems: Linux, *BSD, Solaris
Infrastructure:
Mail Server <---using-IMAP--client<--- My Server--> Scripting lang. -> Database
What I found so far:
- MTA / fetchmail & procmail
- getmail (python script)
- using plain e-mail client to grab emails to ~/.Mailbox and process them (expecting poor performance)
Any suggestions of what may be used to perform such task?
For Python, imaplib implements an IMAP4 client.
This and Nelson’s answer should give you the template to follow: