I'm trying to empty my trash folder from terminal, but i'm not able to expunge
any of the items present there.
Here are the steps that i've been following
> openssl s_client -connect imap.gmail.com:993 -crlf
> a001 login USER_NAME PASSWORD
> a002 select [GMAIL]/Trash
at which i get server response as
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing \*)] Flags permitted.
* OK [UIDVALIDITY xxxxxxxxx] UIDs valid.
* y EXISTS
* a RECENT
* OK [UIDNEXT zzz] Predicted next UID.
* OK [HIGHESTMODSEQ bbbbbbb]
a002 OK [READ-WRITE] [Gmail]/Trash selected. (Success)
After this i've tried to delete one file (even though my goal is to delete all) using following commands
> a003 UID STORE zzz +FLAGS (\Delete)
a003 OK Success
> a004 UID EXPUNGE zzz
a004 OK Success
but no mail has been deleted from the trash folder. I've also tried by turning auto-expunge off
and choosing Immediately delete the message forever
under When a message is marked as deleted and expunged from the last visible IMAP folder:
option.
I'm not able to find any documentation regarding the commands so any help will be greatly appreciated.