expire-env.c revision 9514dbd41faad453406fc3a10aca791417a9ce75
/* Copyright (c) 2006-2009 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "imap-match.h"
#include "mail-namespace.h"
#include "expire-env.h"
#include <stdlib.h>
enum expire_type {
};
struct expire_box {
const char *pattern;
struct imap_match_glob *glob;
enum expire_type type;
unsigned int expire_secs;
};
struct expire_env {
};
static void
{
struct expire_box box;
struct mail_namespace *ns;
char *const *names;
const char *ns_name;
unsigned int len;
return;
i_fatal("expire: Missing expire days for mailbox '%s'",
*names);
}
i_warning("expire: No namespace found for mailbox: %s",
}
}
}
{
struct expire_env *env;
return env;
}
{
}
unsigned int *expunge_secs_r,
unsigned int *altmove_secs_r)
{
const struct expire_box *expire_boxes;
unsigned int i, count;
for (i = 0; i < count; i++) {
switch (expire_boxes[i].type) {
case EXPIRE_TYPE_EXPUNGE:
expunge_min = secs;
break;
case EXPIRE_TYPE_ALTMOVE:
altmove_min = secs;
break;
}
}
}
return expunge_min > 0 || altmove_min > 0;
}
bool *altmove_r)
{
return secs1;
} else {
return secs2;
}
}