From 0a1cabf806c092ea0ca1bcc41fdec51bdf425061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Thu, 17 May 2007 22:28:28 +0000 Subject: [PATCH] Fix logging when dropping a mail due to size (m. allan noah / kitno455, issue #13) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@741 958fd67b-6ff1-0310-b445-bb7760255be9 --- Changes | 3 +++ lib/Qpsmtpd/SMTP.pm | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index c5cbcbe..3035b9f 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,9 @@ Added tests for the rcpt_ok plugin (Guy Hulbert, issue #4) + Fix logging when dropping a mail due to size (m. allan noah / + kitno455, issue #13) + greylisting: fix db_dir configuration option so it actually works (kitno455, issue #6) diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index c3081d4..3fcd593 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -684,7 +684,8 @@ sub data_respond { } #$self->respond(550, $self->transaction->blocked),return 1 if ($self->transaction->blocked); - if ( $max_size and $size > $max_size ) { + if ($max_size and $size > $max_size) { + $self->log(LOGALERT, "Message too big: size: $size (max size: $max_size)"); $self->respond(552, "Message too big!"); $self->reset_transaction; # clean up after ourselves return 1;