Inject gaim logs into gmail
Posted by ark, ,
I love the new chat feature in gmail, and I doubly love the fact that my chat history is nicely searchable. For a while now I've wanted to import all my old chats into gmail so I can search over them too. This weekend I sat down and wrote gaim logs mailer. Gaim is an open source multi protocol chat client with god awful almost non-existent insecure password management. It takes your logs and sends them to an email address of your choice. It's driven by a config file in ~/.gaim/logsmailerrc and keeps track of which logs it's mailed so it wont mail them again. You can run this every night if you want. Here's an example logsmailerrc.

I still have three todo items for it:
- make it parse yahoo messenger client logs (which are lamely obfuscated)- make it keep a timestamp/md5sum of when the file was sent so that if more stuff gets added to the file it's resent.
- make it upload adium logs too

There is one problem:
- even though the date is correct in the email, gmail seems to index based on the date received. So you can't do before: or after: searches and find your messages.

If you use this to email your own account, and then fetch that via POP3 it might have better luck with the dates. I also heard if I send it directly to gmail using IMAP and use IMAP APPEND then gmail should preserve the timestamps:
You want to use the optional INTERNALDATE argument in order to set the
"received time" to the time of the message, assuming that's the date
problem you were having. Otherwise, you need a Date: header that is
correct for the "message time".


Comments