On Tue, 14 Sep 2004, Mark Powell wrote: > I think two types of files are being left in tmp. Large emails which are > taking over 120s to scan are getting left. As they are large they fill tmp > up pretty quickly. There are also files which, as you know, are truncated > on KB boundaries which seem to suggest dropped connections or the like.
It seems like this is all to do with timeouts. There is no SIGALRM handler in qpsmtpd, thus it just dies when the timeout is reached. The file in tmp holds the body of the message only, so it is only created when the blank line after the header is received. A timeout before that point will not leave a file lying around as qpsmtpd hasn't yet had to create one. Once the file had been created there is nothing to delete it if a timeout occurs. Thus there are two fixes required here. An explicit "alarm 0" to cancel the alarm, in lib/Qpsmtpd/SMTP.pm (just after the 'while (<STDIN>)' loop in 'sub data', I think). The 2nd is a SIGALRM handler which removes the file containing the message body. Someone with more perl knowledge will have to knock that together as I'm not sure how to obtain the filename to delete in such a handler. Cheers. -- Mark Powell - UNIX System Administrator - The University of Salford Information Services Division, Clifford Whitworth Building, Salford University, Manchester, M5 4WT, UK. Tel: +44 161 295 4837 Fax: +44 161 295 5888 www.pgp.com for PGP key
