main.c revision 6667f4006484bcaf9ab8fd03b97a7a3ae84ce0d5
/* Copyright (c) 2002-2009 Dovecot authors, see the included COPYING file */
#include "pop3-common.h"
#include "ioloop.h"
#include "buffer.h"
#include "istream.h"
#include "ostream.h"
#include "base64.h"
#include "str.h"
#include "process-title.h"
#include "restrict-access.h"
#include "master-service.h"
#include "master-login.h"
#include "master-interface.h"
#include "var-expand.h"
#include "mail-user.h"
#include "mail-storage-service.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define IS_STANDALONE() \
static bool verbose_proctitle = FALSE;
static struct mail_storage_service_ctx *storage_service;
void pop3_refresh_proctitle(void)
{
if (!verbose_proctitle)
return;
switch (pop3_client_count) {
case 0:
break;
case 1:
}
break;
default:
break;
}
}
static void pop3_die(void)
{
/* do nothing. pop3 connections typically die pretty quick anyway. */
}
{
i_panic("Couldn't add client input to stream");
}
if (!IS_STANDALONE())
(void)client_handle_input(client);
}
static int
const char **error_r)
{
struct mail_storage_service_user *user;
const struct pop3_settings *set;
return -1;
if (set->verbose_proctitle)
T_BEGIN {
} T_END;
return 0;
}
static void main_stdio_run(void)
{
struct mail_storage_service_input input;
i_fatal("USER environment missing");
}
static void
const char *username, const char *const *extra_fields)
{
struct mail_storage_service_input input;
const char *error;
}
}
{
if (master_login == NULL) {
/* running standalone, we shouldn't even get here */
} else {
}
}
{
static const struct setting_parser_info *set_roots[] = {
};
enum master_service_flags service_flags = 0;
if (IS_STANDALONE() && getuid() == 0 &&
printf("-ERR pop3 binary must not be started from "
"inetd, use pop3-login instead.\n");
return 1;
}
if (IS_STANDALONE()) {
} else {
}
if (master_getopt(master_service) > 0)
return FATAL_DEFAULT;
/* fake that we're running, so we know if client was destroyed
while handling its initial input */
if (IS_STANDALONE()) {
T_BEGIN {
} T_END;
} else {
}
if (master_login != NULL)
return 0;
}