On Wed, 03 Sep 2003, James H. Thompson wrote: > I've noticed that orphan files are being left in my /var/spool/smtpd. > I'm running under SpeedyCGI, so don't know if this is a contributing factor. > > Going back through the logs all of the orphan files I checked have > in common having triggered: > in SMTP.pm in the 'data' sub: > > $self->respond(451, "See http://develooper.com/code/qpsmtpd/barelf.html"), > exit if $_ eq ".\n"; > > I noticed that all of the other aborts in this routine use "return > 1" instead of exit. > Is there some reason this is an 'exit' instead of a return?
I noticed the same problem with my Qpsmtpd setup, and I'm just running a stock Perl process. I believe the exit is wrong, since it closes the whole Qpsmtpd system early. The patch below changes it to a return as you noted that it should be. -- Robert --- qpsmtpd-0.26/lib/Qpsmtpd/SMTP.pm 2003-04-21 05:42:01.000000000 -0400 +++ qpsmtpd.work/lib/Qpsmtpd/SMTP.pm 2003-09-04 12:27:37.000000000 -0400 @@ -335,8 +335,7 @@ while (<STDIN>) { $complete++, last if $_ eq ".\r\n"; $i++; - $self->respond(451, "See http://develooper.com/code/qpsmtpd/barelf.html"), exit - if $_ eq ".\n"; + $self->respond(451, "See http://develooper.com/code/qpsmtpd/barelf.html"), return 1 if $_ eq ".\n"; # add a transaction->blocked check back here when we have line by line plugin access... unless (($max_size and $size > $max_size)) { s/\r\n$/\n/; -- Robert James Kaes --- Flarenet Inc. --- (519) 426-3782 http://www.flarenet.com/consulting/ * Putting the Service Back in Internet Service Provider *