eek wrote:I know how to move an email with a script, but don't know how to identify the last email deleted.
Scripts only work against selected messages.
What you are looking for is impossible.
Well...not absolutely impossible.
Last deleted message would get appended at the end of Trash.mbx file, as last record.
Just brainstorming here:
It shall be possible to use some scripting language, perhaps Python, or anything else depending on what you know and which of them has good library for parsing mbx files.
Pocoscript would simply call the Python script, Python script would read last message appended to Trash.mbx and append it to In.mbx.
Except I have no idea how well it would work with Poco, as In.mbx would be updated (unless there would be some error, eg. file locked and impossible to write to) but the index file In.idb wouldn't.
I guess that might be fixed by having the Pocoscript wait for certain time and then compress the In folder, but can't vouch for it.