Re: Re (2): gmail via IMAP ? HOW2 delete ?

On 2010-02-17, <> wrote:

How do I delete a header-entry ?

What do you mean by "header-entry"? Are you trying to delete
individual fields within a message header?

No you can't do that. The header is like the envelope. It
contains fields like: From:, Date:, Subject:, and allows you
to know/guess what to do with the mail, which is the header
plus the body.

I know what the header is. What I did't know was what the
original question was.

the help menu says: 'd' = delete the current entry.

That marks a message for deletion.

That sounds as if the deletion is *local* and not at the
remote server ?

Again: the message isn't "deleted" when you hit "d". It's
"marked for deletion". That is done locally.

The actual deletion will happen when the mailbox is closed or
expunged. That happens as I specified below. Then the commands
are set to the server to physically delete any messages that
have previously been marked for deletion.

When I key 'd' my screen immediately shows the 'D' tag, and
steps to the next header. But when/how do the actual deletions
happen at the server ?

When you either hit "$", change to a different folder, or exit

I want to delete the mails at the gmail server, so I'd need to
Tx to gmail "delete messageX" and get a confirming reply.

Sort of.

With IMAP you need to send a STORE FLAGS command to set the
\Deleted flag on the message. Then you need to send an EXPUNGE
or CLOSE command to physically delete any messages in the
current mailbox that have the \Deleted flag set.

So that happen when I exit mutt.

Yes. Or when you hit "$", or when you change to a different

What you describe, would happen for a local directory/folder.


Have you looked and verified that they're still there? You
seem to be using the word "header" to refer to a an entire
message. Is that inferrence accurate?

Under pop which I know, you only d/l the headers initially. I
don't know what IMAP does.

It doesn't matter what's downloaded. You can't delete the
headers. You can only delete the entire message.

I don't know how IMAP works. Can gmail use pop?


I guess I'd leave my gmail IMAP settings, and do "mutt <read
the new pop settings>" ?

Sorry, I don't know what "mutt <read the new pop settings>" means.

IIRC pop fetches & displays the header list. Then, from the
header list, you can delete the mail [at the server] or fetch
it -- individually.

And you can do that with mutt/IMAP also. After you've marked a
message you want to delete, hit the "$" key if for some reason
you can't wait until you close the mailbox.

If hitting two keys instead of one is too much work, then you
can bind a macro to a single key that does the delete and

I've not used POP with mutt, but mutt implements message
deletion the same for all of the mailbox types I've used (IMAP,
mbox, maildir). I would _guess_ that mutt/POP will work
exactly the same way.

Grant Edwards grante Yow! Zippy's brain cells
at are straining to bridge synapses ...

Relevant Pages

  • Re: Complaints of some outside entities not able to send me email.
    ... "554 Mailbox unavailable is not an Exchange error. ... So you need to get hold of the SMTP header of the message and from there try ... to deduct which server is causing this NDR. ...
  • Re (3): gmail via IMAP ? HOW2 delete ?
    ... The header is like the envelope. ... That marks a message for deletion. ... current mailbox that have the \Deleted flag set. ... means 'execute the pending commands'; ...
  • Re: Preventing deletion of header
    ... Header in which you put the newsletter nameplate. ... FWIW, any deletion can be ... Word MVP FAQ site: ...
  • Re: OT more info on
    ... The header on that site today reads, and I quote: ... I think you succeeded in getting rid of them! ...
  • Re: Compare/Blackline does not show removed header
    ... Removing the header is a change in the document. ... comparison as a deletion, since it was removed in the version it is being ... is giving you correct information. ...