CISE Help & Resources
POP & IMAP
By default, all accounts created before May 1, 2002 were created using the POP setup. All accounts created after this date were created with the IMAP setup. People who have a POP email setup can choose to convert to IMAP.
POP Mail at CISE
- What are POP and IMAP?
- Conversion from POP to IMAP
- Using POP instead of IMAP
- Reading POP Email Securely
IMAP at CISE
What are POP and IMAP?
POP3 is essentially a mail download protocol. This means that whenever a person checks mail using POP3, all the new mail is typically downloaded to the computer the user is using at the time. This has the unfortunate effect of making it difficult to read mail from different locations while keeping all of the user's messages together in one place.
IMAP4 is essentially a mail access protocol. Mail is kept on a central server, and accessed by any IMAP-capable mail reader from any location. Using this protocol eliminates the difficulties of using POP3 to read mail. Therefore:
- When reading mail from different locations, the message and folder views are updated so all clients see the changes
- Any client that supports IMAP (CISE requires SSL support as well — most clients have this) can access the users mail.
The CISE Department uses IMAP4 as it's primary mail setup since it is far more useful when reading mail from a central location on multiple computers. Limited support for POP3 is available.
Conversion from POP to IMAP
On July 28th 2003, the CISE systems staff converted most CISE accounts from POP to IMAP. Those CISE users using pine with POP and the MH mail system are able to continue using POP.
The benefits of the CISE IMAP setup are as follows:
- Mail will be delivered to a separate mail space, freeing up home directory space for other things, and preventing home directory disk space usage from impacting mail delivery
- Mail delivered through the new IMAP scheme will be filtered through a program called SpamAssassin, then sorted (by default) into an IMAP folder named spam if marked as spam.
- Any IMAP-enabled client can be used to read mail from any location, including the departmental webmail client.
- IMAP users will benefit from any future enhancements in mail delivery, such as improvements in spam filtering.
Using POP instead of IMAP
Currently, there are 3 types of users who may want to use POP instead of IMAP at CISE:
- Those who use pine with POP (they see Retrieving mail from POP server
mail.cise.ufl.edu... when running pine.
In order to use pine/POP, you must download the following file and store it as .procmailrc in your home directory.
Once this is done, all mail will be delivered to the user's ~/msgbox file.
- Those who use the MH mail system.
In order to use MH/POP, you must download the following file and store it as .procmailrc in your home directory.
Once this is done, all mail will be delivered to the user's ~/Mail/inbox directory.
- Those who use POP over SSL and log in with username/password
Note Using either of the first two methods (i.e. by downloading either file and storing it as .procmailrc, mail delivery becomes the sole responsibility of the user, so those who wish to do either of these should have a firm grasp of mail delivery and know what they're doing. Also note, that while spam filtering will initially be set up in the user's procmailrc, it will be up to the user to keep up with how the systems staff filters spam if there are any changes in the future.
Those who use POP/SSL will be able to read email without making any changes. Reading POP/SSL email is discussed in the next section.
Reading POP Email Securely
Users are encouraged to use the IMAP protocol instead, but for those who need POP support for various reasons, it is still supported.
For security reasons, users must use SSL to read POP email. Outlook, Outlook Express, Mozilla and Netscape 7 all should support POP over SSL.
- Outlook:
-
Properties -> Advanced -> This server requires a secure connection (SSL) (port 995) - Outlook Express
-
Tools -> Accounts (select CISE POP account) -> Mail -> Properties -> Advanced -> This server requires a secure connection (SSL) (port 995) - Netscape and Mozilla
-
View Settings -> Server Settings -> Use secure connection (SSL)
NOTE: In order to prevent "Untrusted Certificate" popups from occurring when access secure CISE services, please see The CISE Certificate Page and see the section about importing the CISE Site Certificate.
CISE IMAP Setup
The IMAP server that CISE will be using is the Courier IMAP server. Courier expects a user's email to be stored in the user's home directory in a folder named Maildir.
As a general rule, users should not modify any files in this directory. Modifying them may render the email stored there unreadable.
For details on the format of this directory and the files in this directory, please refer to the Maildir Format section of this page.
Under the CISE IMAP scheme, the actual delivery of mail is done using two programs (procmail and deliverfsquota). For details about the delivery, please refer to the Mail Delivery section of this page.
Users may pre-sort their mail into given folders upon delivery. To do this, the procmail program is used. For details on this, please refer to the Procmail section of this page.
For more information on IMAP itself, as well as a list of available clients, please visit http://www.imap.org/.
Maildir Format
Courier expect user's mail to be in maildir folders. Each user will have a folder called INBOX, which resides in
~/Maildir
As with all Maildir-style folders, there will be 3 directories in ~/Maildir,
new cur tmp
Other files may be placed in the directory as well.
Any other folder created will be a subfolder of INBOX -- some IMAP clients may display this, others may show other folders on the same level as the INBOX.
Subfolders of INBOX reside in the ~/Maildir directory and are of the following form:
INBOX.fold1 -> ~/Maildir/.fold1 INBOX.newfold -> ~/Maildir/.newfold
Under most IMAP clients, these folders would show up as:
INBOX/fold1 INBOX/newfold
Subfolders of subfolders take this form:
INBOX.fold1.one -> ~/Maildir/.fold1.one INBOX.fold1.two -> ~/Maildir/.fold1.two INBOX.fold1.three -> ~/Maildir/.fold1.three
And show up in IMAP clients as
INBOX/fold1/one INBOX/fold1/two INBOX/fold1/three
Note that all folders, regardless of depth, exist *only* in ~/Maildir -- the IMAP server translates the "." separator into IMAP subfolders. If one were to put a subdirectory in a folder like so
~/Maildir/.fold1/foo
It would *not* show up as
INBOX/fold1/foo
on the IMAP sever.
If a users wishes to create folders manually, one can use the command
maildirmake
like so
maildirmake -f .folder ~/Maildir maildirmake -f .folder.sub1 ~/Maildir maildirmake -f .folder.sub2 ~/Maildir maildirmake -f .folder.sub2.subsub ~/Maildir
Typically, one can simply create the folders using the mail client of choice.
Mail Delivery
Under the CISE IMAP Scheme, mail will no longer be stored in the system mail spool. Instead, it will be auto delivered to each user's home directory by two programs:
deliverfsquota procmail
All CISE mail is first handled by a program call procmail, a general mail delivery program which can deliver to many different types of e-mail formats. At CISE, procmail then calls our deliverfsquota program which then delivers mail into a Maildir folder.
In the event the user gets close to his/her soft mail quota, deliverfsquota will deliver a warning message into the INBOX as well. In the event the user hits his or her hard mail quota (or deliverfsquota fails for any other reason), deliverfsquota will deliver a final warning message that the user has hit the hard mail quota. After this, the mail will go back into the mail queue and delivery will be attempted periodically.
If mail stays in the queue for too long a period of time, it will be bounced back to the sender.
Procmail
Users who wish to pre-sort their mail into given folders upon delivery can make use of the abilities of the default CISE mail delivery program procmail. Procmail is a cryptic yet powerful delivery program.
With procmail, Mail is sorted based on the message headers or text and is placed in an appropriate mail folder. This allows you to file messages from various mailing lists, family or friends, etc., in separate folders.
To use procmail for sorting mail, users can edit the file
$HOME/.procmailrc
and add rules that perform an action based on matching fields or strings in the mail message.
The basic format of a rule is
:0 (some commands here) * (match on some pattern (some action)
More information on using procmail for sorting can be found in the following man pages:
Also, users may want to check out the following pages for more info on procmail:
Examples
Here are some quick examples of how to use procmail at CISE. Users should always use the deliverfsquota program for delivery to IMAP folders.
The following rules illustrate some of the capabilities of procmail:
:0 w * From: mymom@aol.com | deliverfsquota .momstuff :0 w *^Subject: I am a virus | deliverfsquota .viruses :0 w *^TOaudits | deliverfsquota .audits :0 w *^TOzsh-users | deliverfsquota .apps.zsh-users :0 w *^TOpgsql-general@postgresql.org | deliverfsquota .apps.pgsql-general :0 w *^To: loganalysis@securityfocus.com | deliverfsquota .sec.loganalysis :0 w * | deliverfsquota
(Note: the ^TO recipe is special and useful — see the man page for more info).
The folder names are the actual folder names in ~/Maildir.
deliverfsquota doesn't need a mailbox specified when delivering to the INBOX. NOTE: Delivery
to the INBOX is the default recipe for mail delivery. It does not need to
be specified in your .procmailrc.