james_davis_nicoll: (Default)
james_davis_nicoll ([personal profile] james_davis_nicoll) wrote2025-05-29 10:52 am

I deleted all my emails by accident

All I need to do to restore them is to "cd into ~/.maildir" to pick a snapshot. In this context, what does that mean? Online search is not helpful.

OK, further explanation followed:

"You may well have deleted the *contents* of your inbox, but the inbox
itself is still there, as is that link in your home directory. So
(from your home directory):

cd .maildir
snapshot

look at the timestamps and pick the most recent one pre-deletion.

Inbox messages will be in the directory 'cur' once you are in a
snapshot. You can copy the files into ~/.maildir/cur (or
/users/jdnicoll/.maildir/cur"

Ok, so the literal command is
cd .maildir
snapshot

NOT
cd .maildir
and then
snapshot

This gets me a list of snapshots.

if I pick one, I get

Changing directory to /net/mail/spool/panix/7/.zfs/snapshot/2025-05-28-2000.hourly/3/jdnicoll@panix.com

What do I do next?

[personal profile] kithrup 2025-05-29 03:40 pm (UTC)(link)

Yes. If you want to run ls -CF first, and send me the output (say, in bsky dm) that'll confirm that it's doing wha I'd expect.

[personal profile] kithrup 2025-05-29 03:45 pm (UTC)(link)

Correct: at the shell prompt, tpe ls -CF and hit return.