summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_task.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-17 16:32:27 +0100
committerGitHub <noreply@github.com>2020-04-17 16:32:27 +0100
commit892383a5a2fe19a4da4ad7862e087eed3618d11d (patch)
tree49f18791f571e8aebb787ab3dd3779bfe51d7763 /src/lua/lua_task.c
parentbdb0a5283582c205603593256c241558221653ab (diff)
parentacefdbe25a8d11ec81030724cb07474dc332ea68 (diff)
downloadrspamd-892383a5a2fe19a4da4ad7862e087eed3618d11d.tar.gz
rspamd-892383a5a2fe19a4da4ad7862e087eed3618d11d.zip
Merge pull request #3341 from jendis/fix_lua_api
[Minor] Improve lua api
Diffstat (limited to 'src/lua/lua_task.c')
-rw-r--r--src/lua/lua_task.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 3ad1aa3db..f36e51824 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -519,6 +519,14 @@ LUA_FUNCTION_DEF (task, has_from);
* - `addr` - address part of the address
* - `user` - user part (if present) of the address, e.g. `blah`
* - `domain` - domain part (if present), e.g. `foo.com`
+ * - `flags` - table with following keys set to true if given condition fulfilled:
+ * - [valid] - valid SMTP address in conformity with https://tools.ietf.org/html/rfc5321#section-4.1.
+ * - [ip] - domain is IPv4/IPv6 address
+ * - [braced] - angled `<blah@foo.com>` address
+ * - [quoted] - quoted user part
+ * - [empty] - empty address
+ * - [backslash] - user part contains backslash
+ * - [8bit] - contains 8bit characters
* @param {integer|string} type if specified has the following meaning: `0` or `any` means try SMTP sender and fallback to MIME if failed, `1` or `smtp` means checking merely SMTP sender and `2` or `mime` means MIME `From:` only
* @return {address} sender or `nil`
*/