/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "submission-common.h"
#include "array.h"
#include "ioloop.h"
#include "base64.h"
#include "str.h"
#include "llist.h"
#include "net.h"
#include "istream.h"
#include "ostream.h"
#include "iostream-ssl.h"
#include "hostpid.h"
#include "var-expand.h"
#include "settings-parser.h"
#include "master-service.h"
#include "master-service-settings.h"
#include "mail-namespace.h"
#include "mail-storage.h"
#include "mail-storage-service.h"
#include "raw-storage.h"
#include "imap-urlauth.h"
#include "smtp-client.h"
#include "smtp-client-connection.h"
#include "submission-commands.h"
#include "submission-settings.h"
#include <unistd.h>
/* max. length of input command line */
/* Stop reading input when output buffer has this many bytes. Once the buffer
size has dropped to half of it, start reading input again. */
/* Disconnect client when it sends too many bad commands in a row */
/* Disconnect client after idling this many milliseconds */
unsigned int submission_client_count;
/* try to proxy pipelined commands in a similarly pipelined fashion */
{
}
{
}
{
addr = "local";
return addr;
}
void *context)
{
/* check proxy status */
i_error("Failed to establish relay connection: %s",
"4.4.0", "Failed to establish relay connection");
return;
}
/* propagate capabilities */
/* now that we know our capabilities, commence server protocol dialog */
}
const struct submission_settings *set)
{
else
/* make proxy connection */
if (set->submission_relay_trusted) {
}
}
else
}
{
}
struct mail_storage_service_user *service_user,
const struct submission_settings *set,
const char *helo,
{
const char *ident;
/* always use nonblocking I/O */
/* Enable BURL capability only when urlauth dict is
configured correctly */
}
if (ident != NULL) {
ident, "\n", NULL));
}
if (hook_client_created != NULL)
return client;
}
{
}
const char *reason)
{
return;
if (client->anvil_sent) {
"\n", NULL));
}
}
static void
{
}
static void
{
if (submission_client_count == 1)
}
{
}
}
{
}
{
else
return smtp_server_state_names[state];
}
{
};
const char *error;
i_error("Failed to expand submission_logout_format=%s: %s",
}
}
const char *reason)
{
if (client->disconnected)
return;
}
reason = "Connection closed";
i_info("Disconnect from %s: %s %s (state = %s)",
}
}
{
}
{
}
{
/* Account for the backend server's SIZE limit and calculate our own
relative to it. */
} else {
}
return max_size;
}
void clients_destroy_all(void)
{
while (submission_clients != NULL) {
"4.3.2", "Shutting down");
}
}
};