I have followed the advice in Thunderbird - Do not delete local copies of IMAP messages and created a "backup" folder in my Local Folders, together with a message filter that copies all messages to the "backup" folder. This works fine for incoming mail: I asked a friend to send me an email, and it was automatically copied to the backup folder and I could view the attachments even when I disconnected from the internet.
However, it doesn't seem to work for sent messages. By this I mean that I send the message from gmail.com (not from Thunderbird). The message is immediately synced to the "Sent Mail" and "All Mail" folders in Thunderbird, but fails to appear in the "backup" folder. It is possible to manually invoke the filter on the "Sent Mail" folder, however this makes an extra copy of every single message in the folder (including messages that are already in the "backup" folder). I want to know if there's a way to have Thunderbird automatically copy only new sent messages to the local folder, without me having to take any action.