aboutsummaryrefslogtreecommitdiffstats
path: root/src/smtp_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-27 12:58:23 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-27 13:10:40 +0000
commit19f28d85479e4d0e97d15f8ad05890c01fd033f3 (patch)
tree872e6e6ae0ee02bd76a2e36107e5f0b1893c582b /src/smtp_proxy.c
parent424ac722959351c8332e185e36fb7daddff24faf (diff)
downloadrspamd-19f28d85479e4d0e97d15f8ad05890c01fd033f3.tar.gz
rspamd-19f28d85479e4d0e97d15f8ad05890c01fd033f3.zip
Add ability to insert documentation strings
Issue: #461
Diffstat (limited to 'src/smtp_proxy.c')
-rw-r--r--src/smtp_proxy.c110
1 files changed, 75 insertions, 35 deletions
diff --git a/src/smtp_proxy.c b/src/smtp_proxy.c
index 9c5364f1e..ff4a9f553 100644
--- a/src/smtp_proxy.c
+++ b/src/smtp_proxy.c
@@ -984,41 +984,81 @@ init_smtp_proxy (struct rspamd_config *cfg)
ctx->smtp_delay = 0;
ctx->instant_reject = TRUE;
- rspamd_rcl_register_worker_option (cfg, type, "upstreams",
- rspamd_rcl_parse_struct_string, ctx,
- G_STRUCT_OFFSET (struct smtp_proxy_ctx, upstreams_str), 0);
-
- rspamd_rcl_register_worker_option (cfg, type, "timeout",
- rspamd_rcl_parse_struct_time, ctx,
- G_STRUCT_OFFSET (struct smtp_proxy_ctx,
- smtp_timeout_raw), RSPAMD_CL_FLAG_TIME_UINT_32);
-
- rspamd_rcl_register_worker_option (cfg, type, "delay",
- rspamd_rcl_parse_struct_time, ctx,
- G_STRUCT_OFFSET (struct smtp_proxy_ctx,
- smtp_delay), RSPAMD_CL_FLAG_TIME_UINT_32);
-
- rspamd_rcl_register_worker_option (cfg, type, "jitter",
- rspamd_rcl_parse_struct_time, ctx,
- G_STRUCT_OFFSET (struct smtp_proxy_ctx,
- delay_jitter), RSPAMD_CL_FLAG_TIME_UINT_32);
-
- rspamd_rcl_register_worker_option (cfg, type, "xclient",
- rspamd_rcl_parse_struct_boolean, ctx,
- G_STRUCT_OFFSET (struct smtp_proxy_ctx, use_xclient), 0);
-
- rspamd_rcl_register_worker_option (cfg, type, "instant_reject",
- rspamd_rcl_parse_struct_boolean, ctx,
- G_STRUCT_OFFSET (struct smtp_proxy_ctx, instant_reject), 0);
-
- rspamd_rcl_register_worker_option (cfg, type, "proxy_buffer",
- rspamd_rcl_parse_struct_integer, ctx,
- G_STRUCT_OFFSET (struct smtp_proxy_ctx,
- proxy_buf_len), RSPAMD_CL_FLAG_INT_32);
-
- rspamd_rcl_register_worker_option (cfg, type, "dnsbl",
- rspamd_rcl_parse_struct_string_list, ctx,
- G_STRUCT_OFFSET (struct smtp_proxy_ctx, rbls), 0);
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "upstreams",
+ rspamd_rcl_parse_struct_string,
+ ctx,
+ G_STRUCT_OFFSET (struct smtp_proxy_ctx, upstreams_str),
+ 0,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "timeout",
+ rspamd_rcl_parse_struct_time,
+ ctx,
+ G_STRUCT_OFFSET (struct smtp_proxy_ctx,
+ smtp_timeout_raw),
+ RSPAMD_CL_FLAG_TIME_UINT_32,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "delay",
+ rspamd_rcl_parse_struct_time,
+ ctx,
+ G_STRUCT_OFFSET (struct smtp_proxy_ctx,
+ smtp_delay),
+ RSPAMD_CL_FLAG_TIME_UINT_32,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "jitter",
+ rspamd_rcl_parse_struct_time,
+ ctx,
+ G_STRUCT_OFFSET (struct smtp_proxy_ctx,
+ delay_jitter),
+ RSPAMD_CL_FLAG_TIME_UINT_32,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "xclient",
+ rspamd_rcl_parse_struct_boolean,
+ ctx,
+ G_STRUCT_OFFSET (struct smtp_proxy_ctx, use_xclient),
+ 0,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "instant_reject",
+ rspamd_rcl_parse_struct_boolean,
+ ctx,
+ G_STRUCT_OFFSET (struct smtp_proxy_ctx, instant_reject),
+ 0,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "proxy_buffer",
+ rspamd_rcl_parse_struct_integer,
+ ctx,
+ G_STRUCT_OFFSET (struct smtp_proxy_ctx,
+ proxy_buf_len),
+ RSPAMD_CL_FLAG_INT_32,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "dnsbl",
+ rspamd_rcl_parse_struct_string_list,
+ ctx,
+ G_STRUCT_OFFSET (struct smtp_proxy_ctx, rbls),
+ 0,
+ NULL);
return ctx;
}