POP3 requiremenst for headers & leave copy at server

J

Jan KuÄera

Hello,
what does the POP3 server need to do in order for Outlook to download the
headers and work with "leave copy of messages at server" checked?

I thought that TOP command should do for the headers, and simply Outlook not
issuing DELE should leave the messages on server. However, Outlook still
says the server does not support header downloading and does not work at all
if I leave the checkbox checked.

Any hints?

Thanks!
Jan
 
P

PeterS

Jan KuÄera schreef:
Hello,
what does the POP3 server need to do in order for Outlook to download
the headers and work with "leave copy of messages at server" checked?

I thought that TOP command should do for the headers, and simply
Outlook not issuing DELE should leave the messages on server.
However, Outlook still says the server does not support header
downloading and does not work at all if I leave the checkbox checked.

Any hints?

Thanks!
Jan

From the outlook help:

Do one of the following:

1. Download headers

Manually download headers

If you have not already added the POP3 account to the Microsoft Outlook
profile, add it now.
How?

On the Tools menu, click E-mail Accounts.
Select Add a new e-mail account, and then click Next.
Select POP3, and then click Next.
In the appropriate boxes, type the information given to you by your ISP
or e-mail administrator.
On the Tools menu, point to Send/Receive, point to the account, and
then click Download Inbox Headers.
Automatically download headers

If you have not already added the POP3 account to the Outlook profile,
add it now.
How?

On the Tools menu, click E-mail Accounts.
Select Add a new e-mail account, and then click Next.
Select POP3, and then click Next.
In the appropriate boxes, type the information given to you by your ISP
or e-mail administrator.
On the Tools menu, point to Send/Receive, point to Send/Receive
Settings, and then click Define Send/Receive Groups.
Under Group Name, select a group that contains your POP3 account.
Note If you have not created any custom Send/Receive groups, select
the All Accounts group.

Click Edit.
Under Folder Options, select Download headers only.


2. Set up up your POP3 account to retrieve messages, but not delete
them from the server.
How?

On the Tools menu, click E-mail accounts.
Select View or change existing e-mail accounts, and then click Next.
Under Name, select the POP3 account you want to change, and then click
Change.
Click More Settings.
Click the Advanced tab, and then under Delivery, select the Leave a
copy of messages on the server check box.
You can also select whether to automatically remove messages from your
e-mail server after a specified number of days, when you delete the
item on your computer, or when the Deleted Items folder is emptied.
These settings may help prevent you from exceeding the mailbox size
limit amount your ISP has set.
 
J

Jan KuÄera

Hi Peter, thanks for your detailed info.

What I need is to know what makes Outlook think the server supports these
features or does not.

Eg. it reports 0x80042107 Your e-mail server does not support downloading
headers.
How can this happen?

And what does Outlook differently if "leave the message on server" is
checked?

Jan
 
V

VanguardLH

Jan said:
what does the POP3 server need to do in order for Outlook to download the
headers and work with "leave copy of messages at server" checked?

The server doesn't need anything. It complies with the commands that
YOUR e-mail client sends to it. The default behavior for POP is to send
a RETR (retrieve) command and then follow with a DELE (delete) command.
The server is simply doing what it was told.

If you configure your e-mail client to "leave messages on server" then
your e-mail *client* does the RETR but omits the following DELE command.
I thought that TOP command should do for the headers, and simply Outlook not
issuing DELE should leave the messages on server. However, Outlook still
says the server does not support header downloading and does not work at all
if I leave the checkbox checked.

TOP only retrieves the headers. "TOP n" retrieves the headers and the
first n lines of the body. For normal mail polls, Outlook issues only
the RETR and DELE commands. If you configure Outlook to "download
headers only" then perhaps it does use the TOP command.

If the mail server receives a TOP command but rejects it then you cannot
use TOP commands with that mail server. Outlook establishes a mail
session with the mail server, does LIST and UID commands to see what
items are on the mail server (the mail client keeps track of what is new
or old based on the message IDs it has recorded for prior items). If
the client sends a TOP command and gets an error then it could be the
mail server won't support that command. It should but maybe it doesn't.

The format for the command is "TOP msgnum nlines". nlines is how many
lines of the body to include with the headers (0 means don't fetch any
body lines). msgnum refers to the relative index number of the item for
which you want to retrieve the headers (and body lines). This message
must not have been deleted (it is possible the server has deleted a
message without updating the message list to reindex their relative
IDs). If the status returned by the server is -ERR then a message with
that ID does not exist (it has been deleted). The ID is received from
the LIST command, so if the mail server is reporting an invalid list of
indexes then the client is going to request messages that don't exist
anymore.

