aboutsummaryrefslogtreecommitdiffstats
path: root/src/smtp.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-06-18 19:49:13 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-06-18 19:49:13 +0400
commite4eb49311b06fc0f820fb64d800d15a295d190a6 (patch)
treee8bfa05fd2baebf9275f38b95650f794cf3fd68a /src/smtp.h
parent42641b4dc3e6b8a42a3a2ff33097403ab4193d30 (diff)
downloadrspamd-e4eb49311b06fc0f820fb64d800d15a295d190a6.tar.gz
rspamd-e4eb49311b06fc0f820fb64d800d15a295d190a6.zip
* Add limit of maximum allowed smtp session errors
Diffstat (limited to 'src/smtp.h')
-rw-r--r--src/smtp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/smtp.h b/src/smtp.h
index 83d89c5aa..11062543d 100644
--- a/src/smtp.h
+++ b/src/smtp.h
@@ -15,6 +15,7 @@ struct smtp_upstream {
};
#define MAX_UPSTREAM 128
+#define DEFAULT_MAX_ERRORS 10
struct smtp_worker_ctx {
struct smtp_upstream upstreams[MAX_UPSTREAM];
@@ -31,6 +32,7 @@ struct smtp_worker_ctx {
char *smtp_capabilities;
char *reject_message;
size_t max_size;
+ guint max_errors;
char *metric;
};
@@ -76,6 +78,8 @@ struct smtp_session {
GList *from;
GList *rcpt;
GList *cur_rcpt;
+
+ guint errors;
struct rspamd_async_session *s;
rspamd_io_dispatcher_t *dispatcher;