Replace POP3 with IMAP to extend the reach of users' email

Daily Newsletters

Sign up to ZDNet UK's daily newsletter.

ANALYSIS
When setting up your own email system, there can be some difficulties even after you have the server set up on your network, in terms of sending and receiving mail for local users. At this juncture, you have to make sure that the mail is going to the appropriate user. For instance, Postfix accepts incoming mail for local users and relays mail from local users out to wherever it's going. When it receives mail, it drops it into a mailbox file for the UNIX user account. To read this mail, you need to read the mailbox file directly, with a program that is capable of reading the raw file. However, even with the powerful multiuser capabilities of Linux, you don't want to force your users to log on to the server and use a text-based mail reader, as you may end up on the street. Fortunately, there are several email protocols for retrieving email from a server. By far, the most common is Post Office Protocol, otherwise known as POP3. Nearly all mail clients speak POP3. With POP3, the mail client connects to the server, downloads all new email, and disconnects. This works fine for people who use only a single computer for all of their email, but if they want to check their email from any other computer, they won't be able to get to all of their messages. They also risk having their messages scattered across multiple computers. Using Internet Message Access Protocol (IMAP) as an alternative is a good solution to this problem. In this article, I am going to add an IMAP server to my current email setup and configure virtual users using a MySQL database. What is IMAP?
IMAP provides a compelling alternative to POP3. With IMAP, all mail stays on the server, and clients manipulate the status. When you connect with IMAP clients from different computers, you see the same set of folders and all of your mail. If you read a message on one computer, it is read when you check it from another. If you delete it on one, it's deleted everywhere. For people who work with email offline or over a dialup connection, IMAP has many solutions for managing email. Mail clients can cache messages and then update message status on the server when they reconnect. Messages can be left on the server and deleted while still being unread, without having to download first. The main downside of IMAP is that leaving mail on the server consumes a lot more disk space in one place, rather than being distributed across a bunch of clients. This makes backups much easier, but you may have to add disk space or implement quotas. Courier-IMAP
Courier-IMAP is the IMAP server I've chosen for this email system. It provides both IMAP and POP3 servers, so your users can choose either. It can access mail for users who don't have a local UNIX account ("virtual" users), and by putting the account information in a MySQL database, it can share these accounts with Postfix. Courier-IMAP uses a directory-based file format called Maildir instead of traditional UNIX mailboxes. By using individual files for each mail, Maildir mailboxes don't have locking issues, and opening a large mailbox is fast. You can download the source tarball for Courier-IMAP. Courier-IMAP is one part of a complete mail suite, but most of the other parts of the suite are not as widely used as the IMAP server. It also supports SSL-encrypted connections if you compile against the OpenSSL libraries.

Talkback

I am wondering when we might see the rest of the articles in this series.

The first three articles have been most interesting and useful.

via Facebook 6 August, 2003 16:08
Reply

I fully agree.. I'm anxiously awaiting the rest of this series of articles.

via Facebook 7 August, 2003 22:53
Reply

Post your comment

In order to post a comment you need to be registered and logged in.

You can also log in with Facebook. Log in or create your ZDNet UK account below

  • Login

Will not be displayed with your comment

By signing up for this service, you indicate that you agree to our Terms and Conditions and have read and understood our Privacy Policy. Questions about membership? Find the answers in the Community FAQ

Get ZDNet UK's daily newsletter

Enter your email address to sign up

ZDNet UK Live

Moley

@GrueMaster. I prefer horses for courses rather than one size fits all. I, and I suspect most other computer users, do not really wish to have...

4 minutes ago by Moley on A tale of two distros: Ubuntu and Linux Mint
greycynic

The product that scares me every time I have to use it is the Office 2007 version of Excel. The first bug that I found was applying the median...

7 minutes ago by greycynic on Ten flawed products that derail productivity
GrueMaster

Nice review and very informative. One thing I'd like to add (in reply to whs001's 1st question), the main reason to have the same interface from...

