Mar 11

E-mail error: “Could not read message file”

Category: Linux,Ubuntu   — Published by tengo on March 11, 2009 at 4:24 am

Today I had a strange error while trying to download my emails from my POP3 account. I am using Thunderbird and after downloading a few messages it stopped and spit out an error:

"The RETR command did not succeed. Error retrieving a message. Mail server responded [SYS/PERM] could not read message file."

on a German speaking system this would be:

"Das RETR- Kommando ist fehlgeschlagen. Der Mailbox- Server antwortete: Could not read message file."

So for the POP3 server my inbox or at least one message appears to be currupt or can't be delivered. A bit of research cured my fears that my whole inbox is doomed. A bit more research brought me to this solution by Antonio:

Depending on if you are using Mozilla/Thunderbird or Outlook for your mails, the error will actually tell you the numeric id of the currupt message. Thunderbird does not tell you the id, but as it was in my scenario, if you have it setup to download and delete messages on the server, it will actually download all okay messages until it reaches the currupt one. After that, the currupt message is message no. 1.

Now, to get rid of this message, open a console window and:

  1. Type telnet 110

    (replace with your server-name) and press ENTER,

  2. The POP3 server will answer with +OK POP3 Ready 0001a3f3
  3. Type
    user yourusername

    and press ENTER

  4. The POP3 server will answer with +OK yourusername mailbox exists (or similar)
  5. Type
    pass XXXXXXX

    and press ENTER

  6. The POP3 server will answer with +OK Mailbox locked and ready.
  7. Type

    and press ENTER.

  8. The server will spit out a list of all your mails in your inbox, in the form: numeric id length:
  9. +OK scan listing follows
    1 2953
  10. Now delete the currupted message, which should be the first one (see above).
  11. Type
    dele 1

    and press ENTER.

  12. The POP3 server will answer with +OK message deleted
  13. Type

    and press ENTER (this closes the telnet connection)

Go into your mail app, Thunderbird or Outlook and try again to download your emails. In my case it worked like a charm after Andrews process above.

I think we will never find out why this one message got stuck...