summaryrefslogtreecommitdiff
path: root/common/smtppass.h
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2010-11-17 15:17:18 +0000
committerStef Walter <stef@thewalter.net>2011-01-23 15:47:45 -0600
commit78658c88caf7e6374efbbb451159da261e3b0695 (patch)
tree47bb5b664ea9bc226df3583b9f707ac68c0961a8 /common/smtppass.h
parentee9d43a08eab4c21c038b502215429143b12b13f (diff)
Reject early before recipient server gets the envelope.
Diffstat (limited to 'common/smtppass.h')
-rw-r--r--common/smtppass.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/smtppass.h b/common/smtppass.h
index a54c9b0..5930eb9 100644
--- a/common/smtppass.h
+++ b/common/smtppass.h
@@ -239,6 +239,11 @@ int sp_fail_data(spctx_t* ctx, const char* smtp_status);
int sp_pass_data(spctx_t* ctx);
/*
+ * Just sends a failure message to the client.
+ */
+int sp_fail_msg(spctx_t* ctx, const char* smtp_status);
+
+/*
* Setup the environment with context info. This is useful
* if you're going to fork another process. Be sure to exec
* soon after to prevent the strings from going out of scope.
@@ -275,6 +280,13 @@ extern spctx_t* cb_new_context();
extern void cb_del_context(spctx_t* ctx);
/*
+ * Called when an email envelope is staring to be sent.
+ * If this function returns a string, it is used as a failure
+ * message.
+ */
+extern int cb_check_pre(spctx_t* ctx);
+
+/*
* Called when the data section of an email is being transferred.
* Once inside this function you can transfer files using
* sp_read_data, sp_write_data.