aboutsummaryrefslogtreecommitdiffstats
path: root/src/smtp.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-05-26 18:54:44 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-05-26 18:54:44 +0400
commit2a5690e7c12ac78c8ba8bd9f6e7d0a60c577201b (patch)
treeafaef5e7bd71e05102901dd5e6ef267a4bdead29 /src/smtp.h
parentd608ddf90823ba1fb60bed510751fb219f440f0e (diff)
downloadrspamd-2a5690e7c12ac78c8ba8bd9f6e7d0a60c577201b.tar.gz
rspamd-2a5690e7c12ac78c8ba8bd9f6e7d0a60c577201b.zip
* Continue implementing smtp proxy
Diffstat (limited to 'src/smtp.h')
-rw-r--r--src/smtp.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/smtp.h b/src/smtp.h
index d03bb1631..6d9d7555f 100644
--- a/src/smtp.h
+++ b/src/smtp.h
@@ -23,7 +23,7 @@ struct smtp_worker_ctx {
memory_pool_t *pool;
char *smtp_banner;
uint32_t smtp_delay;
- uint32_t smtp_timeout;
+ struct timeval smtp_timeout;
gboolean use_xclient;
gboolean helo_required;
@@ -40,7 +40,9 @@ enum rspamd_smtp_state {
SMTP_STATE_RCPT,
SMTP_STATE_DATA,
SMTP_STATE_EOD,
- SMTP_STATE_END
+ SMTP_STATE_END,
+ SMTP_STATE_ERROR,
+ SMTP_STATE_WRITE_ERROR
};
struct smtp_session {
@@ -51,10 +53,17 @@ struct smtp_session {
struct worker_task *task;
struct in_addr client_addr;
char *hostname;
+ char *error;
int sock;
+
+ struct rspamd_async_session *s;
+ rspamd_io_dispatcher_t *dispatcher;
+
struct smtp_upstream *upstream;
int upstream_sock;
gboolean resolved;
};
+void start_smtp_worker (struct rspamd_worker *worker);
+
#endif