Re: [Exim] Format of spool files

Góra strony
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Dla: Sheldon Hearn
CC: exim-users
Temat: Re: [Exim] Format of spool files
On Sun, 17 Jun 2001, Sheldon Hearn wrote:

> I'm writing a script that'll allow me to to mark as delivered, all
> recipient addresses in all queued messages, for which sender and
> recipient address match the pair of arguments provided on the
> command-line. I was hoping to use the spool files as input.
>
> After reading "Chapter 56 Format of spool files" in the Exim
> specification, I'm left with an unanswered question.
>
> How do I distinguish between delivered and undelivered recipient
> addresses? The recipient list is described as including all recipient
> addresses, both delivered and undelivered.


The delivered addresses are listed in a tree format. Check out the
paragraph that starts "Following the options are those addresses to
which the message is not to be delivered." Note the "not".

1. Using "exim -bp" as input might be easier - that copes with split
spools automatically for you, and lists only undelivered addresses.

2. Just in case you were thinking of modifying the spool files (though
you imply not):

While is is highly unlikely that I'll ever change the format of spool
files incompatibly, it would definitely be safer to use the command
"exim -Mad" to do this job rather than trying to manipulate the spool
files yourself. (Note: if you do modify a spool file, you will need to
lock the message by locking the -D file. Otherwise Exim may be working
on it at the same time as you are. Also, the way Exim updates -H files
is to rewrite a new file and rename.)

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.