expire does not purge junk group

Julien ÉLIE julien at trigofacile.com
Fri May 21 09:37:46 UTC 2010

Hi Andreas,

> And this is what is apparently also a bit unexpected for you. My
> understanding is that the above entry in expire.ctl shall expire all
> articles in junk and forget about their very existence immediately. I
> have restarted innd after I changed expire.ctl, and I ran expire -N
> immediately after the restart. Refeeding the junked articles

When group-based expiry is used, the order is:
 * expireover
 * renumbering the active file (lowmark)
 * expirerm
 * expire

expire does not even look at the time an article was received.
HasSelfexpire is set to true but as the article still exists in the CNFS
buffer, Selfexpired is false and the history entry is retained (r = true).

EXPdoline() in expire/expire.c:

    if (innconf->groupbaseexpiry || SMprobe(SELFEXPIRE, token, NULL)) {
        if ((article = SMretrieve(*token, RETR_STAT)) == (ARTHANDLE *)NULL) {
            HasSelfexpire = true;
            Selfexpired = true;
        } else {
            /* the article is still alive */
            if (innconf->groupbaseexpiry || !Ignoreselfexpire)
                HasSelfexpire = true;
    if (EXPusepost && posted != 0)
        when = posted;
        when = arrived;

    if (HasSelfexpire) {
        if (Selfexpired || token->type == TOKEN_EMPTY) {
            r = false;
        } else {
            r = true;
    } else  {
        kr = EXPkeepit(token, when, expires);
        if (kr == Remove) {
            r = false;
        } else {
            r = true;

Expiration is driven by overview here (group-based).  "expireover -N"
delt with the removal of expired files.

We cannot add EXPkeepit() because it would remove the history entry
without checking to which newsgroups the article was posted.
It would be a class-based expiry.

When expireover is ran, maybe we could add an HISreplace() call to
mark the relevant token to be removed when expire runs?

Or is it a bad idea and the history file MUST contain tokens for all
the articles we have in our CNFS buffers?  (I do not see why...)

Julien ÉLIE

« Life is short -- so eat dessert first! » 

More information about the inn-workers mailing list