This is a wonderful tool and has saved many gigabytes of storage from Gmail, so thans for that. In terms of consistency, I've caught a few emails that didn't originally have traditional attachments (in Gmail if you drag an image into the body it displays them and they don't show up at the end of the message as files). It has processed many emails that had images like this in them and the re-inserted email contained the 1KB deleted yml notice for this kind of attachment.
However, some emails are processed in a way that:
- image remains in email body
- 1KB yml still gets added with a hint that they were removed, but they were not
- the images were actually downloaded, but remain in the email too
- this leaves some space savings on the table
I call like this
java -jar GmailAttachmentsExtractor.jar --no-validate --fail-late --unsafe --filename "^(?!.*\.yml$)(?!(?i)deleted).*" -l cleanup "has:attachment -in:drafts"
But will run a few more tests specifically filtering for an email that has this problem.
BTW this "drag image into the body of an email" is the bane of existence of long-running threads where each human reply re-inserts such images again and again, multiplying space consumed. The use of this tool reveals this beautifully as an image could get downloaded many times over (not a fault of the tool).
This is a wonderful tool and has saved many gigabytes of storage from Gmail, so thans for that. In terms of consistency, I've caught a few emails that didn't originally have traditional attachments (in Gmail if you drag an image into the body it displays them and they don't show up at the end of the message as files). It has processed many emails that had images like this in them and the re-inserted email contained the 1KB deleted yml notice for this kind of attachment.
However, some emails are processed in a way that:
I call like this
java -jar GmailAttachmentsExtractor.jar --no-validate --fail-late --unsafe --filename "^(?!.*\.yml$)(?!(?i)deleted).*" -l cleanup "has:attachment -in:drafts"But will run a few more tests specifically filtering for an email that has this problem.
BTW this "drag image into the body of an email" is the bane of existence of long-running threads where each human reply re-inserts such images again and again, multiplying space consumed. The use of this tool reveals this beautifully as an image could get downloaded many times over (not a fault of the tool).