I've been having a few viruses get through this weekend (the latest Mydoom variants) and it seems like McAfee has sent everyone home for the weekend. So, I've been implementing a plugin for BitDefender's free Linux Edition (I'll send that later). But, it occured to me that it is pretty silly for all of the plugins to fumble around for temporary workspace, so I made this small patch to Qpsmtpd::Transaction to make it easy to share the same spool dir.

=== lib/Qpsmtpd/Transaction.pm
==================================================================
--- lib/Qpsmtpd/Transaction.pm  (revision 483)
+++ lib/Qpsmtpd/Transaction.pm  (local)
@@ -78,6 +78,7 @@

      $spool_dir =~ /^(.+)$/ or die "spool_dir not configured properly";
      $spool_dir = $1;
+     $self->{_spool_dir} = $spool_dir;

      if (-e $spool_dir) {
        my $mode = (stat($spool_dir))[2];

However, I'd rather do two things:

1) Initialize the spool_dir when the application starts up (not every time a new transaction is created);

2) Provide a temp_file/temp_dir equivalent from within Qpsmtpd itself (since we don't need the full gamut of options that File::Temp provides).

Thoughts?  Criticism?

John

Reply via email to