Discussion:
How gracefully does Pine fail at saving messages?
(too old to reply)
Nicholas Saunders
2023-12-02 05:23:45 UTC
Permalink
I'm saving large numbers of messages from IMAP (Gmail) to local storage and am looking at:

FEATURE: Save Will Not Delete

This feature controls one aspect of the Save command. If set, Save will not mark the message "deleted" (its default behavior) after it has been copied to the designated folder.

<End of help on this topic>



Now, if there's a networking or other problem, what happens on a bulk operation? Is the message deleted only once successfully saved? Is that done individually for each message?


thanks,

Nick
Adam H. Kerman
2023-12-02 17:27:42 UTC
Permalink
Post by Nicholas Saunders
FEATURE: Save Will Not Delete
This feature controls one aspect of the Save command. If set, Save will
not mark the message "deleted" (its default behavior) after it has been
copied to the designated folder.
<End of help on this topic>
Now, if there's a networking or other problem, what happens on a bulk
operation? Is the message deleted only once successfully saved? Is
that done individually for each message?
In a typical setup, the message isn't deleted but marked for deletion.
Upon closing the folder, the expunge command is executed (or the user is
asked to confirm expunge), which deletes messages marked for deletion.

As you are taking Eduardo's advice, moving several hundred messages at a
time, I would set Save Will Not Delete, then after SUCCESSFULLY copying
the first group of messages into the desired mbox archive folder, mark
the messages to be deleted in the remote folder with the bulk selection
command first "; N [range]", then apply the deletion mark with the apply
command "a d" then MANUALLY expunge messages marked for deletion with
"x".

These are additional steps to take but if your connection goes kerflooey
during your attempt to copy messages in bulk, this may keep you out of
some trouble.
Eduardo Chappa
2023-12-03 02:59:04 UTC
Permalink
Post by Adam H. Kerman
In a typical setup, the message isn't deleted but marked for deletion.
Upon closing the folder, the expunge command is executed (or the user is
asked to confirm expunge), which deletes messages marked for deletion.
There are a few extra complications to this. Some servers remove the
message upong marking it deleted. However, Alpine marks the message
deleted after it has saved it.
Post by Adam H. Kerman
As you are taking Eduardo's advice, moving several hundred messages at a
time, I would set Save Will Not Delete, then after SUCCESSFULLY copying
the first group of messages into the desired mbox archive folder, mark
the messages to be deleted in the remote folder with the bulk selection
command first "; N [range]", then apply the deletion mark with the apply
command "a d" then MANUALLY expunge messages marked for deletion with
"x".
These are additional steps to take but if your connection goes kerflooey
during your attempt to copy messages in bulk, this may keep you out of
some trouble.
Generally speaking I agree, but I have to go back to what I said earlier.
Saving messages is an atomic operation, which means that it either saves
all messages or saves no messages (for example if the internet goes down
while the save is in progress), there is no middle ground here, so if
Alpine tells you that all 500 messages were saved, then that is correct
and you can delete them (which can be done automatically) and expunge them
(if the server has not expunged on your behalf upon marking them deleted).

I hope this clarifies this issue.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Nicholas Saunders
2023-12-05 04:20:39 UTC
Permalink
Post by Eduardo Chappa
Post by Adam H. Kerman
In a typical setup, the message isn't deleted but marked for deletion.
Upon closing the folder, the expunge command is executed (or the user is
asked to confirm expunge), which deletes messages marked for deletion.
There are a few extra complications to this. Some servers remove the
message upong marking it deleted. However, Alpine marks the message
deleted after it has saved it.
Post by Adam H. Kerman
As you are taking Eduardo's advice, moving several hundred messages at a
time, I would set Save Will Not Delete, then after SUCCESSFULLY copying
the first group of messages into the desired mbox archive folder, mark
the messages to be deleted in the remote folder with the bulk selection
command first "; N [range]", then apply the deletion mark with the apply
command "a d" then MANUALLY expunge messages marked for deletion with
"x".
These are additional steps to take but if your connection goes kerflooey
during your attempt to copy messages in bulk, this may keep you out of
some trouble.
Generally speaking I agree, but I have to go back to what I said earlier.
Saving messages is an atomic operation, which means that it either saves
all messages or saves no messages (for example if the internet goes down
while the save is in progress), there is no middle ground here, so if
Alpine tells you that all 500 messages were saved, then that is correct
and you can delete them (which can be done automatically) and expunge them
(if the server has not expunged on your behalf upon marking them deleted).
I hope this clarifies this issue.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Absolutely, and appreciate the specificity.

My understanding, then, would be that if it were to fail and then lose connectivity the whole save operation would be rolled back or simply not have completed. This is sounds very safe to my ears.


Thanks,

Nick

Loading...