Re: Understanding message deletion model

2022-11-11 Thread Kevin J. McCarthy

On Fri, Nov 11, 2022 at 03:38:25PM -0500, Jason Franklin wrote:
For example, let's say I mark a message to be deleted, and I have mutt 
set to say "yes" to the purge prompt at the end of my session, but my 
computer dies before I can properly close out my mutt process. Will I 
then lose those messages as I have done here?


I think also relevant is your reply to Hsieh Chin Fan:

I meant that I checked my IMAP folder called "Trash", not the folder 
designated by $trash. That setting is empty in my new configuration, so 
mutt doesn't know anything about a trash folder.


If you don't set $trash, then answering "yes" at the purge prompt will 
permanently delete those messages.


Because your IMAP server auto-expunges, answering "no" at the purge 
prompt will also result in those message being permanently deleted, 
whether you have $trash set or not (because Mutt assumes the messages 
won't be expunged and so doesn't copy them to $trash).


I would suggest putting 'set trash = "=Trash" ; set delete = yes' in 
your .muttrc to avoid messages going missing.  That way Mutt will copy 
deleted messages to your trash folder before syncing.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Understanding message deletion model

2022-11-11 Thread Cameron Simpson

On 11Nov2022 15:38, Jason Franklin  wrote:

On Thu, Nov 10, 2022 at 07:18:26PM -0800, Kevin J. McCarthy wrote:

On Thu, Nov 10, 2022 at 08:47:44PM -0500, Jason Franklin wrote:
> Are "purging" and "deleting" not the same thing?

According to the IMAP protocol, they are not.  Deleting is marking the
message with the "deleted" flag, which normally doesn't automatically remove
it from the mailbox.  Purging (expunging) will remove messages marked as
"deleted" from the mailbox.


Very good to know.

It looks like I'm marking deleted with 'd', exiting without purging via
mutt, then my provider knows to purge the message anyway.


I'm using local email, not IMAP, but I map my "d" key to:



and I've got:

save-hook . archive-folder-name-here

so that the default save location (implicitly used in the macro) is the 
archive folder for my current folder.



It seems like an odd distinction to separate "purging" from "moving to
trash folder."


Persoanlly, I do not have a trash folder; I just "archive" messages. A 
bit like the GMail model is (or was? dunno any more).


Cheers,
Cameron Simpson 


Re: Understanding message deletion model

2022-11-11 Thread Jason Franklin
On Thu, Nov 10, 2022 at 07:18:26PM -0800, Kevin J. McCarthy wrote:
> On Thu, Nov 10, 2022 at 08:47:44PM -0500, Jason Franklin wrote:
> > Now, if I re-open mutt, the message is gone... completely. I'm confused
> > as to why the message was removed even though I typed 'n' at the prompt
> > for whether or not to proceed with the purge.
> > 
> > Are "purging" and "deleting" not the same thing?
> 
> According to the IMAP protocol, they are not.  Deleting is marking the
> message with the "deleted" flag, which normally doesn't automatically remove
> it from the mailbox.  Purging (expunging) will remove messages marked as
> "deleted" from the mailbox.

Very good to know.

It looks like I'm marking deleted with 'd', exiting without purging via
mutt, then my provider knows to purge the message anyway.

It seems like an odd distinction to separate "purging" from "moving to
trash folder."

For example, let's say I mark a message to be deleted, and I have mutt
set to say "yes" to the purge prompt at the end of my session, but my
computer dies before I can properly close out my mutt process. Will
I then lose those messages as I have done here?

Thanks!

-- 
Jason


Re: Understanding message deletion model

2022-11-11 Thread Jason Franklin
On Fri, Nov 11, 2022 at 11:17:06AM +0800, 謝晉凡 Hsieh Chin Fan via Mutt-users 
wrote:
> > I already checked my trash folder, and it's not there.
> 
> Based on http://www.mutt.org/doc/manual/#trash:
> 
>If set, this variable specifies the path of the trash folder where
>the mails marked for deletion will be moved, instead of being
>irremediably purged. 
> 
> Did you realy set $trash ? Use the following command to take a look:
> 
> :set ?trash

Oh, sorry. I think I wasn't being clear.

I meant that I checked my IMAP folder called "Trash", not the folder
designated by $trash. That setting is empty in my new configuration, so
mutt doesn't know anything about a trash folder.

-- 
Jason


Re: Understanding message deletion model

2022-11-10 Thread Kevin J. McCarthy

On Thu, Nov 10, 2022 at 08:47:44PM -0500, Jason Franklin wrote:
Now, if I re-open mutt, the message is gone... completely. I'm confused 
as to why the message was removed even though I typed 'n' at the prompt 
for whether or not to proceed with the purge.


Are "purging" and "deleting" not the same thing?


According to the IMAP protocol, they are not.  Deleting is marking the 
message with the "deleted" flag, which normally doesn't automatically 
remove it from the mailbox.  Purging (expunging) will remove messages 
marked as "deleted" from the mailbox.


When you answer 'n' at the prompt, Mutt takes care not to issue a 
command that would expunge those messages.  However, some IMAP server 
implementations will automatically remove messages marked with a deleted 
flag anyway.


Gmail, for instance, has a setting, "auto-expunge", to allow the user to 
control this.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Understanding message deletion model

2022-11-10 Thread 謝晉凡 Hsieh Chin Fan via Mutt-users
> Are "purging" and "deleting" not the same thing?

True, based on http://www.mutt.org/doc/manual/#index-map: 

 delete the current entry, bypassing the trash folder


> I already checked my trash folder, and it's not there.

Based on http://www.mutt.org/doc/manual/#trash:

   If set, this variable specifies the path of the trash folder where
   the mails marked for deletion will be moved, instead of being
   irremediably purged. 

Did you realy set $trash ? Use the following command to take a look:

:set ?trash

-- 
謝晉凡 Hsieh Chin Fan | https://topo.tw/about


signature.asc
Description: PGP signature


Re: Understanding message deletion model

2022-11-10 Thread Jason Franklin
On Fri, Nov 11, 2022 at 10:27:59AM +0800, 謝晉凡 Hsieh Chin Fan via Mutt-users 
wrote:
> On Thu, Nov 10, 2022 at 08:47:44PM -0500, Jason Franklin wrote:
> > Now, if I re-open mutt, the message is gone... completely. I'm confused
> > as to why the message was removed even though I typed 'n' at the prompt
> > for whether or not to proceed with the purge.
> > 
> > Where did this message go? I already checked my trash folder, and it's
> > not there. Unfortunately, I've been re-writing my configs, so the trash
> > folder is not named yet.
> 
> Did you read the message? Maybe it is moved to $mbox.

It looks like my $mbox value has no effect since my configuration is
using the default (which sets $move to no).

I checked my home dir and found no ~/mbox file. :/

-- 
Jason Franklin


Re: Understanding message deletion model

2022-11-10 Thread 謝晉凡 Hsieh Chin Fan via Mutt-users
On Thu, Nov 10, 2022 at 08:47:44PM -0500, Jason Franklin wrote:
> Now, if I re-open mutt, the message is gone... completely. I'm confused
> as to why the message was removed even though I typed 'n' at the prompt
> for whether or not to proceed with the purge.
> 
> Where did this message go? I already checked my trash folder, and it's
> not there. Unfortunately, I've been re-writing my configs, so the trash
> folder is not named yet.

Did you read the message? Maybe it is moved to $mbox.

-- 
謝晉凡 Hsieh Chin Fan | https://topo.tw/about


signature.asc
Description: PGP signature