-----Original Message-----
From: Michael Scheidell [mailto:scheid...@secnap.net]
Sent: 04 August 2009 21:55
To: Benedict White
Cc: amavis-user@lists.sourceforge.net
Subject: Re: [AMaViS-user] SQl quarantine question

>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);


Many thanks, I will try that.


>executable corrupted?
>
>most likely.  only way to get it right is to release it using
>amavisd-release.

That was using amavisd-release called from my program hence the query!

Has any one else see this?

Kind Regards

Benedict White

------------------------------------------------------------------------------
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/ 

Reply via email to