[Dovecot] Incoming mails + remote backup

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Tue Apr 6 15:50:42 EEST 2010


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

On Tue, 6 Apr 2010, minim wrote:

>>> mails? except configuring forwarder to each mail ID !!!!

> Is it possible to configure MTA to deliver to remote servers?

sendmail can deliver to TCP or Unix socket or via a program.
But sendmail cannot deliver the same message twice, once the delivery 
takes place. As you do not want to add a forward or alias for each 
account, which probably can be created automatically, you could add a 
wrapper around your LDA/MDA, that copies the cloned message to yet another 
system, e.g.:

normal:

/etc/mail/smrsh/dovecot-deliver -f $g -d $u

Wrapper:

/etc/mail/smrsh/wrapper --mode sendmail -f $g -d $u -m $h

===
#!/bin/bash

tmpf=/tmp/wrap.$$.tmp
trap 'rc=$?; rm -f '$tmpf' 2> /dev/null;exit $rc' EXIT

cat - > $tmpf || exit
/etc/mail/smrsh/dovecot-deliver "$@" < $tmpf || exit
#ssh otherserver /etc/mail/smrsh/dovecot-deliver "$@" < $tmpf
exit 0
===

The #ssh line is to forward the message.

you could code a LMTP proxy, sendmail then talks LMTP to the LDA, which 
splits its input, in order to forward the commands to another LMTP server 
and calls Dovecot's deliver locally.

BTW: rsync works (see mailing list) reasonably well.

Regards,

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

iQEVAwUBS7suJb+Vh58GPL/cAQLLHQf/RKjWI1Orb85NpZk2F2OW91laBYa8Hc4t
EX4+GccPewSQaYSL6Xat2HN7m7JhNfGqP7byzAPS0UmtSbqp2bQr83pZidVps9rt
SwgxUHlxvWn8SoQ2PI25KmDn9SpIv8IM2FxD1S91dLD8x1w41/zTaVzngOviEn0W
Doj/hlY/SHU3N0j/usBHX/UtAxRtGs7SWiR8NkXsO+0WE768S5ZejbLZicEoDJxU
TYVpT0sqROnysCXsE+AI3pwxm6dcVcbOLxq/gPlLHFwv6DqEwpOvL92I89qzDS61
+UGRh4lf/G/8PpsFd/oK+VVojb6nDuD/qyv5a1Y4ivo8CwMKiWM3lQ==
=UGdi
-----END PGP SIGNATURE-----


More information about the dovecot mailing list