smtp-server-private.h revision 5d5ad796fc34170333bb52c05614425a0dd7e182
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen#define SMTP_SERVER_COMMAND_POOL_MAX (8 * 1024)
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen#define SMTP_SERVER_DEFAULT_MAX_COMMAND_LINE (4 * 1024)
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen#define SMTP_SERVER_DEFAULT_MAX_BAD_COMMANDS 10
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen (SMTP_CAPABILITY_SIZE | SMTP_CAPABILITY_ENHANCEDSTATUSCODES | \
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen SMTP_CAPABILITY_8BITMIME | SMTP_CAPABILITY_CHUNKING)
6509aa7306649042e828fef9e2f280f4535ea137Timo SirainenARRAY_DEFINE_TYPE(smtp_server_reply, struct smtp_server_reply);
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* New command; callback to command start handler executing. */
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* This command is being processed; command data is fully read, but no
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen reply is yet submitted */
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* A reply is submitted for this command. If not all command data was
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen read by the handler, it is first skipped on the input. If this is a
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen multi-reply command (LMTP->DATA), not all replies may be submitted
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* Request is ready for sending reply; a reply is submitted and the
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen command payload is fully read. If this is a multi-reply command
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen (LMTP->DATA), not all replies may be submitted yet. In that case the
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen command state goes back to PROCESSING once the all submitted replies
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* The reply for the command is sent */
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* Request is aborted; still lingering due to references */
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen unsigned int index;
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen unsigned int status;
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* private hooks */
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* next: command is next to reply but has not submittted all replies yet */
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* replied: command has submitted all replies */
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* completed: server is about to send last replies for this command */
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* destroy: command is about to be destroyed */
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen /* private context data */
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen unsigned int pending_mail_cmds, pending_rcpt_cmds;
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen struct istream *data_input, *data_chain_input;
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen const struct smtp_server_callbacks *callbacks;
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen struct smtp_server_helo_data helo, *pending_helo;
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen unsigned int id;
6509aa7306649042e828fef9e2f280f4535ea137Timo Sirainen struct smtp_server_command *command_queue_head, *command_queue_tail;
struct smtp_server {
const char **error_r);
const char **error_r);
struct smtp_server_command *
struct smtp_server_command *
const char *params);
const char *params);
const char *params);
const char *params);
const char *params);
const char *params);
const char *params);
const char *params);
const char *params);
const char *params);
const char *params);
const char *params);
const char *params);
struct smtp_server_transaction *
struct smtp_server_transaction *
struct smtp_server_recipient *