2 hours ago by GrueMaster on A tale of two distros: Ubuntu and Linux Mint
Frederick Wrigley

I'be been using Mint 12 since the RC came out, and I am far more happy with the Cinnamon, the Mate, and, yes (with extensions), theGnome 3...

2 hours ago by Frederick Wrigley via Facebook on A tale of two distros: Ubuntu and Linux Mint
bdantas

Excellent article. One small correction, though--although a fresh installation of Linux Mint 12 will, indeed, provide the user with a version of...

3 hours ago by bdantas on A tale of two distros: Ubuntu and Linux Mint
Alan Ralph

In related news, the ISPs club together to get the members of the Home Affairs Select Committee (ya goofed on that part, ZDNet UK) copies of "The...

4 hours ago by Alan Ralph via Facebook on MPs urge ISPs to take down terrorist material
Alan Ralph

In related news, the ISPs club together to get the members of the Home Affairs Select Committee (ya goofed on that part, ZDNet UK) copies of "The...

4 hours ago by Alan Ralph via Facebook on MPs urge ISPs to take down terrorist material
Moley

For Gnome 2 die-hards, it is possible to add icons to the bottom panel (or top top panel, if you prefer) which provide the exact Gnome 2...

4 hours ago by Moley on A tale of two distros: Ubuntu and Linux Mint
ramwellian

Your comments would seem pretty naive and immature. Your 'solution' appears to be, "gee, let's all just give in to the hackers and give them...

5 hours ago by ramwellian on Cloud computing security: no more oxymoron?
BugStalker

"Interesting thought ... If you installed Win7 as a dual boot on a machine that previously only had Linux, and it wrecked your Linux installation,...

5 hours ago by BugStalker on Windows 7 Declares War on GRUB
whs001

This is an excellent summary of Ubuntu and Mint and the interface differences between them. Most such articles take a very partisan position for...

5 hours ago by whs001 on A tale of two distros: Ubuntu and Linux Mint
Moley

@ewallace. Not so clear. Anyone can obtain the text, for example from here http://www.ustr.gov/webfm_send/2379. I support ACTA so long as it and...

5 hours ago by Moley on ACTA: Facts, misconceptions and questions
45283

I think WinRT is fantastic. I just wish it was an option for people that didn't want to go through Microsoft's App Store with its attendant...

8 hours ago by 45283 on Why Windows 8 needs architectural hygiene for WOA
Burn-IT

Nine people? £30m? Who's back pocket is that lot going in? And IF they say it is for new buildings, what about all the ones the government has...

9 hours ago by Burn-IT on Police set to launch three £30m e-crime hubs
ewallace

Just to be clear, nobody knows what is in the text of ACTA, here is a photograph of the text of ACTA http://twitpic.com/8h9iju as submitted to the...

10 hours ago by ewallace on ACTA: Facts, misconceptions and questions
fgvrg56

Unfortunately main issue is that ASUS is refusing to accept that they make some mistake on this version of asus Transformer prime. 1 - GPS sensor...

11 hours ago by fgvrg56 on Asus Eee Pad Transformer Prime Wi-Fi & GPS problems?
Ben Woods

@Marcus A fair question. Just talked with Archos which said it was working on an announcement for next week....

12 hours ago by Ben Woods on Archos confirms G9 Ice Cream Sandwich update schedule
Marcus Karlsson

Any update on this, considering the claimed "first week of February"?

13 hours ago by Marcus Karlsson via Facebook on Archos confirms G9 Ice Cream Sandwich update schedule
apexwm

Bill Goodrich : Just as al_langevin pointed out, with Windows Server 2008 there is no Services for Macintosh anymore. It's gone, not available....

21 hours ago by apexwm on Windows Server 2008 drops the ball for Mac compatibility
txtrainguy

Replying to an old topic that I'm currently facing with my CEO (who is on a Mac). Our servers are primarily Windows Servers, office is about...

1 day ago by txtrainguy on Windows Server 2008 drops the ball for Mac compatibility