On Fri, 05 Sep 2003, James H. Thompson wrote:
> 
> Since  $self->disconnect will do an exit after it calls the disconnect hooks,
> you don't need the return in front of it.

Good point.  The shifting frames of reference between SMTP.pm,
TcpServer.pm, and Qpsmtpd.pm is a little confusing. :)  You can find
the new patch at:

http://www.flarenet.com/consulting/software/qpsmtpd/lib.qpsmtpd.smtp.patch

> I'm wondering if the same problem also occurs on a timeout.

>From what I can tell, when a timeout occurs, Perl will simply exit
without running any DESTORY blocks.  This would brings us back to the
problem of not closing and removing the temporary files in the spool
directory.

One possible solution to the temp file problem would be to unlink the
files as soon as they're created.  The OS would then reclaim the space
once the Qpsmtpd closed.  In the Transaction::DESTORY function
$self->{_body_file} could be set to undef to close the file early
(like during a reset_transaction().)

Does anyone know how portable the unlink() after opening pattern is?
        -- Robert

-- 
    Robert James Kaes    ---  Flarenet Inc.  ---    (519) 426-3782
                 http://www.flarenet.com/consulting/
      * Putting the Service Back in Internet Service Provider *

Reply via email to