<<< Date Index >>>     <<< Thread Index >>>

Re: FETCH on save



* On 2006.02.04, in <20060205055134.GA3331@xxxxxxxxxxxxx>,
*       "Kyle Wheeler" <kyle-mutt-dev@xxxxxxxxxxxxxx> wrote:
> I?ve noticed that whenever I go to save a message from one folder into 
> another (via IMAP), mutt issues a
> 
>    a0016 UID FETCH 785 BODY[]
> 
> Why does it do that?
> 
> I have a hook like so:
> 
>    save-hook "~h 'X-Spam-Status: Yes'" =Spam

Without looking at the code, I'd guess that ~h triggers a FETCH even
after a FETCH has already been done just because the general design of
~h calls for a body read, and that's how body read is implemented in
the IMAP code.  So there's no specific exception for IMAP, and no code
in IMAP's body read to have cached the body.  Again, just a guess.

I imagine you can work around it in this case by not using ~h, but using
~H instead.  See the "Spam detection" section of the manual, regarding
the use of "spam" and "nospam" commands in muttrc.  But I haven't tried
this under IMAP in a long time, so I can't say for certain that it's
consistent.

-- 
 -D.    dgc@xxxxxxxxxxxx        NSIT    University of Chicago