Home | Sitemap | Contact | remote.org Homepage Jochen Topf Search:    
  : Home : Mail : eMail Info : POP3 LAST    

The POP3 LAST command

POP, the Post Office Protocol, is used by mail readers to get the incoming mail from a server. It is many years old and has seen several revisions. In older versions of the protocol, a LAST command existed. If the client send the LAST command, the server would answer with the number of the last mail in the mailbox that had already been read.

In November 1994 the LAST command was removed from the standard but some POP servers still support it. And some clients still need it. This has caused some confusion and many people ask again and again for a resurrection of the LAST command.

But there are some good reasons why the LAST command was abolished: For one thing, the LAST command is the only reason for a server to keep track of read and unread mail. But most servers do this anyway, so this alone is not a big problem. More problematic is the actual semantic of the LAST command: The LAST command is based on the idea that messages are always read in order, from the lowest number to the highest number. But, although this is the common case, it is by no means always true. The client can decide to read the messages in any order it likes, it can even decide to only read some messages, leave some unread or delete them immediately. This means that the LAST command can't really be accurate. If there are several mails in a mailbox, some read and some unread all mixed together. Which one does it report?

So it was dropped. Instead the UIDL mechanism is now used to keep track of read and unread mail: Every mail has a Unique ID which never changes as long as this mail resides in a POP mailbox. The client keeps track of all the IDs it has seen and in that way it knows which mail it has already read.

The problem with the UIDL approach is that it only works with one client. If you use several clients to read your mailbox they wont know about each other and which mail has been read with the other client. This is especially a problem for people reading the same mailbox from home and from work or from their notebook while on the road.

There is really only one solution to this: Switch to the IMAP protocol. IMAP is much more powerful (and also much more heavy-weight) than POP and it keeps state about read mail on the server. IMAP is based on the idea that you can keep your mail on the server and always access the server if you want to read your mail. POP, on the other hand, is based on the idea that you ask the server for all your mail, copy it to your local mail folder and then delete it on the server.

History of the LAST command

The LAST command was still part of the draft standard in RFC 1460 from June 1993. It was removed in the RFC 1725 in November 1994. In the current POP3 standard (RFC 1939) it is not even mentioned.