Discussion:
Deleting Yahoo Mail Expunges immediately
(too old to reply)
Sriraaman Sridharan
2022-12-08 19:38:15 UTC
Permalink
Hi,

I am using Alpine 2.22 to check Yahoo Mail using IMAP. Everything works fine except delete. When I delete an Yahoo email from Alpine, it is deleted and expunged immediately. It is not marked for delete or moved to Trash. As far as I can tell, the message is gone forever.

How can I prevent this? I would like to either mark the message for delete and then expunge or move it to Trash. This does not happen with GMail, where I have set the IMAP Auto-Expunge off.

Here's the IMAP debug from Alpine, where it appears to EXPUNGE automatically after STORE +Flags (\Deleted):

IMAP DEBUG 11:23:21 12/8: 0000000b FETCH 4386 BODY[1]
IMAP DEBUG 11:23:22 12/8: * 4386 FETCH (FLAGS (\Seen $NotJunk) UID 303318 BODY[1] {14}
IMAP DEBUG 11:23:22 12/8: )
IMAP DEBUG 11:23:22 12/8: 0000000b OK FETCH completed
IMAP DEBUG 11:23:25 12/8: 0000000c STORE 4386 +Flags (\DELETED)
IMAP DEBUG 11:23:25 12/8: * 4386 FETCH (FLAGS (\Deleted \Seen $NotJunk) UID 303318)
IMAP DEBUG 11:23:25 12/8: * 4386 EXPUNGE
IMAP DEBUG 11:23:25 12/8: * 4385 EXISTS
IMAP DEBUG 11:23:26 12/8: 0000000c OK STORE completed
IMAP DEBUG 11:23:34 12/8: 0000000e LOGOUT
IMAP DEBUG 11:23:34 12/8: * BYE IMAP4rev1 Server logging out
IMAP DEBUG 11:23:34 12/8: 0000000e OK LOGOUT completed

Any help would be appreciated.

Thanks,
Sri.
Eduardo Chappa
2022-12-09 02:59:54 UTC
Permalink
Post by Sriraaman Sridharan
Here's the IMAP debug from Alpine, where it appears to EXPUNGE
The first character of the line is a "*" which means it is an untagged
reply from the server, that is, the server it telling you that the
messages 4386 and 4385 were expunged. You did not expunge them, the server
did. I imagine Yahoo has a setting to stop the expunge from happening.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Sriraaman Sridharan
2022-12-09 05:40:19 UTC
Permalink
Thank you Eduardo. That's what I thought. I've searched a lot, and I couldn't find a setting in Yahoo to turn off auto-expunge.

Question for you: Is there any way to turn off or remap the 'D' (delete) key in Alpine. I accidentally hit D this morning, and it deleted the message forever.

Thanks,
Sri.
Post by Eduardo Chappa
Post by Sriraaman Sridharan
Here's the IMAP debug from Alpine, where it appears to EXPUNGE
The first character of the line is a "*" which means it is an untagged
reply from the server, that is, the server it telling you that the
messages 4386 and 4385 were expunged. You did not expunge them, the server
did. I imagine Yahoo has a setting to stop the expunge from happening.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Eduardo Chappa
2022-12-09 14:39:04 UTC
Permalink
Post by Sriraaman Sridharan
Question for you: Is there any way to turn off or remap the 'D' (delete)
key in Alpine. I accidentally hit D this morning, and it deleted the
message forever.
There is no way to do this unless you patch Alpine. There is a patch that
allows you to remap keys in different screens. Since the "D" key is
available in two screens (index and message view) you would have to do it
twice. You can remap it to do anything. For example, to save the message
to a folder and then delete the message.

This is a link to the patch

https://alpineapp.email/alpine/info/rules.html

I hope this helps.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Sriraaman Sridharan
2022-12-10 01:08:02 UTC
Permalink
Hi Eduardo,

Perfect! Thank you. That'll work. I'll check out the patch.

Thanks,
Sri.
Post by Eduardo Chappa
Post by Sriraaman Sridharan
Question for you: Is there any way to turn off or remap the 'D' (delete)
key in Alpine. I accidentally hit D this morning, and it deleted the
message forever.
There is no way to do this unless you patch Alpine. There is a patch that
allows you to remap keys in different screens. Since the "D" key is
available in two screens (index and message view) you would have to do it
twice. You can remap it to do anything. For example, to save the message
to a folder and then delete the message.
This is a link to the patch
https://alpineapp.email/alpine/info/rules.html
I hope this helps.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Sriraaman Sridharan
2022-12-10 03:37:19 UTC
Permalink
I installed the Rules patch and rebuilt Alpine. I added a simple rule to map Delete key to Save like this:

