Hi,

For what i'm reading in the source, 

sub dispatch_from_quarantine($$$) {
  my($conn,$msginfo,$request_type) = @_;
  my($err);
  eval {
    msg_from_quarantine($conn,$msginfo,$request_type);  # fill msg object info
    mail_dispatch($conn,$msginfo,0,1);    # re-send the mail
    1;
  } or do {

should be changed to something like:

sub dispatch_from_quarantine($$$) {
  my($conn,$msginfo,$request_type) = @_;
  my($err);
  eval {
    msg_from_quarantine($conn,$msginfo,$request_type);  # fill msg object info
    sa_learn($msginfo) if ($sa_learn);
    mail_dispatch($conn,$msginfo,0,1);    # re-send the mail
    1;
  } or do {
...

sub sa_learn {
  my($msginfo) = @_;
  # reconstruct message from msginfo to temp file
  my $mail = reconstruct_mail($msginfo);
  open SA, "| sa-learn --no-sync --ham --single";
         print SA $mail;
  close SA;
}

How can i reconstruct the message text from $msginfo object?

Best regards,
Nuno Fernandes

On Friday 23 May 2008 14:10:20 Mark Martinec wrote:
> Nuno,
>
> > Does amavisd-new learn not spam messages when releasing the mail using
> > AM.PDP? I would like to do sa-learn when a mail is released from mysql
> > quarantine: sa-learn --no-sync --spam --single
> > Does amavisd-does that? Is there any hook where i can put that?
>
> This is currently not available, although it would make it
> a useful feature.
>
> For the time being, if you have a quarantine on files you can:
>
>   zcat /var/virusmails/spam/h/hETj4dUqQcR2.gz | su vscan -c 'sa-learn
> --ham'
>
> and if you have it in SQL, you can release it to a dedicated mail
> address and invoke sa-learn from there:
>
>   amavisd-release spam/h/hETj4dUqQcR2.gz "" [EMAIL PROTECTED]
>
> Mark
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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/



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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