diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-29 18:06:25 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-29 18:06:25 +0000 |
commit | 49df9c2db6ec9b211cbcc651c98024a702f7d25b (patch) | |
tree | 97ef9d796079d5fbee6c0426e16a7161215da4c5 | |
parent | d80d4e366703ed35b87c30e554781058b296095b (diff) | |
download | rspamd-49df9c2db6ec9b211cbcc651c98024a702f7d25b.tar.gz rspamd-49df9c2db6ec9b211cbcc651c98024a702f7d25b.zip |
Add documentation for all workers' options
-rw-r--r-- | src/controller.c | 20 | ||||
-rw-r--r-- | src/fuzzy_storage.c | 23 | ||||
-rw-r--r-- | src/hs_helper.c | 4 | ||||
-rw-r--r-- | src/http_proxy.c | 9 | ||||
-rw-r--r-- | src/lua_worker.c | 2 | ||||
-rw-r--r-- | src/smtp_proxy.c | 16 | ||||
-rw-r--r-- | src/worker.c | 18 |
7 files changed, 49 insertions, 43 deletions
diff --git a/src/controller.c b/src/controller.c index 0f3b66090..aa90fc8b6 100644 --- a/src/controller.c +++ b/src/controller.c @@ -2270,7 +2270,7 @@ init_controller_worker (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, password), 0, - NULL); + "Password for read-only commands"); rspamd_rcl_register_worker_option (cfg, type, @@ -2280,7 +2280,7 @@ init_controller_worker (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, enable_password), 0, - NULL); + "Password for read and write commands"); rspamd_rcl_register_worker_option (cfg, type, @@ -2289,7 +2289,7 @@ init_controller_worker (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, use_ssl), 0, - NULL); + "Unimplemented"); rspamd_rcl_register_worker_option (cfg, type, @@ -2298,7 +2298,7 @@ init_controller_worker (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, ssl_cert), 0, - NULL); + "Unimplemented"); rspamd_rcl_register_worker_option (cfg, type, @@ -2307,7 +2307,7 @@ init_controller_worker (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, ssl_key), 0, - NULL); + "Unimplemented"); rspamd_rcl_register_worker_option (cfg, type, "timeout", @@ -2316,7 +2316,7 @@ init_controller_worker (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, timeout), RSPAMD_CL_FLAG_TIME_INTEGER, - NULL); + "Protocol timeout"); rspamd_rcl_register_worker_option (cfg, type, @@ -2325,7 +2325,7 @@ init_controller_worker (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, secure_ip), 0, - NULL); + "List of IP addresses that are allowed for password-less access"); rspamd_rcl_register_worker_option (cfg, type, @@ -2335,7 +2335,7 @@ init_controller_worker (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, static_files_dir), 0, - NULL); + "Directory for static files served by controller's HTTP server"); rspamd_rcl_register_worker_option (cfg, type, @@ -2345,7 +2345,7 @@ init_controller_worker (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, key), 0, - NULL); + "Encryption keypair"); rspamd_rcl_register_worker_option (cfg, type, @@ -2355,7 +2355,7 @@ init_controller_worker (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, saved_stats_path), 0, - NULL); + "Directory where controller saves server's statistics between restarts"); return ctx; } diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 8e84ddea7..4404f0b82 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -1143,7 +1143,7 @@ init_fuzzy (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, hashfile), 0, - NULL); + "Path to fuzzy database"); rspamd_rcl_register_worker_option (cfg, type, @@ -1152,7 +1152,7 @@ init_fuzzy (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, hashfile), 0, - NULL); + "Path to fuzzy database (alias for hashfile)"); rspamd_rcl_register_worker_option (cfg, type, @@ -1161,7 +1161,7 @@ init_fuzzy (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, hashfile), 0, - NULL); + "Path to fuzzy database (alias for hashfile)"); rspamd_rcl_register_worker_option (cfg, type, @@ -1170,7 +1170,7 @@ init_fuzzy (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, hashfile), 0, - NULL); + "Path to fuzzy database (alias for hashfile)"); rspamd_rcl_register_worker_option (cfg, type, @@ -1180,7 +1180,8 @@ init_fuzzy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, sync_timeout), RSPAMD_CL_FLAG_TIME_FLOAT, - NULL); + "Time to perform database sync, default: " + G_STRINGIFY (DEFAULT_SYNC_TIMEOUT) " seconds"); rspamd_rcl_register_worker_option (cfg, type, @@ -1190,7 +1191,8 @@ init_fuzzy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, expire), RSPAMD_CL_FLAG_TIME_FLOAT, - NULL); + "Default expire time for hashes, default: " + G_STRINGIFY (DEFAULT_EXPIRE) " seconds"); rspamd_rcl_register_worker_option (cfg, type, @@ -1199,7 +1201,7 @@ init_fuzzy (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, update_map), 0, - NULL); + "Allow modifications from the following IP addresses"); rspamd_rcl_register_worker_option (cfg, type, @@ -1208,7 +1210,7 @@ init_fuzzy (struct rspamd_config *cfg) ctx, 0, RSPAMD_CL_FLAG_MULTIPLE, - NULL); + "Encryption keypair (can be repeated for different keys)"); rspamd_rcl_register_worker_option (cfg, type, @@ -1218,7 +1220,8 @@ init_fuzzy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, keypair_cache_size), RSPAMD_CL_FLAG_UINT, - NULL); + "Size of keypairs cache, default: " + G_STRINGIFY (DEFAULT_KEYPAIR_CACHE_SIZE)); rspamd_rcl_register_worker_option (cfg, type, @@ -1227,7 +1230,7 @@ init_fuzzy (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_fuzzy_storage_ctx, encrypted_only), 0, - NULL); + "Allow encrypted requests only (and forbid all unknown keys or plaintext requests)"); return ctx; diff --git a/src/hs_helper.c b/src/hs_helper.c index 7ca14e672..d8ffd9e01 100644 --- a/src/hs_helper.c +++ b/src/hs_helper.c @@ -82,7 +82,7 @@ init_hs_helper (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct hs_helper_ctx, hs_dir), 0, - NULL); + "Directory where to save hyperscan compiled expressions"); rspamd_rcl_register_worker_option (cfg, type, "max_time", @@ -90,7 +90,7 @@ init_hs_helper (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct hs_helper_ctx, max_time), RSPAMD_CL_FLAG_TIME_FLOAT, - NULL); + "Maximum time to wait for compilation of a single expression"); return ctx; } diff --git a/src/http_proxy.c b/src/http_proxy.c index 42677b193..b112063e2 100644 --- a/src/http_proxy.c +++ b/src/http_proxy.c @@ -211,7 +211,7 @@ init_http_proxy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct http_proxy_ctx, timeout), RSPAMD_CL_FLAG_TIME_FLOAT, - NULL); + "IO timeout"); rspamd_rcl_register_worker_option (cfg, type, "rotate", @@ -220,7 +220,8 @@ init_http_proxy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct http_proxy_ctx, rotate_tm), RSPAMD_CL_FLAG_TIME_FLOAT, - NULL); + "Rotation keys time, default: " + G_STRINGIFY (DEFAULT_ROTATION_TIME) " seconds"); rspamd_rcl_register_worker_option (cfg, type, "keypair", @@ -229,7 +230,7 @@ init_http_proxy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct http_proxy_ctx, key), 0, - NULL); + "Server's keypair"); rspamd_rcl_register_worker_option (cfg, type, "upstream", @@ -237,7 +238,7 @@ init_http_proxy (struct rspamd_config *cfg) ctx, 0, 0, - NULL); + "List of upstreams"); return ctx; } diff --git a/src/lua_worker.c b/src/lua_worker.c index f7d83db09..16967b5e2 100644 --- a/src/lua_worker.c +++ b/src/lua_worker.c @@ -332,7 +332,7 @@ init_lua_worker (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_lua_worker_ctx, file), 0, - NULL); + "Run the following lua script when accepting a connection"); rspamd_rcl_register_worker_parser (cfg, type, rspamd_lua_worker_parser, ctx); diff --git a/src/smtp_proxy.c b/src/smtp_proxy.c index ff4a9f553..1c4972dc2 100644 --- a/src/smtp_proxy.c +++ b/src/smtp_proxy.c @@ -991,7 +991,7 @@ init_smtp_proxy (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct smtp_proxy_ctx, upstreams_str), 0, - NULL); + "List of upstream SMTP servers"); rspamd_rcl_register_worker_option (cfg, type, @@ -1001,7 +1001,7 @@ init_smtp_proxy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct smtp_proxy_ctx, smtp_timeout_raw), RSPAMD_CL_FLAG_TIME_UINT_32, - NULL); + "IO timeout"); rspamd_rcl_register_worker_option (cfg, type, @@ -1011,7 +1011,7 @@ init_smtp_proxy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct smtp_proxy_ctx, smtp_delay), RSPAMD_CL_FLAG_TIME_UINT_32, - NULL); + "SMTP greeting delay"); rspamd_rcl_register_worker_option (cfg, type, @@ -1021,7 +1021,7 @@ init_smtp_proxy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct smtp_proxy_ctx, delay_jitter), RSPAMD_CL_FLAG_TIME_UINT_32, - NULL); + "Jitter atribute for SMTP delay"); rspamd_rcl_register_worker_option (cfg, type, @@ -1030,7 +1030,7 @@ init_smtp_proxy (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct smtp_proxy_ctx, use_xclient), 0, - NULL); + "Use XCLIENT protocol for upstream communication"); rspamd_rcl_register_worker_option (cfg, type, @@ -1039,7 +1039,7 @@ init_smtp_proxy (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct smtp_proxy_ctx, instant_reject), 0, - NULL); + "Reject invalid pipelining"); rspamd_rcl_register_worker_option (cfg, type, @@ -1049,7 +1049,7 @@ init_smtp_proxy (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct smtp_proxy_ctx, proxy_buf_len), RSPAMD_CL_FLAG_INT_32, - NULL); + "Adjust SMTP buffer size"); rspamd_rcl_register_worker_option (cfg, type, @@ -1058,7 +1058,7 @@ init_smtp_proxy (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct smtp_proxy_ctx, rbls), 0, - NULL); + "Use the following DNS lists as IP blacklists"); return ctx; } diff --git a/src/worker.c b/src/worker.c index 982274f49..493707ebc 100644 --- a/src/worker.c +++ b/src/worker.c @@ -330,7 +330,7 @@ init_worker (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_worker_ctx, is_mime), 0, - NULL); + "Set to `false` if this worker is intended to work with non-MIME messages"); rspamd_rcl_register_worker_option (cfg, type, @@ -339,7 +339,7 @@ init_worker (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_worker_ctx, is_http), 0, - NULL); + "Deprecated: always true now"); rspamd_rcl_register_worker_option (cfg, type, @@ -348,7 +348,7 @@ init_worker (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_worker_ctx, is_json), 0, - NULL); + "Deprecated: always true now"); rspamd_rcl_register_worker_option (cfg, type, @@ -357,7 +357,7 @@ init_worker (struct rspamd_config *cfg) ctx, G_STRUCT_OFFSET (struct rspamd_worker_ctx, allow_learn), 0, - NULL); + "Deprecated: disabled and forgotten"); rspamd_rcl_register_worker_option (cfg, type, @@ -367,7 +367,7 @@ init_worker (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_worker_ctx, timeout), RSPAMD_CL_FLAG_TIME_INTEGER, - NULL); + "Protocol IO timeout"); rspamd_rcl_register_worker_option (cfg, type, @@ -377,7 +377,9 @@ init_worker (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_worker_ctx, task_timeout), RSPAMD_CL_FLAG_TIME_FLOAT, - NULL); + "Maximum task processing time, default: " + G_STRINGIFY(DEFAULT_TASK_TIMEOUT) + " seconds"); rspamd_rcl_register_worker_option (cfg, type, @@ -387,7 +389,7 @@ init_worker (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_worker_ctx, max_tasks), RSPAMD_CL_FLAG_INT_32, - NULL); + "Maximum count of parallel tasks processed by a single worker process"); rspamd_rcl_register_worker_option (cfg, type, @@ -397,7 +399,7 @@ init_worker (struct rspamd_config *cfg) G_STRUCT_OFFSET (struct rspamd_worker_ctx, key), 0, - NULL); + "Encryption keypair"); return ctx; } |