/[smeserver]/rpms/qpsmtpd/sme8/qpsmtpd-0.84-accept-empty-email.patch
ViewVC logotype

Annotation of /rpms/qpsmtpd/sme8/qpsmtpd-0.84-accept-empty-email.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sun Jun 30 22:14:51 2013 UTC (11 years, 5 months ago) by wellsi
Branch: MAIN
CVS Tags: qpsmtpd-0_84-8_el5_sme, qpsmtpd-0_84-6_el5_sme, qpsmtpd-0_84-9_el5_sme, qpsmtpd-0_84-7_el5_sme, HEAD
* Sat Jun 29 2013 Ian Wells <esmith@wellsi.com> 0.84-6.sme
- Accept messages with no body and no trailing \n after headers [SME: 6870]

1 wellsi 1.1 diff -ruN qpsmtpd-0.84.old/lib/Qpsmtpd/SMTP.pm qpsmtpd-0.84/lib/Qpsmtpd/SMTP.pm
2     --- qpsmtpd-0.84.old/lib/Qpsmtpd/SMTP.pm 2013-06-29 18:30:46.000000000 -0700
3     +++ qpsmtpd-0.84/lib/Qpsmtpd/SMTP.pm 2013-06-29 18:36:25.000000000 -0700
4     @@ -642,7 +642,10 @@
5    
6     my $timeout = $self->config('timeout');
7     while (defined($_ = $self->getline($timeout))) {
8     - $complete++, last if $_ eq ".\r\n";
9     + if ( $_ eq ".\r\n" ) {
10     + $complete++;
11     + $_ eq '';
12     + };
13     $i++;
14    
15     # should probably use \012 and \015 in these checks instead of \r and \n ...
16     @@ -658,7 +661,7 @@
17     unless (($max_size and $size > $max_size)) {
18     s/\r\n$/\n/;
19     s/^\.\./\./;
20     - if ($in_header and m/^$/) {
21     + if ($in_header && (m/^$/ || $complete > 0)) {
22     $in_header = 0;
23     my @headers = split /^/m, $buffer;
24    
25     @@ -701,9 +704,10 @@
26    
27     # copy all lines into the spool file, including the headers
28     # we will create a new header later before sending onwards
29     - $self->transaction->body_write($_);
30     + $self->transaction->body_write($_) if ! $complete;
31     $size += length $_;
32     }
33     + last if $complete > 0;
34     #$self->log(LOGDEBUG, "size is at $size\n") unless ($i % 300);
35     }
36    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed