client.c revision df957821a4b2e2d8708aa35cfe30860ee71af686
/* Copyright (c) 2013-2017 Dovecot authors, see the included COPYING file */
#include "login-common.h"
#include "base64.h"
#include "buffer.h"
#include "ioloop.h"
#include "istream.h"
#include "ostream.h"
#include "randgen.h"
#include "hostpid.h"
#include "safe-memset.h"
#include "str.h"
#include "strescape.h"
#include "master-service.h"
#include "master-service-ssl-settings.h"
#include "client.h"
#include "client-authenticate.h"
#include "auth-client.h"
#include "submission-proxy.h"
#include "submission-login-settings.h"
/* Disconnect client when it sends too many bad commands */
#define CLIENT_MAX_BAD_COMMANDS 10
static const struct smtp_server_callbacks smtp_callbacks;
static int submission_login_start_tls(void *conn_ctx,
{
if (client_init_ssl(client) < 0) {
"TLS initialization failed.");
"Disconnected: TLS initialization failed.");
return -1;
}
return 0;
}
{
struct submission_client *subm_client;
return &subm_client->common;
}
void **other_sets)
{
static const char *const xclient_extensions[] =
struct submission_client *subm_client =
struct smtp_server_settings smtp_set;
if (client_is_tls_enabled(client))
}
{
struct submission_client *subm_client =
}
{
struct submission_client *subm_client =
}
static void
const char *text)
{
struct submission_client *client =
struct smtp_server_connection *conn;
switch (reason) {
break;
break;
default:
break;
}
}
}
static void
struct smtp_server_cmd_ctx *cmd,
struct smtp_proxy_data *data)
{
unsigned int i;
for (i = 0; i < data->extra_fields_count; i++) {
} else {
"Invalid FORWARD parameter");
}
}
continue;
}
}
}
{
}
static void client_connection_destroy(void *context)
{
return;
}
static bool client_connection_is_trusted(void *context)
{
}
static void submission_login_die(void)
{
/* do nothing. submission connections typically die pretty quick anyway.
*/
}
static void submission_login_preinit(void)
{
}
static void submission_login_init(void)
{
struct smtp_server_settings smtp_server_set;
/* override the default login_die() */
/* initialize SMTP server */
}
static void submission_login_deinit(void)
{
}
static const struct smtp_server_callbacks smtp_callbacks = {
};
static struct client_vfuncs submission_client_vfuncs = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
};
static const struct login_binary submission_login_binary = {
.protocol = "submission",
.process_name = "submission-login",
.default_port = 587,
};
{
}