Casey,

> Daniel Luttermann wrote:
> > It's not possible with amavisd to add the spam score in the subject
> > line as with spamassassin. The header edits is done by amavisd and
> > ther's no config option or else to add the score in the subject line.

This is no longer entirely true - see below.

> You are correct.  I had forgotten how I had gotten around this problem
> previously.
> 
> BTW, my solution was to write a small python script (called every minute
> from cron) which updates the subject line in the individual eMail files.

No need for this.

amavisd-new-2.5.0 release notes:

- version 2.4.3 introduced some substitutions of subject tag template strings:
  SCORE, REQD, YESNO and YESNOCAPS; this list is now extended with few more,
  to facilitate cross-host troubleshooting; the full list now consists of:

  _SCORE_     spam score (hits), same as macro %c
  _REQD_      tag2_level
  _YESNO_     score above tag2_level? 'Yes' or 'No'
  _YESNOCAPS_ same, but yields:       'YES' or 'NO'
  _HOSTNAME_  fqdn of this host ($myhostname),             same as macro %h
  _DATE_      rfc2822 timestamp of mail entering this amavisd,  as macro %d
  _U_         iso8601 UTC timestamp of mail entering this amavisd,    as %U
  _LOGID_     log id (am_id) as shown in the log, e.g. 58725-05-2,    as %n
  _MAILID_    mail_id as used in quarantine names, e.g. jaUETfyBMJHG, as %i


The current code is:

    if ($subject_tag ne '') {  # expand subject template
      # just implement a small subset of macro-lookalikes,
      # not true macro calls
      $subject_tag =~
       s{_(SCORE|REQD|YESNO|YESNOCAPS|HOSTNAME|DATE|U|LOGID|MAILID)_}
        {  $1 eq 'SCORE'     ? (0+sprintf("%.3f",$spam_level+$boost))
         : $1 eq 'REQD'      ? (!defined($tag2_level) ? '-' :
                                0+sprintf("%.3f",$tag2_level))
         : $1 eq 'YESNO'     ? ($do_tag2 ? 'Yes' : 'No')
         : $1 eq 'YESNOCAPS' ? ($do_tag2 ? 'YES' : 'NO')
         : $1 eq 'HOSTNAME'  ? c('myhostname')
         : $1 eq 'DATE'      ? rfc2822_timestamp($msginfo->rx_time)
         : $1 eq 'U'         ? iso8601_utc_timestamp($msginfo->rx_time)
         : $1 eq 'LOGID'     ? $msginfo->log_id
         : $1 eq 'MAILID'    ? $msginfo->mail_id
         : '_'.$1.'_' }egsx;
    }


Mark

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
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