as i found out in another thread meanwhile, there is no way to automatically archive his mails with roundcube or sieve. After I thought about this for a while it makes more and more sense to leave this task to the server.
What do you think?
Is there any software that does an automatic archiving, for example directly through IMAP? That would be a simple solution that would be a nice addition to Mail in a box, wouldn’t it?
This would be very easy to set up with a script running on the MiaB server.
I currently have a script that deletes old messages from my trash folder once they are 30 days old. It does this by looking at the “Last Modified” date of the file itself. That date is updated whenever a file is moved, so the messages are deleted 30 days after they are placed in the trash. This nicely accounts for very old messages that I put in the trash; they won’t be deleted for 30 more days even though they were received much more than that ago.
That will search the Inbox for messages last modified more than 30 days ago and move them to the Archive folder. It uses a non-overwriting ‘mv’ command as a safety measure. Worst case, it will repeatedly fail to move a message.
And my standard disclaimer that you shouldn’t try this unless you understand what the commands are doing and you have backups ready to fix any mistakes. I haven’t tested this example personally, but the trash purging has been working for me.