-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 24 Feb 2014, Charles Marcus wrote:
> On 2/24/2014 3:58 AM, Steffen Kaiser <skdovecot at
smail.inf.fh-brs.de> wrote:
>> 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.
>
> The only downside to this is all of the original headers are *not*
preserved
> in the BCC copy.
Er, I don't know what you mean with "all of the original headers".
There
are no headers of the delivery process to user, that's right. Everything
else should be untouchted. Or in other words, the backup copy does not
"backup" the delivery process.
> On 2/24/2014 3:58 AM, Steffen Kaiser <skdovecot at
smail.inf.fh-brs.de> wrote:
>> If posting (appending a new message) would be OK: Add a global Sieve
script
>> and let each message: fileinto :copy "backup";
>
> So... it looks like this would work as I described above? An identical
copy,
> preserving all of the original headers?
The other one would be the wrapper method. I just looked into the man page
of dovecot-lda:
-p path
Path to the mail to be delivered instead of reading from
stdin. If using maildir
the file is hard linked to the destination if possible. This
allows a single mail
to be delivered to multiple users using hard links, but
currently it also prevents
deliver from updating cache file so it shouldn't be used
unless really necessary.
So Dovecot LDA seems to keep its virtual fingers off the message and
you don't need to redirect all the time and you can get hard links,
if you use the same uid/gid for both users, 100% identical then e.g.:
#!/bin/bash
user=$...
f=/path/to/dir/on/same/mountpoint/as/user/and/user_backup/$$.tmp
cat - > $f
dovecot-lda .... -d ${user} -p $f
rc=$?
if test $rc -gt 0; then
rm -f $f
exit $rc
fi
dovecot-lda .... -d ${user}_backup -p $f
rm -f $f
# ignore errors to prevent re-delivery to user
exit 0
- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUwtWUXD1/YhP6VMHAQKHXgf/Z1h23FhLvd5KfHjb90neguH7p7ZoEL9t
YyX52w8GCSkPXCvDkJ6Nc/iAi54TqkVzv7VERXODWDiMeB/rmXSg/OnWMo5s2cSO
AnV19SP6OPkmRcxPulOz1dp3uQoDUDbwW6iDf9EGaV3MzfNC6fBiOGUXeTDAbBa9
k6z6W1wwvqQ192/gkb6pkzw8wpL48zxurSPkquMH6hqB1MwfnQmS6J0cG3TY1+QP
7HbpvDaqJ4KPhlJk7DnIKk+78/pc04GnuAFqo/+JXDchNBgSSk7FzHys3/irLGLU
BkyZ+kDfGNBklsH4Zzwb7L5soryDa5HAfgEZSydK404O3BtnMR2iVA==P93w
-----END PGP SIGNATURE-----