Dennis,
The following patch to amavisd-new-2.5.1 provides a workaround
for a crashing altermime, by removing its leftover temporary file.
Nevertheless, it would be good to provide a test case and
bring it to attention of PLDaniels.
--- amavisd~ Thu May 31 14:10:01 2007
+++ amavisd Thu Jun 7 17:24:28 2007
@@ -10056,5 +10056,16 @@
undef $out_fh;
}
- unlink($repl_fn) or do_log(-1,"Can't remove $repl_fn: %s", $!);
+ unlink($repl_fn) or do_log(-1,"Can't remove %s: %s", $repl_fn,$!);
+ if ($actual_mail_mangle eq 'altermime') { # check for leftover files
+ my($repl_tmp_fn) = $repl_fn . '.tmp'; # altermime's temporary file
+ my($errn) = lstat($repl_tmp_fn) ? 0 : 0+$!;
+ if ($errn == ENOENT) {} # fine, does not exist
+ elsif ($errn) {
+ do_log(-1,"Temporary file %s is inaccessible: %s",$repl_tmp_fn,$!);
+ } else { # cleanup after failing altermime
+ unlink($repl_tmp_fn)
+ or do_log(-1,"Can't remove %s: %s",$repl_tmp_fn,$!);
+ }
+ }
} else {
do_log(1,"mangling by %s (%s) done, new size: %d, orig %d bytes",
Mark
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/