Save email attachments with kmail automatically

Hi all,
is there a way in KMail to automatically save attachments from certain e-mails to disk?

I receive monthly PDF invoices via e-mail, which I would like to automatically store in a folder as soon as I receive the e-mail. I am also interested in possible alternative solutions.

Thank you for help!

I am not sure how KMail works but most email services or clients can creat rules that allow you to automatically place certain emails into specific folders in the email client. That might be enough. I used to do that with certain accounts and had every available from the email.

The other complicated way might be to use RSync or something similar to may move files from the storage folder within the client to another folder. This could be set up via a GUI. There are “chron” jobs within the terminal too that can do this I would think but I don’t mess around with the terminal at that level. Maybe someone else can tell you how to set up a chron job to move or copy files in certain folders (the email client folder) to another location periodically. The nice thing from what I recall about RSync is I think it only moves new files or files that have changed.

For me, I just kept the web based folders which was all I needed with no need to make it more complicated. And it was easily searchable too.

Best of luck!