diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-03-07 20:47:55 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-03-07 20:47:55 +0400 |
commit | 9b8ecfb8923cae677777a68790f23fbcf26bdabf (patch) | |
tree | 01e262f8354d2209c595fc911f819ca9a54b37ed /src/smtp_utils.h | |
parent | 944dd2a7eab62d2b23c31e26a33d4ad79c11381b (diff) | |
download | rspamd-9b8ecfb8923cae677777a68790f23fbcf26bdabf.tar.gz rspamd-9b8ecfb8923cae677777a68790f23fbcf26bdabf.zip |
* Add initial implementation of proxy object
* Add simple smtp proxy worker
Diffstat (limited to 'src/smtp_utils.h')
-rw-r--r-- | src/smtp_utils.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/smtp_utils.h b/src/smtp_utils.h index e61a85ae2..b32b8235e 100644 --- a/src/smtp_utils.h +++ b/src/smtp_utils.h @@ -4,13 +4,25 @@ #include "config.h" #include "main.h" #include "smtp.h" -#include "smtp_proto.h" /** * @file smtp_utils.h * Contains utilities for smtp protocol handling */ +struct smtp_upstream { + struct upstream up; + + const gchar *name; + struct in_addr addr; + guint16 port; + gboolean is_unix; +}; + +#define MAX_SMTP_UPSTREAMS 128 + +struct smtp_session; + /** * Send message to upstream * @param session session object @@ -39,4 +51,13 @@ gboolean write_smtp_reply (struct smtp_session *session); */ void free_smtp_session (gpointer arg); +/** + * Parse upstreams line + * @param upstreams pointer to the array of upstreams (must be at least MAX_SMTP_UPSTREAMS size) + * @param line description line + * @param count targeted count + * @return + */ +gboolean parse_upstreams_line (memory_pool_t *pool, struct smtp_upstream *upstreams, const gchar *line, gsize *count); + #endif /* SMTP_UTILS_H_ */ |