Benedict White wrote: > I noticed that Amavisd stores emails in 16KB chunks in MySQL. > > Is there an easy way of rebuilding the email message to show it > how it should be? > something like this? will write it to /tmp/mail_id.eml?
(its part of our quarantine release program, slightly modified to use 'cat' and not clamav, so this is only parts) $query = " select a.mail_text, b.size from quarantine a, msgs b where a.mail_id='$mail_id' and a.mail_id=b.mail_id order by chunk_ind asc"; #print "$query\n"; $sth = $dbh->prepare($query); $sth->execute(); $sth->bind_columns( undef, \$mail_text, \$size ); while ( $sth->fetch() ) { $email = ${email}.${mail_text} } $clam="/bin/cat > /tmp/$mail_id.eml"; $pid = open(CLAM, "| $clam"); print CLAM "$email\n"; close(CLAM); executable corrupted? most likely. only way to get it right is to release it using amavisd-release. _________________________________________________________________________ This email has been scanned and certified safe by SpammerTrap(r). For Information please see http://www.secnap.com/products/spammertrap/ _________________________________________________________________________ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ 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/