Re: [exim] How to recover messages from queue backup

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: tower
CC: Exim-Users
Subject: Re: [exim] How to recover messages from queue backup
On 2012-10-08 at 13:22 +0200, tower wrote:
> I want to restore messages which was adressed to one of my local account
> from backup /var/spool/exim4/input queue directory. Is there any method
> to recover only these mails from "offline" location?


exiqgrep, refine the invocation options to select the right messages,
then use -i to emit just the message-ids, then grab the filenames which
start with those prefices and transfer them across.

Bias towards restoring -D before -H and you'll be fine. The filenames
have an embedded timestamp, so there will not be conflicts with new
messages, but if the recipient spool is not empty and was receiving
messages at the same time, there's a small risk of collision, so check
first.

If you want to be able to routinely do this across spools from
different machines, it's worth setting localhost_number differently on
each machine, so that message ids will never conflict and there will be
no collisions. Normally, that's most useful for systems delivering to
shared storage, where part of the delivery filename is based on the Exim
message-id.

-Phil