lmtp-proxy.h revision 11bb1153a62c952a080b2ba6950477c328b06235
#ifndef LMTP_PROXY_H
#define LMTP_PROXY_H
#include "net.h"
#include "smtp-address.h"
#include "smtp-params.h"
#include "smtp-client.h"
#define LMTP_PROXY_DEFAULT_TTL 5
struct smtp_address;
struct lmtp_proxy;
struct client;
struct lmtp_proxy_settings {
const char *my_hostname;
const char *session_id;
unsigned int proxy_ttl;
};
struct lmtp_proxy_rcpt_settings {
enum smtp_protocol protocol;
const char *host;
unsigned int timeout_msecs;
struct smtp_params_rcpt params;
};
typedef void lmtp_proxy_finish_callback_t(void *context);
/* Add a new recipient. Returns -1 if we already know that the destination
host can't be reached. */
const struct smtp_address *address,
const struct lmtp_proxy_rcpt_settings *set);
struct smtp_address *address,
struct smtp_params_rcpt *params);
/* Start proxying */
ATTR_NULL(3);
#endif