1 #ifndef LMTP_RECIPIENT_H 2 #define LMTP_RECIPIENT_H 3 4 struct smtp_address; 5 struct smtp_server_cmd_ctx; 6 struct smtp_server_cmd_rcpt; 7 struct smtp_server_recipient; 8 union lmtp_recipient_module_context; 9 struct client; 10 11 enum lmtp_recipient_type { 12 LMTP_RECIPIENT_TYPE_LOCAL, 13 LMTP_RECIPIENT_TYPE_PROXY, 14 }; 15 16 struct lmtp_recipient { 17 struct client *client; 18 struct smtp_server_recipient *rcpt; 19 20 enum lmtp_recipient_type type; 21 void *backend_context; 22 23 const char *forward_fields; 24 25 /* Module-specific contexts. */ 26 ARRAY(union lmtp_recipient_module_context *) module_contexts; 27 }; 28 29 struct lmtp_recipient_module_register { 30 unsigned int id; 31 }; 32 33 union lmtp_recipient_module_context { 34 struct lmtp_recipient_module_register *reg; 35 }; 36 extern struct lmtp_recipient_module_register lmtp_recipient_module_register; 37 38 struct lmtp_recipient * 39 lmtp_recipient_create(struct client *client, 40 struct smtp_server_recipient *rcpt); 41 42 struct lmtp_recipient * 43 lmtp_recipient_find_duplicate(struct lmtp_recipient *lrcpt, 44 struct smtp_server_transaction *trans); 45 46 #endif 47