[Dovecot] realtime backup with LDA?

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Mon Feb 24 08:58:32 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 23 Feb 2014, Francesco wrote:

> i was reading the dovecot-lda documentation as i'm using LDA as a
> delivery agent on my current mailserver configuration.
>
> I was curious to know if there are some options for having a message to
> be delivered to a "twin mailbox" upon delivery.
> this twin mailbox would work as a backup archive for recovering emails
> in case the user accidentally deletes them.
>
> so if i have a user which is alice i would create a second mailbox named
> backup_alice or whatever respecting a predictable schema and then every
> mail delivered to alice would also be delivered to backup_alice.
>
> do you know if this can be done? have any example?

I would add a BCC recipient in the MTA. It's more save in such situation. 
See the thread about qmail and multiple recipients for one mail address.

> i was also planning to use shared folders + ACLS to have backup_alice
> accessible as a read only mailbox directly from the alice imap account.

If posting (appending a new message) would be OK: Add a global Sieve 
script and let each message: fileinto :copy "backup";

Otherwise, use a shell wrapper:

file stdin into temp file,
call Dovecot LDA with original recipient
exit with LDA's exit code on error
call Dovecot LDA with backup recipient
exit 0 # ignores error to prevent repetitive delivery to recipient

I've posted a shell wrapper a few days ago in above mentioned thread.

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUwsJuHD1/YhP6VMHAQIaGwf/S0Wypw98TklEf/NjH2wxb6hKaGndKZOs
GMrVyo2VZCaxphu3TpanxSYiPqm3fhi9Ruax2QDulaOkDrm9CgGQrl+Q2lJqzaJD
GQhowSzHi2fXswjTES4lAoMxB1JcvS7f9tEmVS2+xcv6ptVtro4HUcMC9ho39AvS
mKnyx8NP+sy8Cp5CU7gTaLGaDR5pVpGS1CHu7ijQj8P0nRceP4jHo4p2yrxUbsMs
lool4VVBnWLIhbgkKwoxYUF9ydnVSLMQ3dXnTgQIjAQTsRc5FvID1kuKbN5rLZGw
CaOCc+kM33bYCk2++KwlDCpeFH8pOrayQFzDKPequN8TWkUm/sidKQ==
=mul3
-----END PGP SIGNATURE-----


More information about the dovecot mailing list