aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_file.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-02-24 20:16:53 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-02-24 20:16:53 +0300
commit1cd34f5283bcf1d4973a351dc5235094608e3d2d (patch)
tree2d6185294cfea7c3c062c8d2123df96f5e02e1b0 /src/cfg_file.h
parent606128de4cb33a2727d6609df46ecf0c72006a73 (diff)
downloadrspamd-1cd34f5283bcf1d4973a351dc5235094608e3d2d.tar.gz
rspamd-1cd34f5283bcf1d4973a351dc5235094608e3d2d.zip
* Add initial LMTP support and LDA delivery to rspamd
Diffstat (limited to 'src/cfg_file.h')
-rw-r--r--src/cfg_file.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/cfg_file.h b/src/cfg_file.h
index a5d092c73..7bacb8aa9 100644
--- a/src/cfg_file.h
+++ b/src/cfg_file.h
@@ -14,6 +14,7 @@
#define DEFAULT_BIND_PORT 768
#define DEFAULT_CONTROL_PORT 7608
+#define DEFAULT_LMTP_PORT 7609
#define MAX_MEMCACHED_SERVERS 48
#define DEFAULT_MEMCACHED_PORT 11211
/* Memcached timeouts */
@@ -39,6 +40,16 @@ struct classifier;
enum { VAL_UNDEF=0, VAL_TRUE, VAL_FALSE };
/**
+ * Types of rspamd bind lines
+ */
+enum rspamd_cred_type {
+ CRED_NORMAL,
+ CRED_CONTROL,
+ CRED_LMTP,
+ CRED_DELIVERY,
+};
+
+/**
* Regexp type: /H - header, /M - mime, /U - url
*/
enum rspamd_regexp_type {
@@ -161,6 +172,21 @@ struct config_file {
unsigned int memcached_maxerrors; /**< maximum number of errors */
unsigned int memcached_connect_timeout; /**< connection timeout */
+ gboolean lmtp_enable; /**< is lmtp agent is enabled */
+ char *lmtp_host; /**< host for lmtp agent */
+ struct in_addr lmtp_addr; /**< bind address for lmtp */
+ uint16_t lmtp_port; /**< bind port for lmtp agent */
+ uint16_t lmtp_family; /**< bind family for lmtp agent */
+ char *lmtp_metric; /**< metric to use in lmtp module */
+
+ gboolean delivery_enable; /**< is delivery agent is enabled */
+ char *deliver_host; /**< host for mail deliviring */
+ struct in_addr deliver_addr; /**< its address */
+ uint16_t deliver_port; /**< port for deliviring */
+ uint16_t deliver_family; /**< socket family for delivirnig */
+ char *deliver_agent_path; /**< deliver to pipe instead of socket */
+ gboolean deliver_lmtp; /**< use LMTP instead of SMTP */
+
LIST_HEAD (modulesq, perl_module) perl_modules; /**< linked list of perl modules to load */
LIST_HEAD (headersq, filter) header_filters; /**< linked list of all header's filters */
@@ -193,10 +219,10 @@ int add_memcached_server (struct config_file *cf, char *str);
* Parse bind credits
* @param cf config file to use
* @param str line that presents bind line
- * @param is_control flag that defines whether this credits are for controller
+ * @param type type of credits
* @return 1 if line was successfully parsed and 0 in case of error
*/
-int parse_bind_line (struct config_file *cf, char *str, char is_control);
+int parse_bind_line (struct config_file *cf, char *str, enum rspamd_cred_type type);
/**
* Init default values