I have a mailbox (gmail) with 15gb of mail (10gb attachments). Is it possible to:

  • Export mails into doc/rtf
  • Put every letter in a separate folder
  • Put the name of the sender in the filename (with date optionally)
  • Put attachment of the letter in the same folder

I tried the Mail app and it exports letters in rtf, but the filename is the subject of the letter, i can't put an attachment in the same folder, the attachment if the filename.

Thunderbird is also of no use.

Is it possible to do it (at least partially - put the attachment with the letter) maybe with another mail client? Outlook or something. Or in linux or windows?

Maybe it is possible to do through terminal? Some script with a terminal mail client. Or maybe with the automator?

  • Is doc/rtf/pdf a requirement? Or is your requirement to save Google storage? If save storage, you can move mail from gmail folders to 'On My Mac'.
    – Gilby
    Apr 20, 2021 at 22:56
  • @Gilby yes, i'd like to save letters as documents. Apr 21, 2021 at 8:17
  • You can do what you want with AppleScript, but I don't have a recipe for you. If nobody replies here, search the web (there are lots of Applescripts for Mail) but expect to have to make changes yourself and be aware that Mail's AppleScript has changed over the years. Sorry I am not more helpful.
    – Gilby
    Apr 21, 2021 at 9:36
  • @Gilby Okay, thanks for the suggestion. Apr 23, 2021 at 6:48


You must log in to answer this question.

Browse other questions tagged .