Whether the mail server won't handle TOP commands or is returning a
bogus index list then used by the client in a TOP command is still a
problem up on the mail server. The client can only go by the info given
to it by the server. Also, some e-mail services may claim they provide
POP access but are not truly POP3 compliant. For example (I haven't
retest this for awhile), Gmail will treat identically the TOP and RETR
commands, and it will ignore the DELE command from the client because
the user decides that behavior with a server-side configuration setting.
Gmail doesn't use POP. It uses gPOP: Gmail's version of POP. It works
well enough for "normal" access by e-mail clients, but then e-mail
clients don't normally issue just the TOP command to retrieve messages
(either the headers only or headers with n lines of the body).

For a POP3-compliant e-mail client, it should send the RETR command
followed by the DELE command unless you enable its "leave message on
server" option which omits the DELE command. If it is configured to
retrieve headers only using the TOP command, it will use the same
message numbers returned by the LIST command. If the mail server is
returning message numbers for items already deleted, well, the client
won't know that until it attempts to issue the TOP command then gets
back an "-ERR no such message" error status. The client can't help
getting an error if the mail server lied to it.

If not trying to go outside the norm box with a Gmail account, you might
want to contact your e-mail provider and have them reset your mailbox.
It's possible something got out of sync. A reset probably means you
lose everything currently in your mailbox so ask about that before doing
a reset if you saved some messages in your mailbox (up on the server)
before having it reset.
 
V

VanguardLH

Jan said:
What I need is to know what makes Outlook think the server supports these
features or does not.

Eg. it reports 0x80042107 Your e-mail server does not support downloading
headers.
How can this happen?

And what does Outlook differently if "leave the message on server" is
checked?

See my other reply.

It means upon issuing "TOP msgnum n" where msgnum is a message number
returned by the mail *server* from a LIST command sent to it and n is
the number of lines in the body to include (from zero on up) that an
error status was returned by mail server. The client sent a TOP command
and the server rejected that command (as unknown or unsupported).

You could enable the troubleshooting log in Outlook to see the
handshaking commands (USER and PASS) used to establish a mail session,
see the output of the LIST and UIDL commands, and then look at the
msgnum used in the TOP command sent by Outlook. It should be one of the
message numbers returned by the server in response to the LIST command.
The LIST and UIDL commands should not return IDs for deleted items since
obviously anything deleted on the server can no longer be retrieved.
While the RETR command can use unique IDs assigned to each item in the
mailbox (the values returned by the UIDL command), the LIST command
returns an index value for each item, and the TOP command only uses this
same indexed value. It is possible the indexing is screwed up (and why
RETR using UIDs will work when TOP using indexed IDs doesn't). The
"scan listing" returned by LIST may be out of sync with what items
actually still exist in the maildrop, or be returning IDs for items that
have been deleted within the same mail session.

The client can't do anything about a mail server that doesn't want to
support the TOP command (despite that most e-mail monitors use the TOP
command since they just want to report on the headers, not retrieve the
bodies of those items). The client can't do anything about a mail
server that returns IDs for deleted items which will result in errors
when the client attempts to access that non-existent item.

You never mentioned WHO is your e-mail provider. Gmail has lots of
problems. If not Gmail, have your e-mail provider reset your mailbox
(you may lose e-mails that were currently stored in your mailbox so ask
before a reset).
 
S

Steve

Evan,

Sorry, I was assuming that the server in question was in compliance with the
POP3 standard (http://www.faqs.org/rfcs/rfc1939.html). The universities in
question were obviously assuming the same thing. Judging from the responses
further down the thread, there are apparently some server mail applications
that don't do this. In that case, the poster should identify the server
application being used and check their web site for support details.

I'm surprised that the Microsoft Outlook client does not follow the
standard, or at least make a better attempt to detect compliance before
offering this option.
 
S

Steve

Evan,

We've probably given this more coverage than it deserves, but...

From section 1:

"POP3 is not intended to provide extensive manipulation operations of mail
on the server; normally, mail is downloaded and then deleted. A more
advanced (and complex) protocol, IMAP4, is discussed in [RFC1730]."

Most implementations of POP honor this and defer that function to IMAP.
Section 8 explains the reasoning for not storing messages long-term in a
little more depth.

I'm not saying that you are not correct about the DELE command and Outlook;
clearly that works and is the normal mechanism shown in the examples. But if
you read the rest of Section 8, you'll see that they refer to a server-based
policy for deleting mail that would override any client communications. And
this leads to my real point: Some POP3 servers do not support mail
retention, whether the client issues the DELE command or not. This is why
the original poster needs to specify which server they are using.

I hope that this makes my point a little clearer.

Read more: http://www.faqs.org/rfcs/rfc1939.html#ixzz0oD4MUgHr
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top