Re: qpsmtpd-async: premature end of data problem

2008-04-23 Thread Radu Greab
Matt Sergeant wrote: > > I'm thinking more on the lines of pushing back reads if they're not full > lines. > > Probably needs a bit of support for that in lib/Danga/Client.pm Attached is an attempt to do that. The reason for this is that I've seen another case of end of data marker coming in t

Re: qpsmtpd-async: premature end of data problem

2008-04-14 Thread Juerd Waalboer
Radu Greab skribis 2008-04-14 22:19 (+0300): > $data =~ s/\r\n\.\r\n(.*)\z/\r\n/ms If you don't want to use the regex engine (and indeed, especially regexes with .* are often inefficient), you could use good old index and substr to achieve the same: # untested code my $data_end = index(

Re: qpsmtpd-async: premature end of data problem

2008-04-14 Thread Radu Greab
Matt Sergeant wrote: > > >> I can't help feeling there's a better way to do it - I hate applying > >> two > >> regexps every time a DATA packet comes in... I'll have a think on > >> it. One option could be to keep this regexp $data =~ s/\r\n\.\r\n(.*)\z/\r\n/ms and, if it is not matched, the

Re: qpsmtpd-async: premature end of data problem

2008-04-14 Thread Matt Sergeant
On Mon, 14 Apr 2008, Guy Hulbert wrote: On Mon, 2008-14-04 at 12:54 +, Matt Sergeant wrote: Attached are a test script and a suggested patch. I committed the patch 95% the same as yours. I can't help feeling there's a better way to do it - I hate applying two regexps every time a DATA pa

Re: qpsmtpd-async: premature end of data problem

2008-04-14 Thread Guy Hulbert
On Mon, 2008-14-04 at 12:54 +, Matt Sergeant wrote: > > Attached are a test script and a suggested patch. > > I committed the patch 95% the same as yours. > > I can't help feeling there's a better way to do it - I hate applying > two > regexps every time a DATA packet comes in... I'll have a

Re: qpsmtpd-async: premature end of data problem

2008-04-14 Thread Matt Sergeant
On Sat, 12 Apr 2008, Radu Greab wrote: I found a case where qpsmtpd-async detects the end of data marker incorrectly: the previous packet did not end with CRLF and the current packet starts with .CRLF. The code assumes that the previous packet ended with CRLF. Attached are a test script and a

Re: qpsmtpd-async: premature end of data problem

2008-04-14 Thread Matt Sergeant
On Mon, 14 Apr 2008, Matt Sergeant wrote: On Sat, 12 Apr 2008, Radu Greab wrote: I found a case where qpsmtpd-async detects the end of data marker incorrectly: the previous packet did not end with CRLF and the current packet starts with .CRLF. The code assumes that the previous packet ended w

Re: qpsmtpd-async: premature end of data problem

2008-04-14 Thread Matt Sergeant
On Sat, 12 Apr 2008, Radu Greab wrote: I found a case where qpsmtpd-async detects the end of data marker incorrectly: the previous packet did not end with CRLF and the current packet starts with .CRLF. The code assumes that the previous packet ended with CRLF. Attached are a test script and a

Re: qpsmtpd-async: premature end of data problem

2008-04-13 Thread Radu Greab
Radu Greab wrote: > > > Matt Sergeant wrote: > > > > Though I could have sworn I fixed this - are you sure you're testing > > against latest SVN? > > I do not have the latest SVN in production. I have 0.43rc1 with > additional patches, including your change #129 which, I think, is what > you

Re: qpsmtpd-async: premature end of data problem

2008-04-13 Thread Radu Greab
Matt Sergeant wrote: > > Though I could have sworn I fixed this - are you sure you're testing > against latest SVN? Hi, I do not have the latest SVN in production. I have 0.43rc1 with additional patches, including your change #129 which, I think, is what you are referring to as having fixed th

Re: qpsmtpd-async: premature end of data problem

2008-04-13 Thread Matt Sergeant
Ask Bjørn Hansen wrote: On Apr 12, 2008, at 6:33, Radu Greab wrote: I found a case where qpsmtpd-async detects the end of data marker incorrectly: the previous packet did not end with CRLF and the current packet starts with .CRLF. The code assumes that the previous packet ended with CRLF. Hi

Re: qpsmtpd-async: premature end of data problem

2008-04-13 Thread Ask Bjørn Hansen
On Apr 12, 2008, at 6:33, Radu Greab wrote: I found a case where qpsmtpd-async detects the end of data marker incorrectly: the previous packet did not end with CRLF and the current packet starts with .CRLF. The code assumes that the previous packet ended with CRLF. Hi Radu, Can you add it to

qpsmtpd-async: premature end of data problem

2008-04-12 Thread Radu Greab
I found a case where qpsmtpd-async detects the end of data marker incorrectly: the previous packet did not end with CRLF and the current packet starts with .CRLF. The code assumes that the previous packet ended with CRLF. Attached are a test script and a suggested patch. Thanks, Radu Greab #!/