|
NAMEGMail::IMAPD - An IMAP4 gateway to Google's webmail serviceSYNOPSIS# Start an IMAP-to-Gmail daemon on port 1143 use GMail::IMAPD; my $daemon=GMail::IMAPD->new(LocalPort=>1143, LogFile=>'gmail_imapd.log', Debug=>1); $daemon->run(); # Or if you prefer to use your own server socket, # you can do something like: my $i2g=GMail::IMAPD->new(LogFile=>'imapd.log'); for(;;){ my $s=someserver(); $i2g->procimap($s); } DESCRIPTIONThis module allows users to access their Gmail messages with an IMAP client by running a server which accepts IMAP connections.METHODS
NOTESThe IMAP and Gmail models differ. How GMail::IMAPD translates these differences is mostly intuitive. For instance, folders translate to labels. You can even have subfolders which translate to label names such as 'Work/NewProject'. Some translations that aren't as intuitive are shown in the table below:- Copy message to folder -> Add label to message - Move message from Inbox to folder -> Add label to message and archive - Move message from folder to Inbox -> Remove label and unarchive - Delete message in Inbox -> Archive message - Delete message in folder -> Remove message label - Delete message in Trash -> Permanently delete message Messages from other IMAP accounts can be appended to the Gmail Inbox, and Inbox only. The module achieves this by emailing the message to the Gmail account. Therefore, the append procedure may be slow and the message will initially be marked unread. To persistently cache Gmail messages, a database handle can be given as an argument. Using the Tie::RDBM module, GMail::IMAPD will automatically create a table for each user and store messages in this table. GMail::IMAPD is not fully IMAP4 compliant and has just enough functionality to get by. It has been tested with Firefox, Outlook, Outlook Express, and mail2web.com. CAVEATSThe IMAP client is automatically subscribed to all folders/labels. Unsubscribe has no effect. This is to eliminate any need for persistent server side data at the moment.Once a message has been moved to Trash, it cannot be un-Trashed with the IMAP client. This functionality might be missing in the Mail::Webmail::Gmail module or I'm not sure how to do it with the module. Access to large folders is slow. To fetch simple header information requested by most IMAP clients (FLAGS, INTERNALDATE, etc) requires GMail::IMAPD to download the entire message. Using persistent message caching with CacheDBH helps alleviate this problem. To work, GMail::IMAPD currently bundles and uses patched versions of UserAgent and Mail::Webmail::Gmail. One line of UserAgent was changed to forward cookies to Gmail. And, only a patched version of Mail::Webmail::Gmail works with the current version of Gmail. Future versions of GMail::IMAPD will remove these patched modules when the actual modules are updated. BUGSIf a message is replied-to via the gmail web interface and the reply is discarded, the message becomes unavaible to interfaces such as Mail::Webmail::Gmail. I believe this is a Google bug.PREREQUISITESLWPCrypt::SSLeay TODO- Better error handling- IMAPS support - A contacts folder, perhaps containing messages with xml and vcf attachments - Copy from other IMAP accounts to any Gmail folder - Interface with Mail::Webmail::Yahoo ? CREDITSI'd like to thank Allen Holman (mincus) for the Mail::Webmail::Gmail module. His module greatly accelerated the development of GMail::IMAPD.AUTHORKurt Schellpeper <krs - cpan - org>COPYRIGHTCopyright 2005 Kurt Schellpeper. All rights reserved.This library is a free software. You can redistribute it and/or modify it under the same terms as Perl itself. POD ERRORSHey! The above document had some coding errors, which are explained below:
Visit the GSP FreeBSD Man Page Interface. |