key-definition-rules="_SCREEN_ == {index} && _FOLDER_ == {Yahoo} && _PKEY_ == {d} => _COMMAND_{s}"

and it works great! I added similar rule for {text} screen.

Thanks Eduardo!

Regards,
Sri.
Post by Sriraaman Sridharan
Hi Eduardo,
Perfect! Thank you. That'll work. I'll check out the patch.
Thanks,
Sri.
Post by Eduardo Chappa
Post by Sriraaman Sridharan
Question for you: Is there any way to turn off or remap the 'D' (delete)
key in Alpine. I accidentally hit D this morning, and it deleted the
message forever.
There is no way to do this unless you patch Alpine. There is a patch that
allows you to remap keys in different screens. Since the "D" key is
available in two screens (index and message view) you would have to do it
twice. You can remap it to do anything. For example, to save the message
to a folder and then delete the message.
This is a link to the patch
https://alpineapp.email/alpine/info/rules.html
I hope this helps.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Sriraaman Sridharan
2022-12-10 05:19:40 UTC
Permalink
How do I specify a folder collection in a save rule? The following rule defaults to <Mail>/YahooTrash

save-rules="_FOLDER_ == {Yahoo} => _SAVE_{YahooTrash}"

but I would like to save in Incoming-Folders/YahooTrash.

Thanks,
Sri.
Post by Sriraaman Sridharan
key-definition-rules="_SCREEN_ == {index} && _FOLDER_ == {Yahoo} && _PKEY_ == {d} => _COMMAND_{s}"
and it works great! I added similar rule for {text} screen.
Thanks Eduardo!
Regards,
Sri.
Post by Sriraaman Sridharan
Hi Eduardo,
Perfect! Thank you. That'll work. I'll check out the patch.
Thanks,
Sri.
Post by Eduardo Chappa
Post by Sriraaman Sridharan
Question for you: Is there any way to turn off or remap the 'D' (delete)
key in Alpine. I accidentally hit D this morning, and it deleted the
message forever.
There is no way to do this unless you patch Alpine. There is a patch that
allows you to remap keys in different screens. Since the "D" key is
available in two screens (index and message view) you would have to do it
twice. You can remap it to do anything. For example, to save the message
to a folder and then delete the message.
This is a link to the patch
https://alpineapp.email/alpine/info/rules.html
I hope this helps.
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Eduardo Chappa
2022-12-10 15:26:42 UTC
Permalink
Post by Sriraaman Sridharan
How do I specify a folder collection in a save rule? The following rule defaults to <Mail>/YahooTrash
save-rules="_FOLDER_ == {Yahoo} => _SAVE_{YahooTrash}"
but I would like to save in Incoming-Folders/YahooTrash.
That is a very good question. There is no such language to do that, but I
see now it is needed. Let me think little bit about how to do that. If
you want to suggest a solution, I'd love to read your ideas too.

Thank you!
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Sriraaman Sridharan
2022-12-10 18:06:20 UTC
Permalink
My suggestion would be something like <Incoming-Folders>/YahooTrash for the folder name:

save-rules=_FOLDER_ == {Yahoo} => _SAVE_{<Incoming-Folders>/YahooTrash}

But I tried a temporary workaround and it works! I modified the key-rule to insert a control-p, and it now offers the Incoming-Folders as default save:

key-definition-rules="_SCREEN_ == {index} && _FOLDER_ == {Yahoo} && _PKEY_ == {d} => _COMMAND_{s,"^P"}"

Thanks,
Sri.
Post by Eduardo Chappa
How do I specify a folder collection in a save rule? The following rule defaults to <Mail>/YahooTrash
save-rules="_FOLDER_ == {Yahoo} => _SAVE_{YahooTrash}"
but I would like to save in Incoming-Folders/YahooTrash.
That is a very good question. There is no such language to do that, but I
see now it is needed. Let me think little bit about how to do that. If
you want to suggest a solution, I'd love to read your ideas too.
Thank you!
--
Eduardo
https://alpineapp.email (web)
http://repo.or.cz/alpine.git (Git)
Loading...