#ifndef SMTP_CLIENT_H
#define SMTP_CLIENT_H
#include "net.h"
#include "smtp-common.h"
#include "smtp-address.h"
#include "smtp-reply.h"
struct smtp_client;
struct smtp_client_request;
enum smtp_client_command_error {
/* Server closed the connection */
/* The command was aborted */
/* DNS lookup failed */
/* Failed to establish the connection */
/* Failed to authenticate using the provided credentials */
/* Lost the connection after initially succeeded */
/* Got an invalid reply from the server */
/* We sent a command with a payload stream that broke while reading
from it */
/* The server failed to respond before the command timed out */
};
struct smtp_client_settings {
const char *my_hostname;
const char *temp_path_prefix;
const char *dns_client_socket_path;
const char *master_user;
const char *username;
const char *password;
/* Space-separated list of SASL mechanisms to try (in the specified
order). The default is to use only SASL PLAIN. */
const char *sasl_mechanisms;
const char *rawlog_dir;
/* Timeout for SMTP commands. Reset every time more data is being
sent or received.
(default = unlimited) */
unsigned int command_timeout_msecs;
/* Timeout for loggging in
(default = cmd_timeout_msecs) */
unsigned int connect_timeout_msecs;
/* Max total size of reply */
/* Maximum BDAT chunk size for the CHUNKING capability */
/* Maximum pipelined BDAT commands */
unsigned int max_data_chunk_pipeline;
/* if remote server supports XCLIENT capability,
send this data */
Configuring this is mainly useful for the test suite. The kernel
defaults are used when these settings are 0. */
/* enable logging debug messages */
bool debug;
/* peer is trusted, so e.g. attempt sending XCLIENT data */
bool peer_trusted;
/* don't clear password after first successful authentication */
bool remember_password;
};
#endif