To backup all mail (incoming and outgoing), BCC all mails, you could do the following..
Add to your "/etc/postfix/main.cf" the following: ---8<------------------------------------------------------------------------------------- # Auto-Backup all mails transport_maps = hash:/etc/postfix/transport backuplmtp_destination_recipient_limit = 1 lmtp_destination_recipient_limit = 1 recipient_bcc_maps = pcre:/etc/postfix/backup_bcc.pcre sender_bcc_maps = pcre:/etc/postfix/backup_bcc.pcre ---8<-------------------------------------------------------------------------------------
Create a domain called "backup.local" in postfixadmin or whatever you use to edit your accounts..
Add every domain for which you like to activate incoming backup to " /etc/postfix/backup_bcc.pcre": ---8<------------------------------------------------------------------------------------- /^(.*)@spamreducer\.eu$/ spamreducer.eu@backup.local ---8<-------------------------------------------------------------------------------------
Add to your "/etc/postfix/master.cf" the following: ---8<------------------------------------------------------------------------------------- backuplmtp unix - - n - - lmtp ---8<-------------------------------------------------------------------------------------
Add to your "/etc/postfix/transport" the following: ---8<------------------------------------------------------------------------------------- [backup.local] backuplmtp ---8<-------------------------------------------------------------------------------------
Don't forget to issue " postmap /etc/postfix/transport"..
For making folders based on "year/month" you have to use an appropriate sieve script.
Give me a feedback! Bye!
Mit freundlichen Grüßen / Distinti saluti / Kind regards De Zordo Patrick patrick@spamreducer.eu
-----Ursprüngliche Nachricht----- Von: dovecot [mailto:dovecot-bounces@dovecot.org] Im Auftrag von LuKreme Gesendet: Samstag, 30. August 2014 18:26 An: dovecot@dovecot.org Betreff: Creating a backup of incoming mail
This is my master.cf line for dovecot virtual users:
dovecot unix - n n - - pipe flags=DRhu user=vpopmail:vchkpw argv=/usr/local/libexec/dovecot/dovecot-lda -f ${sender} -d ${user}@${nexthop} -m ${extension}
I would like to also write every mail, before delivery to the user, to a backup location like /backup/imap/mm/dd
Possible?
-- 'On whose authority?' demanded Wert. Trymon turned his grey eyes on him. 'Mine. I need no other.' --The Light Fantastic