Nicklas, > I'm getting the following error when trying to start amavisd 2.4.0 in > QMQPqq mode. > > "Problem in the In::QMQPqq code: "strip_tempdir" is not exported by the > Amavis::Util module > Can't continue after import errors at (eval 43) line 24 > BEGIN failed--compilation aborted at (eval 43) line 24.". > > This worked perfectly in 2.3.3. Perl is version 5.8.4 on Debian.
I see. The strip_tempdir and related code has been moved to its own module in 2.4.0: (from release notes): - internal/coding: a much needed and appreciated hefty patch from Martin Orr introduces class Amavisd::TempDir and collects there existing code from various places dealing with maintaining a temporary directory and files within; it also makes possible for the Courier interface code to use this module and avoid duplicating code; ... yet the amavisd-new-qmqpqq.patch hasn't been adapted to use the new module, instead it wants to use the old routine strip_tempdir which has been renamed. I don't run qmail so this hasn't been tested, I only ensured that the patch applies cleanly. As a quick fix, taking the strip_tempdir from 2.3.3 provides a solution: --- amavisd~ Mon Apr 10 00:18:34 2006 +++ amavisd Mon Apr 10 00:23:58 2006 @@ -1524,5 +1524,5 @@ &add_entropy &fetch_entropy &generate_mail_id &exit_status_str &proc_status_ok &kill_proc &prolong_timer - &sanitize_str &fmt_struct &rmdir_recursively + &sanitize_str &fmt_struct &strip_tempdir &rmdir_recursively &read_text &read_l10n_templates &read_hash &read_array &dump_hash &dump_array @@ -1827,4 +1827,24 @@ ref($arg) eq 'ARRAY' ? '['.join(',',map {fmt_struct($_)} @$arg).']' : $arg; }; + +# Remove all files and subdirectories from the temporary directory, leaving +# only the directory itself, file email.txt, and empty subdirectory ./parts . +# Leaving directories for reuse represents an important saving in time, +# as directory creation + deletion is quite an expensive operation, +# requiring atomic file system operation, including flushing buffers to disk. +# +sub strip_tempdir($) { + my($dir) = shift; + do_log(4, "strip_tempdir: $dir"); + my($errn) = lstat("$dir/parts") ? 0 : 0+$!; + if ($errn == ENOENT) {} # fine, no such directory + elsif ($errn != 0) { die "strip_tempdir: error accessing $dir/parts: $!" } + elsif ( -l _) { die "strip_tempdir: $dir/parts is a symbolic link" } + elsif (!-d _) { die "strip_tempdir: $dir/parts is not a directory" } + else { rmdir_recursively("$dir/parts", 1) } + # All done. Check for any remains in the top directory just in case + check_tempdir($dir); + 1; +} # If someone would be so kind to adapt the qmail patch to use the new module, it would be even better. Mark ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/