summaryrefslogtreecommitdiff
path: root/pop3d
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2003-10-10 08:53:57 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2003-10-10 08:53:57 +0000
commit7c037c17c624c37c0dc032722da17c6baa81716c (patch)
treef3a42e16e928dd40062f4bbea5354cf8d51d38d8 /pop3d
parent07491c247f6379e4843a8491eb0a768f35973eae (diff)
downloadmailutils-7c037c17c624c37c0dc032722da17c6baa81716c.tar.gz
mailutils-7c037c17c624c37c0dc032722da17c6baa81716c.tar.bz2
New option --undelete tells pop3d to undelete all delete messages on startup
Diffstat (limited to 'pop3d')
-rw-r--r--pop3d/pop3d.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index cbd21755e..1e69d79ac 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.c
@@ -39,6 +39,8 @@ int tls_done;
/* Number of child processes. */
volatile size_t children;
+/* Should all the messages be undeleted on startup */
+int undelete_on_startup;
static int pop3d_mainloop __P ((int fd, FILE *, FILE *));
static void pop3d_daemon_init __P ((void));
@@ -50,8 +52,14 @@ static void pop3d_log_connection __P((int fd));
const char *program_version = "pop3d (" PACKAGE_STRING ")";
static char doc[] = N_("GNU pop3d -- the POP3 daemon");
+static struct argp_option options[] = {
+ {"undelete", 'u', NULL, 0,
+ N_("undelete all messages on startup"), 0},
+ {NULL, 0, NULL, 0, NULL, 0}
+};
+
static struct argp argp = {
- NULL,
+ options,
pop3d_parse_opt,
NULL,
doc,
@@ -80,6 +88,10 @@ pop3d_parse_opt (int key, char *arg, struct argp_state *astate)
case ARGP_KEY_INIT:
astate->child_inputs[0] = astate->input;
break;
+
+ case 'u':
+ undelete_on_startup = 1;
+ break;
default:
return ARGP_ERR_UNKNOWN;

Return to:

Send suggestions and report system problems to the System administrator.