procmail
[Top] [All Lists]

Re: formail -D generates empty msg. when duplicate found?

1999-12-12 10:33:24
On Sun, 12 Dec 1999 08:45:19 -0800, gary(_at_)Intrepid(_dot_)Com (Gary Funck)
wrote:
 A question: how is procmail's message cache organized?

It's an, er, um, circular file :-)  [You mean formail's]

You can grok it by just looking at it. Message-Id:s are null
terminated and the place where the next one will be written is marked
with a double null. When you exceed the maximum file size, Procmail
starts overwriting the start of the file. So you see something like

Start of file
v
ssage-id(_at_)recently>(NULL)(NULL)verwritten>(NULL)<fairly-old(_at_)long(_dot_)ago>(NULL)
  <... zip ahead to near the end of the file ...>
<something>(NULL)<last-one(_at_)before(_dot_)wrap>(NULL)<latest.me
                                                       ^ End of file

Does this make sense? The latest message-id which was written to the
file was <latest-message-id(_at_)recently> and it caused formail to wrap
over to the start of the file, overwriting the oldest message-id in
the file (which is now unreadable and invalid, but you can see that it
used to end with the characters ..."verwritten>"). The oldest
remaining Message-Id in the cache is <fairly-old(_at_)long(_dot_)ago> and it is
likely to be overwritten, too, when another one is added.

Hope this helps,

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition