bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch#ifndef CLIENT_H
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch#define CLIENT_H
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch#include "net.h"
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch#include "client-common.h"
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch#include "auth-client.h"
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch#include "smtp-server.h"
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Boschenum submission_proxy_state {
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch SUBMISSION_PROXY_BANNER = 0,
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch SUBMISSION_PROXY_EHLO,
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch SUBMISSION_PROXY_STARTTLS,
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch SUBMISSION_PROXY_TLS_EHLO,
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch SUBMISSION_PROXY_XCLIENT,
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch SUBMISSION_PROXY_AUTHENTICATE,
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch SUBMISSION_PROXY_STATE_COUNT
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch};
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Boschstruct submission_client {
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch struct client common;
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch const struct submission_login_settings *set;
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch struct smtp_server_connection *conn;
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch struct smtp_server_cmd_ctx *pending_auth, *pending_starttls;
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch enum submission_proxy_state proxy_state;
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch enum smtp_capability proxy_capability;
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch unsigned int proxy_reply_status;
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch struct smtp_server_reply *proxy_reply;
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch const char **proxy_xclient;
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch};
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch#endif
56dd928c164ec5c0d1158a1760154b58c5f1f6e7Stephan Bosch