summaryrefslogtreecommitdiff
path: root/src/proxsmtpd.c
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2010-11-02 16:31:10 +0000
committerStef Walter <stef@thewalter.net>2011-01-23 15:47:45 -0600
commit3ce51cb78093af80e7617135384e5834a181ca64 (patch)
tree04c5dbb5f10cfb20793c7a2f3fe241a40e40d27f /src/proxsmtpd.c
parent32f0912fd6df69808bc25f012ce7694243025a35 (diff)
Allow skipping processing data for unauthenticated connections.
Diffstat (limited to 'src/proxsmtpd.c')
-rw-r--r--src/proxsmtpd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/proxsmtpd.c b/src/proxsmtpd.c
index 407bcaf..9402641 100644
--- a/src/proxsmtpd.c
+++ b/src/proxsmtpd.c
@@ -229,12 +229,16 @@ int cb_check_data(spctx_t* ctx)
if(g_pxstate.filter_type == FILTER_REJECT)
{
- if(sp_cache_data(ctx) < 0 ||
- sp_fail_data(ctx, g_pxstate.reject) < 0)
+ if(sp_fail_data(ctx, g_pxstate.reject) < 0)
return -1; /* Message already printed */
return 0;
}
- else if(!g_pxstate.command)
+
+ /* Tell client to start sending data */
+ if(sp_start_data (ctx) < 0)
+ return -1; /* Message already printed */
+
+ if(!g_pxstate.command)
{
sp_messagex(ctx, LOG_WARNING, "no filter command specified. passing message through");