From d79fdd8a405ddc495fa1245cc9c22ec119f7787d Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 5 Oct 2021 12:13:21 +0100 Subject: [Project] Finish received headers rework part --- src/libmime/received.h | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) (limited to 'src/libmime/received.h') diff --git a/src/libmime/received.h b/src/libmime/received.h index 845bf4357..14f9f848b 100644 --- a/src/libmime/received.h +++ b/src/libmime/received.h @@ -28,35 +28,6 @@ extern "C" { * C bindings for C++ received code */ -enum rspamd_received_type { - RSPAMD_RECEIVED_SMTP = 1u << 0u, - RSPAMD_RECEIVED_ESMTP = 1u << 1u, - RSPAMD_RECEIVED_ESMTPA = 1u << 2u, - RSPAMD_RECEIVED_ESMTPS = 1u << 3u, - RSPAMD_RECEIVED_ESMTPSA = 1u << 4u, - RSPAMD_RECEIVED_LMTP = 1u << 5u, - RSPAMD_RECEIVED_IMAP = 1u << 6u, - RSPAMD_RECEIVED_LOCAL = 1u << 7u, - RSPAMD_RECEIVED_HTTP = 1u << 8u, - RSPAMD_RECEIVED_MAPI = 1u << 9u, - RSPAMD_RECEIVED_UNKNOWN = 1u << 10u, - RSPAMD_RECEIVED_FLAG_ARTIFICIAL = (1u << 11u), - RSPAMD_RECEIVED_FLAG_SSL = (1u << 12u), - RSPAMD_RECEIVED_FLAG_AUTHENTICATED = (1u << 13u), -}; - -#define RSPAMD_RECEIVED_FLAG_TYPE_MASK (RSPAMD_RECEIVED_SMTP| \ - RSPAMD_RECEIVED_ESMTP| \ - RSPAMD_RECEIVED_ESMTPA| \ - RSPAMD_RECEIVED_ESMTPS| \ - RSPAMD_RECEIVED_ESMTPSA| \ - RSPAMD_RECEIVED_LMTP| \ - RSPAMD_RECEIVED_IMAP| \ - RSPAMD_RECEIVED_LOCAL| \ - RSPAMD_RECEIVED_HTTP| \ - RSPAMD_RECEIVED_MAPI| \ - RSPAMD_RECEIVED_UNKNOWN) - struct rspamd_email_address; struct rspamd_received_header_chain; struct rspamd_mime_header; @@ -80,6 +51,15 @@ bool rspamd_received_header_parse(struct rspamd_task *task, */ bool rspamd_received_maybe_fix_task(struct rspamd_task *task); +struct lua_State; +/** + * Push received headers chain to lua + * @param task + * @param L + * @return + */ +bool rspamd_received_export_to_lua(struct rspamd_task *task, struct lua_State *L); + #ifdef __cplusplus } #endif -- cgit v1.2.3