AW: Creating a backup of incoming mail

Patrick De Zordo patrick at spamreducer.eu
Mon Sep 1 07:33:52 UTC 2014


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 at 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 at spamreducer.eu

> -----Ursprüngliche Nachricht-----
> Von: dovecot [mailto:dovecot-bounces at dovecot.org] Im Auftrag von
> LuKreme
> Gesendet: Samstag, 30. August 2014 18:26
> An: dovecot at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6229 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20140901/0c5825f7/attachment.p7s>


More information about the dovecot mailing list