From 3ce51cb78093af80e7617135384e5834a181ca64 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 2 Nov 2010 16:31:10 +0000 Subject: Allow skipping processing data for unauthenticated connections. --- src/proxsmtpd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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"); -- cgit v1.2.3