diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/submission/submission-backend-relay.h | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/submission/submission-backend-relay.h')
-rw-r--r-- | src/submission/submission-backend-relay.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/submission/submission-backend-relay.h b/src/submission/submission-backend-relay.h new file mode 100644 index 0000000..82a600a --- /dev/null +++ b/src/submission/submission-backend-relay.h @@ -0,0 +1,64 @@ +#ifndef SUBMISSION_BACKEND_RELAY_H +#define SUBMISSION_BACKEND_RELAY_H + +#include "smtp-client-connection.h" +#include "smtp-client-transaction.h" + +#include "submission-backend.h" + +struct client; +struct submission_backend_relay; + +struct submision_backend_relay_settings { + const char *my_hostname; + + enum smtp_protocol protocol; + const char *path, *host; + struct ip_addr ip; /* if empty, resolve host */ + in_port_t port; + + const char *const *extra_capabilities; + + const char *user, *master_user; + const char *password; + const struct dsasl_client_mech *sasl_mech; + + enum smtp_client_connection_ssl_mode ssl_mode; + + const char *rawlog_dir; + unsigned int max_idle_time; + + unsigned int connect_timeout_msecs; + unsigned int command_timeout_msecs; + + bool ssl_verify:1; + bool trusted:1; +}; + +struct submission_backend_relay * +submission_backend_relay_create( + struct client *client, + const struct submision_backend_relay_settings *set); + +/* Returns the base backend object for this relay backend */ +struct submission_backend * +submission_backend_relay_get(struct submission_backend_relay *backend) + ATTR_PURE; + +/* Returns the client connection for this relay backend */ +struct smtp_client_connection * +submission_backend_relay_get_connection( + struct submission_backend_relay *backend) ATTR_PURE; +/* Returns the current client transaction for this relay backend */ +struct smtp_client_transaction * +submission_backend_relay_get_transaction( + struct submission_backend_relay *backend) ATTR_PURE; + +/* Initializes the client transaction manually, which allows providing + alternative transaction flags. */ +struct smtp_client_transaction * +submission_backend_relay_init_transaction( + struct submission_backend_relay *backend, + enum smtp_client_transaction_flags flags); + +#endif |