diff --git a/CREDITS b/CREDITS index f852099..790729c 100644 --- a/CREDITS +++ b/CREDITS @@ -24,5 +24,7 @@ Changes file. Kee Hinckley : Sent me the correct strftime format for the dates in the "Received" headers. +Gergely Risko : Fixed timeout bug when the client sent +DATA and then stopped before sending the next line. ... and many others per the Change file! diff --git a/Changes b/Changes index fa6578b..6285b70 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ 0.26-dev + Fixed timeout bug when the client sent DATA and then stopped before + sending the next line. (Gergely Risko ) + unrecognized_command hook and a count_unrecognized_commands plugin. (Rasjid Wilcox) diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index 031db29..8310977 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -320,6 +320,8 @@ sub data { my $timeout = $self->config('timeout'); + alarm $timeout; + while () { $complete++, last if $_ eq ".\r\n"; $i++;