main.c revision 86791365b10f45982c88e70f2eb94fd6c3fea151
/* 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 "restrict-access.h"
#include "master-service.h"
#include "master-login.h"
#include "master-interface.h"
#include "var-expand.h"
#include "mail-storage-service.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define IS_STANDALONE() \
static struct mail_storage_service_ctx *storage_service;
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;
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;
i_error("login client: Username missing from auth reply");
return;
}
}
}
{
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;
}