Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to force-delete a message from a POP3 server without sending 'quit'?

So, for example, right now I have:

>> dele 1
<< +OK Deleted.
>> quit
<< +OK Bye-bye.

I want something where I can flush the deleted messages before the quit,

>> dele 1
<< +OK Deleted.
>> flush
<< +OK You are awesome.
(many more ops)
>> quit
<< +OK Bye-bye.

The reason is I have a script that reads and processes email and if a fatal happens on, say, message #10, then the script halts and the 'quit' command is never sent. Then the next time the scripts is run, messages 1-9 are re-processed because they weren't removed.

(We have lots of error handling to make sure fatal errors don't happen, and we have protection against dupe messages further up the stack. But it'd still be better to make sure messages are deleted when they should be.)

share|improve this question

afaik this is not possible with a rfc-compliant pop3-server. according to RFC 1939 , the server can only start updating the mailbox (deleting messages) when the client sends the quit command.

maybe you could modify your script to work in smaller batches and reconnect after each batch. Or use IMAP instead.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.