Discussion:
batch export and delete over IMAP
(too old to reply)
Nicholas Saunders
2023-11-29 07:31:43 UTC
Permalink
I'm working with gmail and want the batch export to fail nicely, but also to delete e-mails which are exported successfully.

Can this be automated somehow? So that as an e-mail is exported it's immediately deleted, for example.


Thanks,

Nick
Eduardo Chappa
2023-11-30 04:16:50 UTC
Permalink
Post by Nicholas Saunders
I'm working with gmail and want the batch export to fail nicely, but
also to delete e-mails which are exported successfully.
Alpine has a setting

[ ] Save Will Not Delete

which if you have disabled as above, then saving messages will marke them
deleted in the imap folder. Please note that the word "export" does not
mean "save" in the alpine speak. Exporting a message means to save it as
you see it in your screen, and that does not include attachments. Saving a
message means to copy it to another folder, and this what you want to do,
so you have full access to it.

In regards to automation, you want to use the "; select" command. My
advice is that you use it as follows:

; N 1-500 <return>

this will select the first 500 messages. After this tell Alpine to

a s <input name of folder to save these messages to> <return>

and wait for this to complete. This is an atomic operation. What this
means is that either all 500 messages will be copied to the destination
folder or none of them will be copied. So after the case where 200
messages are copied and 300 are not will not happen. After that you can
press "X" to expunge the deleted messages and transfer messages 1 to 500
again.

I hope this helps.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Nicholas Saunders
2023-11-30 06:15:44 UTC
Permalink
Post by Eduardo Chappa
Post by Nicholas Saunders
I'm working with gmail and want the batch export to fail nicely, but
also to delete e-mails which are exported successfully.
Alpine has a setting
[ ] Save Will Not Delete
which if you have disabled as above, then saving messages will marke them
deleted in the imap folder. Please note that the word "export" does not
mean "save" in the alpine speak. Exporting a message means to save it as
you see it in your screen, and that does not include attachments. Saving a
message means to copy it to another folder, and this what you want to do,
so you have full access to it.
In regards to automation, you want to use the "; select" command. My
; N 1-500 <return>
this will select the first 500 messages. After this tell Alpine to
a s <input name of folder to save these messages to> <return>
and wait for this to complete. This is an atomic operation. What this
means is that either all 500 messages will be copied to the destination
folder or none of them will be copied. So after the case where 200
messages are copied and 300 are not will not happen. After that you can
press "X" to expunge the deleted messages and transfer messages 1 to 500
again.
I hope this helps.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Absolutely. I've been using export, so your suggestion to use save makes sense. I'll look into adding access to local folders.


Thanks,

Nick

Loading...