"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib-smtp/smtp-server.h" between
dovecot-2.3.16.tar.gz and dovecot-2.3.17.tar.gz

About: Dovecot is an IMAP and POP3 server, written with security primarily in mind.

smtp-server.h  (dovecot-2.3.16):smtp-server.h  (dovecot-2.3.17)
skipping to change at line 45 skipping to change at line 45
SMTP_SERVER_STATE_READY, SMTP_SERVER_STATE_READY,
SMTP_SERVER_STATE_MAIL_FROM, SMTP_SERVER_STATE_MAIL_FROM,
SMTP_SERVER_STATE_RCPT_TO, SMTP_SERVER_STATE_RCPT_TO,
SMTP_SERVER_STATE_DATA, SMTP_SERVER_STATE_DATA,
}; };
extern const char *const smtp_server_state_names[]; extern const char *const smtp_server_state_names[];
struct smtp_server_helo_data { struct smtp_server_helo_data {
const char *domain; const char *domain;
bool domain_valid:1; /* valid domain/literal specified */ bool domain_valid:1; /* Valid domain/literal specified */
bool old_smtp:1; /* client sent HELO rather than EHLO */ bool old_smtp:1; /* Client sent HELO rather than EHLO */
}; };
/* /*
* Recipient * Recipient
*/ */
enum smtp_server_recipient_hook_type { enum smtp_server_recipient_hook_type {
/* approved: the server is about to approve this recipient by sending /* approved: the server is about to approve this recipient by sending
a success reply to the RCPT command. */ a success reply to the RCPT command. */
SMTP_SERVER_RECIPIENT_HOOK_APPROVED, SMTP_SERVER_RECIPIENT_HOOK_APPROVED,
skipping to change at line 110 skipping to change at line 110
ATTR_FORMAT(4, 0); ATTR_FORMAT(4, 0);
void smtp_server_recipient_reply(struct smtp_server_recipient *rcpt, void smtp_server_recipient_reply(struct smtp_server_recipient *rcpt,
unsigned int status, const char *enh_code, unsigned int status, const char *enh_code,
const char *fmt, ...) ATTR_FORMAT(4, 5); const char *fmt, ...) ATTR_FORMAT(4, 5);
void smtp_server_recipient_reply_forward(struct smtp_server_recipient *rcpt, void smtp_server_recipient_reply_forward(struct smtp_server_recipient *rcpt,
const struct smtp_reply *from); const struct smtp_reply *from);
/* Hooks */ /* Hooks */
void smtp_server_recipient_add_hook(struct smtp_server_recipient *rcpt, void smtp_server_recipient_add_hook(struct smtp_server_recipient *rcpt,
enum smtp_server_recipient_hook_type type, enum smtp_server_recipient_hook_type type,
smtp_server_rcpt_func_t func, smtp_server_rcpt_func_t func,
void *context); void *context);
#define smtp_server_recipient_add_hook(_rcpt, _type, _func, _context) \ #define smtp_server_recipient_add_hook(_rcpt, _type, _func, _context) \
smtp_server_recipient_add_hook((_rcpt), (_type) - \ smtp_server_recipient_add_hook((_rcpt), (_type) - \
CALLBACK_TYPECHECK(_func, void (*)( \ CALLBACK_TYPECHECK(_func, void (*)( \
struct smtp_server_recipient *, typeof(_context))), \ struct smtp_server_recipient *, typeof(_context))), \
(smtp_server_rcpt_func_t *)(_func), (_context)) (smtp_server_rcpt_func_t *)(_func), (_context))
void smtp_server_recipient_remove_hook( void smtp_server_recipient_remove_hook(
struct smtp_server_recipient *rcpt, struct smtp_server_recipient *rcpt,
enum smtp_server_recipient_hook_type type, enum smtp_server_recipient_hook_type type,
smtp_server_rcpt_func_t *func); smtp_server_rcpt_func_t *func);
#define smtp_server_recipient_remove_hook(_rcpt, _type, _func) \ #define smtp_server_recipient_remove_hook(_rcpt, _type, _func) \
skipping to change at line 171 skipping to change at line 171
void *context; void *context;
bool finished:1; bool finished:1;
}; };
struct smtp_server_recipient * struct smtp_server_recipient *
smtp_server_transaction_find_rcpt_duplicate( smtp_server_transaction_find_rcpt_duplicate(
struct smtp_server_transaction *trans, struct smtp_server_transaction *trans,
struct smtp_server_recipient *rcpt); struct smtp_server_recipient *rcpt);
void smtp_server_transaction_fail_data( void smtp_server_transaction_fail_data(struct smtp_server_transaction *trans,
struct smtp_server_transaction *trans, struct smtp_server_cmd_ctx *data_cmd,
struct smtp_server_cmd_ctx *data_cmd, unsigned int status,
unsigned int status, const char *enh_code, const char *enh_code,
const char *fmt, va_list args) ATTR_FORMAT(5, 0); const char *fmt, va_list args)
ATTR_FORMAT(5, 0);
void smtp_server_transaction_write_trace_record( void smtp_server_transaction_write_trace_record(
string_t *str, struct smtp_server_transaction *trans, string_t *str, struct smtp_server_transaction *trans,
enum smtp_server_trace_rcpt_to_address rcpt_to_address); enum smtp_server_trace_rcpt_to_address rcpt_to_address);
/* /*
* Callbacks * Callbacks
*/ */
struct smtp_server_cmd_helo { struct smtp_server_cmd_helo {
struct smtp_server_helo_data helo; struct smtp_server_helo_data helo;
bool first:1; /* this is the first */ bool first:1; /* This is the first */
bool changed:1; /* this EHLO/HELO/LHLO is the first or bool changed:1; /* This EHLO/HELO/LHLO is the first or different
different from a previous one */ from a previous one */
}; };
struct smtp_server_cmd_mail { struct smtp_server_cmd_mail {
struct smtp_address *path; struct smtp_address *path;
struct smtp_params_mail params; struct smtp_params_mail params;
struct timeval timestamp; struct timeval timestamp;
enum smtp_server_transaction_flags flags; enum smtp_server_transaction_flags flags;
}; };
skipping to change at line 233 skipping to change at line 234
However, until all previous commands are handled, a transaction However, until all previous commands are handled, a transaction
command cannot rely on the transaction state being final. Use command cannot rely on the transaction state being final. Use
cmd->hook_next to get notified when all previous commands are cmd->hook_next to get notified when all previous commands are
finished and the current command is next in line to reply. finished and the current command is next in line to reply.
If the implementation does not need asynchronous behavior, set If the implementation does not need asynchronous behavior, set
max_pipelined_commands=1 and don't return 0 from any command handler. max_pipelined_commands=1 and don't return 0 from any command handler.
*/ */
/* HELO/EHLO/LHLO */ /* HELO/EHLO/LHLO */
int (*conn_cmd_helo)(void *conn_ctx, int (*conn_cmd_helo)(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_ctx *cmd, struct smtp_server_cmd_helo *data);
struct smtp_server_cmd_helo *data);
/* STARTTLS */ /* STARTTLS */
int (*conn_cmd_starttls)(void *conn_ctx, int (*conn_cmd_starttls)(void *conn_ctx,
struct smtp_server_cmd_ctx *cmd); struct smtp_server_cmd_ctx *cmd);
/* AUTH */ /* AUTH */
int (*conn_cmd_auth)(void *conn_ctx, int (*conn_cmd_auth)(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_ctx *cmd, struct smtp_server_cmd_auth *data);
struct smtp_server_cmd_auth *data);
int (*conn_cmd_auth_continue)(void *conn_ctx, int (*conn_cmd_auth_continue)(void *conn_ctx,
struct smtp_server_cmd_ctx *cmd, const char *response); struct smtp_server_cmd_ctx *cmd,
const char *response);
/* MAIL */ /* MAIL */
int (*conn_cmd_mail)(void *conn_ctx, int (*conn_cmd_mail)(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_ctx *cmd, struct smtp_server_cmd_mail *data);
struct smtp_server_cmd_mail *data);
/* RCPT */ /* RCPT */
int (*conn_cmd_rcpt)(void *conn_ctx, int (*conn_cmd_rcpt)(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_ctx *cmd, struct smtp_server_recipient *rcpt);
struct smtp_server_recipient *rcpt);
/* RSET */ /* RSET */
int (*conn_cmd_rset)(void *conn_ctx, int (*conn_cmd_rset)(void *conn_ctx, struct smtp_server_cmd_ctx *cmd);
struct smtp_server_cmd_ctx *cmd);
/* DATA */ /* DATA */
int (*conn_cmd_data_begin)(void *conn_ctx, int (*conn_cmd_data_begin)(void *conn_ctx,
struct smtp_server_cmd_ctx *cmd, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_transaction *trans, struct smtp_server_transaction *trans,
struct istream *data_input); struct istream *data_input);
int (*conn_cmd_data_continue)(void *conn_ctx, int (*conn_cmd_data_continue)(void *conn_ctx,
struct smtp_server_cmd_ctx *cmd, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_transaction *trans); struct smtp_server_transaction *trans);
/* VRFY */ /* VRFY */
int (*conn_cmd_vrfy)(void *conn_ctx, int (*conn_cmd_vrfy)(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_ctx *cmd, const char *param);
const char *param);
/* NOOP */ /* NOOP */
int (*conn_cmd_noop)(void *conn_ctx, int (*conn_cmd_noop)(void *conn_ctx, struct smtp_server_cmd_ctx *cmd);
struct smtp_server_cmd_ctx *cmd);
/* QUIT */ /* QUIT */
int (*conn_cmd_quit)(void *conn_ctx, int (*conn_cmd_quit)(void *conn_ctx, struct smtp_server_cmd_ctx *cmd);
struct smtp_server_cmd_ctx *cmd);
/* XCLIENT */ /* XCLIENT */
void (*conn_cmd_xclient)(void *conn_ctx, void (*conn_cmd_xclient)(void *conn_ctx,
struct smtp_server_cmd_ctx *cmd, struct smtp_server_cmd_ctx *cmd,
struct smtp_proxy_data *data); struct smtp_proxy_data *data);
/* Command input callbacks: /* Command input callbacks:
These can be used to do stuff before and after a pipelined group of These can be used to do stuff before and after a pipelined group of
commands is read. commands is read.
*/ */
void (*conn_cmd_input_pre)(void *context); void (*conn_cmd_input_pre)(void *context);
void (*conn_cmd_input_post)(void *context); void (*conn_cmd_input_post)(void *context);
/* Transaction events */ /* Transaction events */
skipping to change at line 304 skipping to change at line 298
void (*conn_state_changed)(void *context, void (*conn_state_changed)(void *context,
enum smtp_server_state new_state, enum smtp_server_state new_state,
const char *new_args) ATTR_NULL(3); const char *new_args) ATTR_NULL(3);
/* Proxy data */ /* Proxy data */
void (*conn_proxy_data_updated)(void *conn_ctx, void (*conn_proxy_data_updated)(void *conn_ctx,
const struct smtp_proxy_data *data); const struct smtp_proxy_data *data);
/* Connection */ /* Connection */
int (*conn_start_tls)(void *conn_ctx, int (*conn_start_tls)(void *conn_ctx,
struct istream **input, struct ostream **output); struct istream **input, struct ostream **output);
/* Connection is disconnected. This is always called before /* Connection is disconnected. This is always called before
conn_free(). */ conn_free(). */
void (*conn_disconnect)(void *context, const char *reason); void (*conn_disconnect)(void *context, const char *reason);
/* The last reference to connection is dropped, causing the connection /* The last reference to connection is dropped, causing the connection
to be freed. */ to be freed. */
void (*conn_free)(void *context); void (*conn_free)(void *context);
/* Security */ /* Security */
bool (*conn_is_trusted)(void *context); bool (*conn_is_trusted)(void *context);
}; };
skipping to change at line 424 skipping to change at line 418
void smtp_server_switch_ioloop(struct smtp_server *server); void smtp_server_switch_ioloop(struct smtp_server *server);
/* /*
* Connection * Connection
*/ */
/* Create connection. It is still inactive and needs to be started with /* Create connection. It is still inactive and needs to be started with
one of the functions below. */ one of the functions below. */
struct smtp_server_connection * struct smtp_server_connection *
smtp_server_connection_create(struct smtp_server *server, smtp_server_connection_create(
int fd_in, int fd_out, struct smtp_server *server, int fd_in, int fd_out,
const struct ip_addr *remote_ip, in_port_t remote_port, const struct ip_addr *remote_ip, in_port_t remote_port, bool ssl_start,
bool ssl_start, const struct smtp_server_settings *set, const struct smtp_server_settings *set,
const struct smtp_server_callbacks *callbacks, void *context) const struct smtp_server_callbacks *callbacks, void *context)
ATTR_NULL(4, 6, 8); ATTR_NULL(4, 6, 8);
struct smtp_server_connection * struct smtp_server_connection *
smtp_server_connection_create_from_streams(struct smtp_server *server, smtp_server_connection_create_from_streams(
struct smtp_server *server,
struct istream *input, struct ostream *output, struct istream *input, struct ostream *output,
const struct ip_addr *remote_ip, in_port_t remote_port, const struct ip_addr *remote_ip, in_port_t remote_port,
const struct smtp_server_settings *set, const struct smtp_server_settings *set,
const struct smtp_server_callbacks *callbacks, void *context) const struct smtp_server_callbacks *callbacks, void *context)
ATTR_NULL(4, 6, 8); ATTR_NULL(4, 6, 8);
void smtp_server_connection_ref(struct smtp_server_connection *conn); void smtp_server_connection_ref(struct smtp_server_connection *conn);
bool smtp_server_connection_unref(struct smtp_server_connection **_conn); bool smtp_server_connection_unref(struct smtp_server_connection **_conn);
/* Initialize the connection with state and data from login service */ /* Initialize the connection with state and data from login service */
skipping to change at line 468 skipping to change at line 463
/* Halt connection command input and idle timeout entirely. */ /* Halt connection command input and idle timeout entirely. */
void smtp_server_connection_halt(struct smtp_server_connection *conn); void smtp_server_connection_halt(struct smtp_server_connection *conn);
/* Resume connection command input and idle timeout. */ /* Resume connection command input and idle timeout. */
void smtp_server_connection_resume(struct smtp_server_connection *conn); void smtp_server_connection_resume(struct smtp_server_connection *conn);
void smtp_server_connection_input_lock(struct smtp_server_connection *conn); void smtp_server_connection_input_lock(struct smtp_server_connection *conn);
void smtp_server_connection_input_unlock(struct smtp_server_connection *conn); void smtp_server_connection_input_unlock(struct smtp_server_connection *conn);
void smtp_server_connection_set_streams(struct smtp_server_connection *conn, void smtp_server_connection_set_streams(struct smtp_server_connection *conn,
struct istream *input, struct ostream *output); struct istream *input,
struct ostream *output);
void smtp_server_connection_set_ssl_streams(struct smtp_server_connection *conn, void smtp_server_connection_set_ssl_streams(struct smtp_server_connection *conn,
struct istream *input, struct ostream *output); struct istream *input,
struct ostream *output);
void smtp_server_connection_close(struct smtp_server_connection **_conn, void smtp_server_connection_close(struct smtp_server_connection **_conn,
const char *reason) ATTR_NULL(2); const char *reason) ATTR_NULL(2);
void smtp_server_connection_terminate(struct smtp_server_connection **_conn, void smtp_server_connection_terminate(struct smtp_server_connection **_conn,
const char *enh_code, const char *reason) const char *enh_code, const char *reason)
ATTR_NULL(3); ATTR_NULL(3);
bool smtp_server_connection_data_check_state(struct smtp_server_cmd_ctx *cmd); bool smtp_server_connection_data_check_state(struct smtp_server_cmd_ctx *cmd);
void smtp_server_connection_data_chunk_init(struct smtp_server_cmd_ctx *cmd); void smtp_server_connection_data_chunk_init(struct smtp_server_cmd_ctx *cmd);
int smtp_server_connection_data_chunk_add(struct smtp_server_cmd_ctx *cmd, int smtp_server_connection_data_chunk_add(struct smtp_server_cmd_ctx *cmd,
struct istream *chunk, uoff_t chunk_size, bool chunk_last, struct istream *chunk,
bool client_input); uoff_t chunk_size, bool chunk_last,
bool client_input);
enum smtp_server_state enum smtp_server_state
smtp_server_connection_get_state(struct smtp_server_connection *conn, smtp_server_connection_get_state(struct smtp_server_connection *conn,
const char **args_r) ATTR_NULL(2); const char **args_r) ATTR_NULL(2);
const char * const char *
smtp_server_connection_get_security_string(struct smtp_server_connection *conn); smtp_server_connection_get_security_string(struct smtp_server_connection *conn);
struct smtp_server_transaction * struct smtp_server_transaction *
smtp_server_connection_get_transaction(struct smtp_server_connection *conn); smtp_server_connection_get_transaction(struct smtp_server_connection *conn);
const char * const char *
smtp_server_connection_get_transaction_id(struct smtp_server_connection *conn); smtp_server_connection_get_transaction_id(struct smtp_server_connection *conn);
const struct smtp_server_stats * const struct smtp_server_stats *
smtp_server_connection_get_stats(struct smtp_server_connection *conn); smtp_server_connection_get_stats(struct smtp_server_connection *conn);
void *smtp_server_connection_get_context(struct smtp_server_connection *conn) void *smtp_server_connection_get_context(struct smtp_server_connection *conn)
ATTR_PURE; ATTR_PURE;
enum smtp_protocol enum smtp_protocol
smtp_server_connection_get_protocol(struct smtp_server_connection *conn) smtp_server_connection_get_protocol(struct smtp_server_connection *conn)
ATTR_PURE; ATTR_PURE;
const char * const char *
smtp_server_connection_get_protocol_name(struct smtp_server_connection *conn); smtp_server_connection_get_protocol_name(struct smtp_server_connection *conn);
struct smtp_server_helo_data * struct smtp_server_helo_data *
smtp_server_connection_get_helo_data(struct smtp_server_connection *conn); smtp_server_connection_get_helo_data(struct smtp_server_connection *conn);
void smtp_server_connection_get_proxy_data(struct smtp_server_connection *conn, void smtp_server_connection_get_proxy_data(struct smtp_server_connection *conn,
struct smtp_proxy_data *proxy_data); struct smtp_proxy_data *proxy_data);
void smtp_server_connection_set_proxy_data(
struct smtp_server_connection *conn,
const struct smtp_proxy_data *proxy_data);
void smtp_server_connection_set_capabilities( void smtp_server_connection_set_capabilities(
struct smtp_server_connection *conn, enum smtp_capability capabilities); struct smtp_server_connection *conn, enum smtp_capability capabilities);
void smtp_server_connection_add_extra_capability( void smtp_server_connection_add_extra_capability(
struct smtp_server_connection *conn, struct smtp_server_connection *conn,
const struct smtp_capability_extra *cap); const struct smtp_capability_extra *cap);
void smtp_server_connection_register_mail_param( void smtp_server_connection_register_mail_param(
struct smtp_server_connection *conn, const char *param); struct smtp_server_connection *conn, const char *param);
void smtp_server_connection_register_rcpt_param( void smtp_server_connection_register_rcpt_param(
skipping to change at line 616 skipping to change at line 618
smtp_server_command_get_reply(struct smtp_server_command *cmd, smtp_server_command_get_reply(struct smtp_server_command *cmd,
unsigned int idx); unsigned int idx);
bool smtp_server_command_reply_status_equals(struct smtp_server_command *cmd, bool smtp_server_command_reply_status_equals(struct smtp_server_command *cmd,
unsigned int status); unsigned int status);
bool smtp_server_command_is_replied(struct smtp_server_command *cmd); bool smtp_server_command_is_replied(struct smtp_server_command *cmd);
bool smtp_server_command_reply_is_forwarded(struct smtp_server_command *cmd); bool smtp_server_command_reply_is_forwarded(struct smtp_server_command *cmd);
bool smtp_server_command_replied_success(struct smtp_server_command *cmd); bool smtp_server_command_replied_success(struct smtp_server_command *cmd);
void smtp_server_command_input_lock(struct smtp_server_cmd_ctx *cmd); void smtp_server_command_input_lock(struct smtp_server_cmd_ctx *cmd);
void smtp_server_command_input_unlock(struct smtp_server_cmd_ctx *cmd); void smtp_server_command_input_unlock(struct smtp_server_cmd_ctx *cmd);
void smtp_server_command_input_capture(struct smtp_server_cmd_ctx *cmd, void smtp_server_command_input_capture(
struct smtp_server_cmd_ctx *cmd,
smtp_server_cmd_input_callback_t *callback); smtp_server_cmd_input_callback_t *callback);
/* EHLO */ /* EHLO */
struct smtp_server_reply * struct smtp_server_reply *
smtp_server_cmd_ehlo_reply_create(struct smtp_server_cmd_ctx *cmd); smtp_server_cmd_ehlo_reply_create(struct smtp_server_cmd_ctx *cmd);
void smtp_server_cmd_ehlo_reply_default(struct smtp_server_cmd_ctx *cmd); void smtp_server_cmd_ehlo_reply_default(struct smtp_server_cmd_ctx *cmd);
/* AUTH */ /* AUTH */
void smtp_server_cmd_auth_send_challenge(struct smtp_server_cmd_ctx *cmd, void smtp_server_cmd_auth_send_challenge(struct smtp_server_cmd_ctx *cmd,
const char *challenge); const char *challenge);
void smtp_server_cmd_auth_success(struct smtp_server_cmd_ctx *cmd, void smtp_server_cmd_auth_success(struct smtp_server_cmd_ctx *cmd,
const char *username, const char *success_msg) const char *username, const char *success_msg)
ATTR_NULL(3); ATTR_NULL(3);
/* MAIL */ /* MAIL */
void smtp_server_cmd_mail_reply_success(struct smtp_server_cmd_ctx *cmd); void smtp_server_cmd_mail_reply_success(struct smtp_server_cmd_ctx *cmd);
/* RCPT */ /* RCPT */
bool smtp_server_command_is_rcpt(struct smtp_server_cmd_ctx *cmd); bool smtp_server_command_is_rcpt(struct smtp_server_cmd_ctx *cmd);
void smtp_server_cmd_rcpt_reply_success(struct smtp_server_cmd_ctx *cmd); void smtp_server_cmd_rcpt_reply_success(struct smtp_server_cmd_ctx *cmd);
skipping to change at line 664 skipping to change at line 667
/* NOOP */ /* NOOP */
void smtp_server_cmd_noop_reply_success(struct smtp_server_cmd_ctx *cmd); void smtp_server_cmd_noop_reply_success(struct smtp_server_cmd_ctx *cmd);
/* /*
* Reply * Reply
*/ */
struct smtp_server_reply * struct smtp_server_reply *
smtp_server_reply_create_index(struct smtp_server_command *cmd, smtp_server_reply_create_index(struct smtp_server_command *cmd,
unsigned int index, unsigned int status, const char *enh_code) unsigned int index, unsigned int status,
ATTR_NULL(3); const char *enh_code) ATTR_NULL(3);
struct smtp_server_reply * struct smtp_server_reply *
smtp_server_reply_create(struct smtp_server_command *cmd, smtp_server_reply_create(struct smtp_server_command *cmd, unsigned int status,
unsigned int status, const char *enh_code) ATTR_NULL(3); const char *enh_code) ATTR_NULL(3);
struct smtp_server_reply * struct smtp_server_reply *
smtp_server_reply_create_forward(struct smtp_server_command *cmd, smtp_server_reply_create_forward(struct smtp_server_command *cmd,
unsigned int index, const struct smtp_reply *from); unsigned int index,
const struct smtp_reply *from);
void smtp_server_reply_set_status(struct smtp_server_reply *reply, void smtp_server_reply_set_status(struct smtp_server_reply *reply,
unsigned int status, const char *enh_code) unsigned int status, const char *enh_code)
ATTR_NULL(3); ATTR_NULL(3);
unsigned int smtp_server_reply_get_status(struct smtp_server_reply *reply, unsigned int smtp_server_reply_get_status(struct smtp_server_reply *reply,
const char **enh_code_r) ATTR_NULL(3); const char **enh_code_r) ATTR_NULL(3);
void smtp_server_reply_add_text(struct smtp_server_reply *reply, void smtp_server_reply_add_text(struct smtp_server_reply *reply,
const char *line); const char *line);
void smtp_server_reply_prepend_text(struct smtp_server_reply *reply, void smtp_server_reply_prepend_text(struct smtp_server_reply *reply,
const char *text_prefix); const char *text_prefix);
void smtp_server_reply_replace_path(struct smtp_server_reply *reply, void smtp_server_reply_replace_path(struct smtp_server_reply *reply,
struct smtp_address *path, bool add); struct smtp_address *path, bool add);
void smtp_server_reply_submit(struct smtp_server_reply *reply); void smtp_server_reply_submit(struct smtp_server_reply *reply);
void smtp_server_reply_submit_duplicate(struct smtp_server_cmd_ctx *_cmd, void smtp_server_reply_submit_duplicate(struct smtp_server_cmd_ctx *_cmd,
unsigned int index, unsigned int index,
unsigned int from_index); unsigned int from_index);
/* Submit a reply for the command at the specified index (> 0 only if more than /* Submit a reply for the command at the specified index (> 0 only if more than
a single reply is expected). */ a single reply is expected). */
void smtp_server_reply_indexv(struct smtp_server_cmd_ctx *_cmd, void smtp_server_reply_indexv(struct smtp_server_cmd_ctx *_cmd,
unsigned int index, unsigned int status, const char *enh_code, unsigned int index, unsigned int status,
const char *fmt, va_list args) ATTR_FORMAT(5, 0); const char *enh_code,
const char *fmt, va_list args) ATTR_FORMAT(5, 0);
void smtp_server_reply_index(struct smtp_server_cmd_ctx *_cmd, void smtp_server_reply_index(struct smtp_server_cmd_ctx *_cmd,
unsigned int index, unsigned int status, const char *enh_code, unsigned int index, unsigned int status,
const char *fmt, ...) ATTR_FORMAT(5, 6); const char *enh_code, const char *fmt, ...)
ATTR_FORMAT(5, 6);
/* Submit the reply for the specified command. */ /* Submit the reply for the specified command. */
void smtp_server_reply(struct smtp_server_cmd_ctx *_cmd, void smtp_server_reply(struct smtp_server_cmd_ctx *_cmd, unsigned int status,
unsigned int status, const char *enh_code, const char *fmt, ...) const char *enh_code, const char *fmt, ...)
ATTR_FORMAT(4, 5); ATTR_FORMAT(4, 5);
/* Forward a reply for the command at the specified index (> 0 only if more /* Forward a reply for the command at the specified index (> 0 only if more
than a single reply is expected). */ than a single reply is expected). */
void smtp_server_reply_index_forward(struct smtp_server_cmd_ctx *cmd, void smtp_server_reply_index_forward(struct smtp_server_cmd_ctx *cmd,
unsigned int index, const struct smtp_reply *from); unsigned int index,
const struct smtp_reply *from);
/* Forward the reply for the specified command. */ /* Forward the reply for the specified command. */
void smtp_server_reply_forward(struct smtp_server_cmd_ctx *cmd, void smtp_server_reply_forward(struct smtp_server_cmd_ctx *cmd,
const struct smtp_reply *from); const struct smtp_reply *from);
/* Submit the same message for all expected replies for this command. */ /* Submit the same message for all expected replies for this command. */
void smtp_server_reply_all(struct smtp_server_cmd_ctx *_cmd, void smtp_server_reply_all(struct smtp_server_cmd_ctx *_cmd,
unsigned int status, const char *enh_code, unsigned int status, const char *enh_code,
const char *fmt, ...) ATTR_FORMAT(4, 5); const char *fmt, ...) ATTR_FORMAT(4, 5);
/* Submit and send the same message for all expected replies for this command /* Submit and send the same message for all expected replies for this command
early; i.e., no matter whether all command data is received completely. */ early; i.e., no matter whether all command data is received completely. */
void smtp_server_reply_early(struct smtp_server_cmd_ctx *_cmd, void smtp_server_reply_early(struct smtp_server_cmd_ctx *_cmd,
skipping to change at line 732 skipping to change at line 739
bool smtp_server_reply_is_success(const struct smtp_server_reply *reply); bool smtp_server_reply_is_success(const struct smtp_server_reply *reply);
/* EHLO */ /* EHLO */
struct smtp_server_reply * struct smtp_server_reply *
smtp_server_reply_create_ehlo(struct smtp_server_command *cmd); smtp_server_reply_create_ehlo(struct smtp_server_command *cmd);
void smtp_server_reply_ehlo_add(struct smtp_server_reply *reply, void smtp_server_reply_ehlo_add(struct smtp_server_reply *reply,
const char *keyword); const char *keyword);
void smtp_server_reply_ehlo_add_param(struct smtp_server_reply *reply, void smtp_server_reply_ehlo_add_param(struct smtp_server_reply *reply,
const char *keyword, const char *param_fmt, ...) ATTR_FORMAT(3, 4); const char *keyword,
const char *param_fmt, ...)
ATTR_FORMAT(3, 4);
void smtp_server_reply_ehlo_add_params(struct smtp_server_reply *reply, void smtp_server_reply_ehlo_add_params(struct smtp_server_reply *reply,
const char *keyword, const char *keyword,
const char *const *params) ATTR_NULL(3); const char *const *params) ATTR_NULL(3);
void smtp_server_reply_ehlo_add_8bitmime(struct smtp_server_reply *reply); void smtp_server_reply_ehlo_add_8bitmime(struct smtp_server_reply *reply);
void smtp_server_reply_ehlo_add_binarymime(struct smtp_server_reply *reply); void smtp_server_reply_ehlo_add_binarymime(struct smtp_server_reply *reply);
void smtp_server_reply_ehlo_add_chunking(struct smtp_server_reply *reply); void smtp_server_reply_ehlo_add_chunking(struct smtp_server_reply *reply);
void smtp_server_reply_ehlo_add_dsn(struct smtp_server_reply *reply); void smtp_server_reply_ehlo_add_dsn(struct smtp_server_reply *reply);
void smtp_server_reply_ehlo_add_enhancedstatuscodes( void smtp_server_reply_ehlo_add_enhancedstatuscodes(
struct smtp_server_reply *reply); struct smtp_server_reply *reply);
 End of changes. 39 change blocks. 
75 lines changed or deleted 84 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)