view src/lib-lda/smtp-client.h @ 22656:1789bf2a1e01

director: Make sure HOST-RESET-USERS isn't used with max_moving_users=0 The reset command would just hang in that case. doveadm would never have sent this, so this is just an extra sanity check.
author Timo Sirainen <>
date Sun, 05 Nov 2017 23:51:56 +0200
parents bf2dbc8ec74b
line wrap: on
line source


struct smtp_client * ATTR_NULL(3)
smtp_client_init(const struct lda_settings *set, const char *return_path);
/* Add a new recipient */
void smtp_client_add_rcpt(struct smtp_client *client, const char *address);
/* Get an output stream where the message can be written to. The recipients
   must already be added before calling this. */
struct ostream *smtp_client_send(struct smtp_client *client);
void smtp_client_abort(struct smtp_client **client);
/* Returns 1 on success, 0 on permanent failure (e.g. invalid destination),
   -1 on temporary failure. */
int smtp_client_deinit(struct smtp_client *client, const char **error_r);
/* Same as smtp_client_deinit(), but timeout after given number of seconds. */
int smtp_client_deinit_timeout(struct smtp_client *client,
			       unsigned int timeout_secs, const char **error_r);

/* FIXME: obsolete API, remove in v2.3: */
struct smtp_client * ATTR_NULL(3)
smtp_client_open(const struct lda_settings *set, const char *destination,
		 const char *return_path, struct ostream **output_r);
/* Returns sysexits-compatible return value */
int smtp_client_close(struct smtp_client *client);