Mercurial > dovecot > core-2.2
annotate 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 <timo.sirainen@dovecot.fi> |
---|---|
date | Sun, 05 Nov 2017 23:51:56 +0200 |
parents | bf2dbc8ec74b |
children |
rev | line source |
---|---|
9092
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
1 #ifndef SMTP_CLIENT_H |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
2 #define SMTP_CLIENT_H |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
3 |
14629
c93ca5e46a8a
Marked functions parameters that are allowed to be NULL. Some APIs were also changed.
Timo Sirainen <tss@iki.fi>
parents:
14225
diff
changeset
|
4 struct smtp_client * ATTR_NULL(3) |
17285
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
5 smtp_client_init(const struct lda_settings *set, const char *return_path); |
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
6 /* Add a new recipient */ |
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
7 void smtp_client_add_rcpt(struct smtp_client *client, const char *address); |
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
8 /* Get an output stream where the message can be written to. The recipients |
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
9 must already be added before calling this. */ |
605df40b0aef
lib-lda: More smtp-client.h API changes to support multiple destination addresses.
Timo Sirainen <tss@iki.fi>
parents:
17266
diff
changeset
|
10 struct ostream *smtp_client_send(struct smtp_client *client); |
17916
90fbf199ebda
lib-lda: Added smtp_client_abort()
Timo Sirainen <tss@iki.fi>
parents:
17358
diff
changeset
|
11 void smtp_client_abort(struct smtp_client **client); |
17266
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
12 /* Returns 1 on success, 0 on permanent failure (e.g. invalid destination), |
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
13 -1 on temporary failure. */ |
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
14 int smtp_client_deinit(struct smtp_client *client, const char **error_r); |
18302
bf2dbc8ec74b
lib-lda: Added smtp_client_deinit_timeout() to give a session timeout.
Timo Sirainen <tss@iki.fi>
parents:
17916
diff
changeset
|
15 /* Same as smtp_client_deinit(), but timeout after given number of seconds. */ |
bf2dbc8ec74b
lib-lda: Added smtp_client_deinit_timeout() to give a session timeout.
Timo Sirainen <tss@iki.fi>
parents:
17916
diff
changeset
|
16 int smtp_client_deinit_timeout(struct smtp_client *client, |
bf2dbc8ec74b
lib-lda: Added smtp_client_deinit_timeout() to give a session timeout.
Timo Sirainen <tss@iki.fi>
parents:
17916
diff
changeset
|
17 unsigned int timeout_secs, const char **error_r); |
17266
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
18 |
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
19 /* FIXME: obsolete API, remove in v2.3: */ |
0f9ce0073c8d
lib-lda: Added new smtp_client_init/deinit() APIs
Timo Sirainen <tss@iki.fi>
parents:
14629
diff
changeset
|
20 struct smtp_client * ATTR_NULL(3) |
9805
882a0a6cc92e
smtp_client_open() API changed to take lda_settings instead of mail_deliver_context.
Timo Sirainen <tss@iki.fi>
parents:
9092
diff
changeset
|
21 smtp_client_open(const struct lda_settings *set, const char *destination, |
14225
e915b7e734e7
lib-lda: smtp_client_open() API changed to return struct ostream, not FILE.
Timo Sirainen <tss@iki.fi>
parents:
9805
diff
changeset
|
22 const char *return_path, struct ostream **output_r); |
9092
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
23 /* Returns sysexits-compatible return value */ |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
24 int smtp_client_close(struct smtp_client *client); |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
25 |
e4832f128738
Renamed deliver to dovecot-lda and moved most of its code to lib-lda.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
26 #endif |