]> source.dussan.org Git - rspamd.git/commitdiff
Add documentation for all workers' options
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 29 Dec 2015 18:06:25 +0000 (18:06 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 29 Dec 2015 18:06:25 +0000 (18:06 +0000)
src/controller.c
src/fuzzy_storage.c
src/hs_helper.c
src/http_proxy.c
src/lua_worker.c
src/smtp_proxy.c
src/worker.c

index 0f3b66090d673328e7dfe15e3666964f2670a75d..aa90fc8b6e6596870e11b040ba70aed23f8241f6 100644 (file)
@@ -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;
 }
index 8e84ddea7630788482e056edb672cd643b59b6fe..4404f0b8242caa941b921078dca6517f6b79fac9 100644 (file)
@@ -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;
index 7ca14e672683f40c1dc4c9d8a650e7cfe60f29d7..d8ffd9e010e0ec20ef087ffe12498aa5432311f0 100644 (file)
@@ -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;
 }
index 42677b193e09b97063c81bab58f6d5f7886d6a97..b112063e21e52706ce9e84460f6b7d3204692b89 100644 (file)
@@ -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;
 }
index f7d83db092a7f36b8eddae5d049d620ec73d31ac..16967b5e2f89c82eaca4856f0c060fc780ab964d 100644 (file)
@@ -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);
index ff4a9f553400d8f174abba9d1c0947e3be92f008..1c4972dc289ca039310fafb53ed39578bfc0fc6b 100644 (file)
@@ -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;
 }
index 982274f49d461bf12a063759ed84e7656e2642cb..493707ebc8c4e8600c1aa096082656a379a5931c 100644 (file)
@@ -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;
 }