/* Copyright (c) 2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
+#include "array.h"
#include "smtp-server.h"
#include "lmtp-recipient.h"
+struct lmtp_recipient_module_register
+lmtp_recipient_module_register = { 0 };
+
struct lmtp_recipient *
lmtp_recipient_create(struct client *client,
struct smtp_server_recipient *rcpt)
rcpt->context = lrcpt;
+ p_array_init(&lrcpt->module_contexts, rcpt->pool, 5);
+
return lrcpt;
}
struct smtp_server_cmd_ctx;
struct smtp_server_cmd_rcpt;
struct smtp_server_recipient;
+union lmtp_recipient_module_context;
struct client;
enum lmtp_recipient_type {
enum lmtp_recipient_type type;
void *backend_context;
+
+ /* Module-specific contexts. */
+ ARRAY(union lmtp_recipient_module_context *) module_contexts;
+};
+
+struct lmtp_recipient_module_register {
+ unsigned int id;
+};
+
+union lmtp_recipient_module_context {
+ struct lmtp_recipient_module_register *reg;
};
+extern struct lmtp_recipient_module_register lmtp_recipient_module_register;
struct lmtp_recipient *
lmtp_recipient_create(struct client *client,