This is an old revision of the document!


Getting IMAP.pm up and running

This page is currently intended to give people willing to beta-test the IMAP module an idea of how to get the module running, how to configure it, and what to expect from it. I hope that this page can once be turned into real documentation.

What IMAP.pm does (or tries to do)

IMAP.pm, unlike POPFile's POP3 module, is not a proxy. This module connects to your IMAP server and then tries to stay connected as long as POPFile is running. At regular (adjustable) intervals, it will check your IMAP server for new messages. New messages are classified and then moved to other folders on the server based on the bucket the messages were assigned to. IMAP.pm not only checks for new incoming mail, it also scans its output folders for mail that you moved there. For example, if you have created IMAP folders “spam” and “ham”, corresponding to your spam and ham buckets, POPFile will look into the ham folder for mail it incorrectly classified as spam and vice versa. To summarize:

  • IMAP.pm will try to classify new messages and move them accordingly
  • and it will also try to reclassify erroneously classified messages.

What IMAP.pm (currently?) can not do

  • It cannot talk to multiple IMAP servers.
  • It will not modify the subject (according to classification) or add any of the X-POPFile-Link or X-Text-Classification headers to messages.
  • The module will not fork itself or the rest of POPFile. Thus you will not be able to access the POPFile UI while the IMAP module is busy checking the server, classifying, or reclassifying messages, etc.

What you need to run IMAP.pm

The IMAP module is not included in the default distribution of POPFile 0.22.2. A special IMAP Updater (for Windows) (68 KB zip file) has been created to add the IMAP module to POPFile 0.22.2 (or update the module shipped with 0.22.3 or 0.22.4). The IMAP Updater downloads the IMAP module from SourceForge so it is easy to keep up to date with development. By default the updater installs the most recent version of the IMAP module which is compatible with the installed version of POPFile but you can specify which version you require.

If you are not on Windows, you can download the latest version of the IMAP module that works with POPFile 0.22.2, 0.22.3 or 0.22.4 here. Inside the directory that holds the file popfile.pl on your system, create a sub-directory 'Services' and save the downloaded file as IMAP.pm to that directory.

If you are using the cvs version of POPFile, you should download the module here

Of course, you will also need a mail client with IMAP capabilities and an IMAP account at your ISP.

How to get it running

IMAP.pm is disabled by default. To enable it,

  • start POPFile,
  • go to the Advanced Tab in the POPFile UI,
  • search for the variable IMAP_enabled in the right table and set it to 1.
  • Click the “Update” button at the bottom of the page,
  • shut-down POPFile,
  • and start it again.

IMAP.pm should now be running along with POPFile.

You do not have to make any changes to your mail client configuration to work with POPFile's IMAP module.

Configuring IMAP.pm

To configure the module, go to the Configuration tab in the POPFile UI. Before you do that, however, you might want to use your mail client to create folders on your IMAP server that will receive the classified messages. For ex., you might want to create a folder named “spam”, a folder named “work”, and a folder named “personal”, depending on the buckets you have setup. Folder names and bucket names do not have to be identical, though.

First, enter the connection details for your IMAP server, i.e. the server's hostname or IP address, the port on which the server listens for incoming connections (default: 143), your user name (login) and your password. When you're done, click the “Apply” button.

In the next configuration step, you need to tell the module about the IMAP folder that receives incoming messages (usually the INBOX folder), and the output folders where the classified messages should go. You need to use your mail client to create new folders on the server that correspond to your buckets. Click the “Refresh list of folders” button, and the module will try to connect to your IMAP server and retrieve a list of folders.

Now select a watched folder (default: INBOX) and click the “Apply” button below the drop-down menu. You can add another watched folder by clicking the corresponding “Add” button. You can remove a watched folder, by simply pointing it's drop-down to a folder that you have already selected in another watched folder's drop-down. To put it differently, duplicated watched folders will be removed.

For each of your buckets, the UI should show a drop-down menu that lets you select an output IMAP server for that bucket. You can redirect the output of one bucket back to your INBOX, so that ham messages will simply stay there, while spam messages get moved to another folder. Click “Apply” to save the selected folders.

Options

? Expunge deleted messages ! Check this box if you want IMAP.pm to issue an EXPUNGE command to the IMAP server after it has moved messages out of a folder. Beware – this will also EXPUNGE messages that you have marked for deletion within your client. ? Update interval ! Enter the number of seconds between status updates. How often should IMAP.pm check your mailbox? Five minutes is a good place to start. Enter '300' (without the quotes) in the box and click 'Apply'. Enter '600' or '900' or more if you don't need POPFile to check for new messages that often. ? Bytes to use per message ! The number of bytes/octets that is downloaded per message (and used for classification) is limited by the contents of the GLOBAL_message_cutoff variable. It can be set from the Advanced Page of the POPFile UI; the default is 100,000 Bytes. If you set this variable to 0, no limit is set and the complete message will always be used, no matter how large the message is. ? Debug level ! In the latest versions on cvs there is no longer an IMAP specific debug level. POPFile now has a global debug level that can be changed via the Advanced Tab – change the variable “logger_level” to change the verboseness of the logs. Again, the higher the debug level, the more information will end up in POPFile's log file. If you detect a problem and want to post about it on the Bleeding Edge- Source Code forum, be prepared to provide a detailed log file. The values from this variable range from 0: log only critical errors to 2: log almost everything.

Clicking on “Apply” will save the options and they will be in effect immediately.

Reporting bugs

If you find any bugs (or have any questions), go to the Bleeding Edge - Source code forum, look for the latest thread about IMAP (or start a new one) and provide as many details as you can. However, this is not to say that you should post megabytes worth of log files.

We have started a wiki page about different IMAP-capable mail clients and how they cooperate with the POPFile IMAP module. Information about additional/missing clients is highly appreciated.

If you would like to know about the proposed future of the POPFile IMAP module, checkout the IMAP roadmap page.

 
experimentalmodules/imapinstructions.1177925714.txt.gz · Last modified: 2008/02/08 19:49 (external edit)

Should you find anything in the documentation that is incomplete, unclear, outdated or just plain wrong, please let us know and leave a note in the Documentation Forum.

Recent changes RSS feed Donate Driven by DokuWiki
The content of this wiki is protected by the GNU Fee Documentation License