Bluehost.com Web Hosting $6.95

Re: [AMaViS-user] altermime and tempdir

This is a discussion on Re: [AMaViS-user] altermime and tempdir within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Dennis, The following patch to amavisd-new-2.5.1 provides a workaround for a crashing altermime, by removing its ...


Go Back   Usenet Forums > Anti-Spam and Anti-Virus Related Forums > Amavis User

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-07-2007
Mark Martinec
 
Posts: n/a
Default Re: [AMaViS-user] altermime and tempdir

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
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/...fo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:17 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0