smtp_server_recipient_unref(_rcpt);
}
+const struct smtp_address *
+smtp_server_recipient_get_original(struct smtp_server_recipient *rcpt)
+{
+ if (rcpt->params.orcpt.addr == NULL)
+ return rcpt->path;
+ return rcpt->params.orcpt.addr;
+}
+
bool smtp_server_recipient_approved(struct smtp_server_recipient **_rcpt)
{
struct smtp_server_recipient *rcpt = *_rcpt;
};
ARRAY_DEFINE_TYPE(smtp_server_recipient, struct smtp_server_recipient *);
+/* Returns the original recipient path if available. Otherwise, it returns the
+ final path. */
+const struct smtp_address *
+smtp_server_recipient_get_original(struct smtp_server_recipient *rcpt);
+
struct smtp_server_reply *
smtp_server_recipient_get_reply(struct smtp_server_recipient *rcpt);
bool smtp_server_recipient_is_replied(struct smtp_server_recipient *rcpt);