The way I do it is simply with a cron job. I use maildir format for my emails (see home_mailbox setting in main.cf), so my emails are in ~/Maildir.
A cron job like
Code:
25 * * * * /usr/bin/rsync -avt --delete ~/Maildir ~/mail.backup > /dev/null 2>&1
should work. Note that the --delete means that when the user deletes an email, it will get deleted from the backup next time the cron job is run. You may not want this, and you can omit --delete. If you use an mbox format, all your emails are in one file, so deletions will be deleted.
If you want to get more sophisticated, you can use procmail or maildrop to take delivery from postfix. I use maildrop, and a line like
Code:
cc "/home/username/Maildir/.Mail_Backup/"
will cc all mail to the sub folder Mail_Backup.
You may be able to use one of the postfix bcc parameters, but I've never used them.
Depends a bit why you are taking backups