summaryrefslogtreecommitdiffstats
path: root/src/smtp_utils.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-10-25 21:39:38 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-10-25 21:39:38 +0400
commit67e60b72919e9c33b25da7088a92c03d591ecf3f (patch)
treed974e3f9909e1181a6615d70f91a09f04ba92a65 /src/smtp_utils.h
parent11e2283597d33b6decfbe453c877af1a5d5488f5 (diff)
downloadrspamd-67e60b72919e9c33b25da7088a92c03d591ecf3f.tar.gz
rspamd-67e60b72919e9c33b25da7088a92c03d591ecf3f.zip
Fix action settings (reported by Anton Nekhoroshih).
Split smtp code to 'utils', 'protocol' and 'worker' functions. * Add support of actions for smtp worker.
Diffstat (limited to 'src/smtp_utils.h')
-rw-r--r--src/smtp_utils.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/smtp_utils.h b/src/smtp_utils.h
new file mode 100644
index 000000000..0374a715e
--- /dev/null
+++ b/src/smtp_utils.h
@@ -0,0 +1,38 @@
+#ifndef SMTP_UTILS_H_
+#define SMTP_UTILS_H_
+
+#include "config.h"
+#include "main.h"
+#include "smtp.h"
+#include "smtp_proto.h"
+
+/**
+ * @file smtp_utils.h
+ * Contains utilities for smtp protocol handling
+ */
+
+/**
+ * Send message to upstream
+ * @param session session object
+ */
+gboolean smtp_send_upstream_message (struct smtp_session *session);
+
+/**
+ * Create connection to upstream
+ * @param session session object
+ */
+gboolean create_smtp_upstream_connection (struct smtp_session *session);
+
+
+/**
+ * Write reply to upstream
+ * @param session session object
+ */
+gboolean write_smtp_reply (struct smtp_session *session);
+
+/**
+ * Frees smtp session object
+ */
+void free_smtp_session (gpointer arg);
+
+#endif /* SMTP_UTILS_H_ */