diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-03-10 12:26:49 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-03-10 12:26:49 +0200 |
commit | 19efe151cc19ee4d4a59035e7abb9ba991c24ee2 (patch) | |
tree | e40ce3a11fe9b92b7e01434cd4b23e9b4c235761 /src | |
parent | 6d85b9ad383ee57d24457b12231aede3f3d88e80 (diff) | |
download | rspamd-19efe151cc19ee4d4a59035e7abb9ba991c24ee2.tar.gz rspamd-19efe151cc19ee4d4a59035e7abb9ba991c24ee2.zip |
[Minor] Metadata exporter: fallback to some default settings
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/metadata_exporter.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/metadata_exporter.lua b/src/plugins/lua/metadata_exporter.lua index c8717bc5d..22fb887bd 100644 --- a/src/plugins/lua/metadata_exporter.lua +++ b/src/plugins/lua/metadata_exporter.lua @@ -238,7 +238,7 @@ local pushers = { url=rule.url, body=formatted, callback=http_callback, - mime_type=rule.mime_type, + mime_type=rule.mime_type or settings.mime_type, headers=hdrs, }) end, @@ -327,7 +327,7 @@ local pushers = { end local function hello_done_cb(merr, mdata) if no_error(merr, mdata) then - conn:add_write(from_cb, {'MAIL FROM: <', rule.mail_from, '>\r\n'}) + conn:add_write(from_cb, {'MAIL FROM: <', rule.mail_from or settings.mail_from, '>\r\n'}) end end local function hello_cb(merr) @@ -336,7 +336,7 @@ local pushers = { end end if no_error(err, data) then - conn:add_write(hello_cb, {'HELO ', rule.helo, '\r\n'}) + conn:add_write(hello_cb, {'HELO ', rule.helo or settings.helo, '\r\n'}) end end rspamd_tcp.request({ @@ -344,7 +344,7 @@ local pushers = { callback = mail_cb, stop_pattern = '\r\n', host = rule.smtp, - port = rule.smtp_port or 25, + port = rule.smtp_port or settings.smtp_port or 25, }) end, } |