cvs commit: qpsmtpd/lib/Qpsmtpd Transaction.pm
[email protected] (Robert Spier)
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 04/07/15 22:04:25 Modified: lib/Qpsmtpd Transaction.pm Log: From: John Peacock <[email protected]> To: [email protected] Subject: [PATCH] Another helper function to Qsmtpd::Transaction Message-ID: <[email protected]> Date: Wed, 14 Jul 2004 10:34:25 -0400 The AV scanner plugin I am currently using (uvscan) requires the attached patch so that it can scan the existing temp file, rather than making a copy just for the scan. Revision Changes Path 1.15 +10 -0 qpsmtpd/lib/Qpsmtpd/Transaction.pm Index: Transaction.pm =================================================================== RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/Transaction.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -r1.14 -r1.15 --- Transaction.pm 14 Jul 2004 23:58:47 -0000 1.14 +++ Transaction.pm 16 Jul 2004 05:04:25 -0000 1.15 @@ -66,6 +66,11 @@ $self->{_notes}->{$key}; } +sub body_filename { + my $self = shift; + return unless $self->{_body_file}; + return $self->{_filename}; +} sub body_write { my $self = shift; @@ -201,6 +206,11 @@ example on a C<RSET> or after C<DATA> completes, so you might want to use the notes field in the C<Qpsmtpd::Connection> object instead. +=head2 body_filename ( ) + +Returns the temporary filename used to store the message contents; useful for +virus scanners so that an additional copy doesn't need to be made. + =head2 body_write( $data ) Write data to the end of the email.