expire-env.c revision e59faf65ce864fe95dc00f5d52b8323cdbd0608a
/* Copyright (c) 2006-2010 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "str.h"
#include "strescape.h"
#include "settings-parser.h"
#include "imap-match.h"
#include "mail-namespace.h"
#include "expire-env.h"
#include <stdlib.h>
enum expire_type {
};
struct expire_rule {
const char *pattern;
struct imap_match_glob *glob;
enum expire_type type;
unsigned int expire_secs;
};
struct expire_env {
};
static void
const char *str)
{
struct expire_rule rule;
struct mail_namespace *ns;
const char *const *args;
if (*str == '"') {
/* quoted string */
for (p = ++str; *p != '\0'; p++) {
if (*p == '\\' && p[1] != '\0')
p++;
else if (*p == '"')
break;
}
if (*p == '"') p++;
} else {
}
if (*p == ' ') p++;
/* find namespace's separator and create a glob */
i_warning("expire: No namespace found for mailbox: %s",
}
/* get expire time */
i_fatal("expire: Missing expire time for mailbox '%s'",
}
i_fatal("expire: Missing expire time specifier for mailbox "
}
i_fatal("expire: Invalid time for mailbox '%s': %s",
}
/* expire type */
else {
i_fatal("expire: Unknown type for mailbox '%s': %s",
}
i_debug("expire: pattern=%s secs=%u type=%s",
}
}
{
struct expire_env *env;
const char *rule_str;
char env_name[20];
unsigned int i;
}
return env;
}
{
}
unsigned int *expunge_secs_r,
unsigned int *altmove_secs_r)
{
const struct expire_rule *rule;
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;
}
}