You can add a spam filter like SpamSieve to automatically delete your junk. Then, add your own rule to automatically copy everything and read it from a local mailbox. Either way, all of the messages are going to be downloaded locally.
thanks for your reply but I am not a Gmail user, I am using Strato. Therefore the handy Google Scripts won't help.
I need a script in Apple, that only copies or moves the mail from my inbox to a local mailbox once they are past the 25 days line. Within those 25 day I have deleted all unnessecary mails, marks or higlighted the important once and know only the remaining once are worth keeping. But I still want them to be available in Mail and none of those archiving solutions that create pdfs or import them into their one database will help.
thanks for your reply but this is not what I am looking for. Because I still have email that I will read a couple of days after I recieved them but decide to delete. All those deleted once are not worth backing up. That is why I am looking for a script that I can apply after a certain period of time. Unfortunately the Scripts by Andreas Amann are not working for me and that is why I turned here. I already called Apple Care once, although at taht point thinking it could be solved by rules, but they could not figure out who to help either.