summaryrefslogtreecommitdiff
path: root/src
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 /src
parentee9d43a08eab4c21c038b502215429143b12b13f (diff)
Reject early before recipient server gets the envelope.
Diffstat (limited to 'src')
-rw-r--r--src/proxsmtpd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/proxsmtpd.c b/src/proxsmtpd.c
index 6be962f..278ecee 100644
--- a/src/proxsmtpd.c
+++ b/src/proxsmtpd.c
@@ -225,6 +225,19 @@ static void usage()
* SP CALLBACKS
*/
+int cb_check_pre(spctx_t* ctx)
+{
+ if(g_pxstate.filter_type == FILTER_REJECT)
+ {
+ sp_add_log(ctx, "status=", "REJECTED");
+ if(sp_fail_msg(ctx, g_pxstate.reject) < 0)
+ return -1; /* Message already printed */
+ return 0;
+ }
+
+ return 1;
+}
+
int cb_check_data(spctx_t* ctx)
{
int r = 0;