struct client *client = cmd_helo->client;
struct smtp_reply reply;
- client->pending_helo = NULL;
-
if (!client_command_handle_proxy_reply(client, proxy_reply, &reply))
return;
helo->data = data;
cmd->context = helo;
- if (!client_proxy_is_ready(client)) {
- if (client_proxy_is_disconnected(client)) {
- /* proxy connection died already */
- client_destroy(client,
- t_strdup_printf("421 %s", client->set->hostname),
- "Lost connection to relay server");
- return -1;
- }
-
- if (client->pending_helo == NULL)
- client->pending_helo = cmd;
-
- /* wait for proxy to become ready */
- return 0;
- }
-
if (!data->first || smtp_server_connection_get_state(client->conn)
>= SMTP_SERVER_STATE_READY) {
/* this is not the first HELO/EHLO; just proxy a RSET command */
return 1;
}
-void client_handshake(struct client *client)
-{
- struct smtp_server_cmd_ctx *cmd;
-
- if (client->pending_helo == NULL)
- return;
- cmd = client->pending_helo;
- client->pending_helo = NULL;
-
- /* continue EHLO/HELO response */
- cmd_helo_reply(cmd);
-}
struct smtp_server_connection *conn;
enum smtp_server_state last_state;
struct client_state state;
- struct smtp_server_cmd_ctx *pending_helo;
struct mail_storage_service_user *service_user;
struct mail_user *user;