Thunderbird has a very nice feature, the archive button, that will send the selected emails into an archive folder.
So I created a service that does that, it will go through the selected emails, and it will archive them in "[Gmail]/All Mail" if the account server contains the string gmail, and Archive/<year> if not.
The workflow can be found
here.
TODO: is still error handling if the destination mailbox does not exist.
To Install unzip to the folder ~/Library/Services.