On Mon, 2009-08-03 at 16:44 +0900, Christian Balzer wrote:
> So how do people keep a backup (meaning only mails that actually got a
> final delivery, splitting things off earlier is trivial of course) of
> incoming mails on a remote server then?

I guess this depends upon what you define as "final delivery", doesn't
it? Do you mean:

A. Only take a backup copy of a message once it has successfully
completed delivery into a user's mailbox, or
B. Take a backup copy as part of the operation of delivering into the
user's mailbox

 - there's a minor, but significant, difference between those two
statements.

At work, on our Exim+CourierIMAP based "postbox" servers - that is, the
ones which the users access via an IMAP client to read their mail - we
have a shadow router/transport pair which copy the mail to a short-lived
"Incoming Mail Backup" maildir:

Router is:

localuser_backup:
  driver = accept
  check_local_user
  address_data = <condition removed>
  transport = local_delivery_backup
  unseen

Transport is:

local_delivery_backup:
  driver = appendfile
  directory = $home/Incoming-Mail-Backup
  user = $address_data
  delivery_date_add
  return_path_add
  maildir_format

That pair run immediately before the local delivery router puts the
message in the user's mailbox.

It's not a great stretch of logic to change the transport to be a remote
one.

*However* - this happens immediately before the message is delivered
into the user's mailbox, so could quite conceivably store the backup
copy yet have a problem with the actual delivery, causing the message to
be lost.

Yes, this is the entire point of the backup operation, in case you were
wondering!

I guess you could invert the sequence, and make the *actual* delivery
"unseen" and then do the remote one but that would make error handling
more difficult.

What would your definition of "final delivery" be?

Graeme


-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to