I was in a similar problem some time back. I had thousands of emails on an IMAP server, and I needed to extract only the attachments, not download the entire email. Initially, I thought I could do it using Outlook or Thunderbird, but as the files grew, things became very slow and complicated. I then heard about
Softaken IMAP Attachment Extractor from a friend. Initially, I thought I'd give it a try, but to be honest, this tool turned out to be better than expected.
You just have to fill in your email address and the details of the IMAP server. After that, it links to your email account and lets you select which folder to use to get the attachments. The good thing is that you only download the attachments, not the email body, which means the work is done quickly and space is also saved.
Another amazing thing is that you can apply a file type filter. Suppose you only want PDF or image files; that can also be done. And yes, this tool does not depend on Outlook or any other email client. It works completely standalone. I tried the free version first, and when I was sure I wanted it, I bought the full version. There was no data loss and all the attachments were saved in a clean folder.
If you also want to extract attachments from IMAP mails without any hassle, then I recommend you try Softaken IMAP Attachment Extractor. It saves a lot of time and effort.