Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A method to securely empty trashed Mail messages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A method to securely empty trashed Mail messages
Authored by: vancenase on Nov 10, '04 10:09:40AM

maybe someone could write an applescript that uses 'srm' (/usr/bin/srm) to remove the folder. then it could be accessible from the applescript menu and/or a shortcut.


more ?'s ... would there be any way to:

1. delete the actual 'trash' folder, then recreate ... so i can use delete rather than manually moving messages from 'Trash' to 'Trash It'?

2. configure 'delete' to move to 'Trash It' rather than 'Trash', if 1 is not possible?



[ Reply to This | # ]
A method to securely empty trashed Mail messages
Authored by: brant on Nov 10, '04 11:51:11AM
ok, not a banner day for me....upon creating the securely deleted mailbox via the mail program as described in the original post, it is easiest to create a shell script and have the script run by crontab as you like. you will need to delete the directory recursively (which i did not include above):
/usr/bin/srm -rmz ~/Library/Mail/Mailboxes/"Trash it.mbox"
and then recreate the directory, as well:
mkdir "Trash it.mbox"
obviously, you want to add this to your user crontab versus the system crontab so that the created directory will have user-level access. so, you get something like this:

#!/bin/bash
/usr/bin/srm -rmz ~/Library/Mail/Mailboxes/"Trash it.mbox"
mkdir ~/Library/Mail/Mailboxes/"Trash it.mbox"
make sure to save the file (name it secure_delete.sh or something) and

chmod 755 secure_delete.sh
and save it in a directory with user-level access (e.g. in your home folder or a subdirectory thereof) so the user crontab can access. then, make an entry to the user crontab to run the script. make sure that you give it some time to run, especially if you will be securely deleting numerous emails and attachments. sorry for the multiple posts!

[ Reply to This | # ]