HOME LINKS SAL PUBLIC SOFTWARE SEARCH MADE UP

SAGATOR


report()
  Report any message to admin, user or anybody.
  
  This module can be used to report an message to administrator
  or to any user. You can use following variables in report messages:
    %(FROM)s            report sender
    %(VIRNAME)s         detected virus name
    %(SMTP_COMM)s       SMTP communication
    %(STATUS)s          status of this message (REJECTED, DROPPED, ...)
    %(QNAME)s           filename in quarantine
    %(QQNAME)s          quoted (urlencoded) filename in quarantine
    %(SCANNER_OUTPUT)s  returned scanner output
    %(SCANNER_NAME)s    name of the scanner
    %(MSG_HEADER)s      virus/spam header
    %(MSG_BODY)s        virus/spam body (without header)
    %(SUBJECT)s         message's header Subject
    %(RANDOM)s          10 random characters (useable to generate a boundary)
    %(SENDER)s          virus/spam sender
    %(RECIPIENTS)s      virus/spam recipients joined by comma (',')
    %(TO)s              report recipeints
    %(VERSION)s         sagator's version
    %(SENTBY_IP)s       sender's IP
    %(SENTBY_NAME)s     sender's hostname
    %(SENTBY_HELO)s     sender's HELO/EHLO string
  
  Usage: report(recipients, msg, scanners)
     or: report(...).sender('<email@of.sender.dom>')
     or: report(...).ifscan(cond_scanner)
  
  Where: recipients is an array of recipients,
           like: ['<r1@dom>', '<r2@dom>', ...]
           You can use variables mentioned above in this array, but only
           %(SENDER)s can be used logically.
         msg is an message template, you can use report.MSG_TMPL
         cond_scanner is a scanner, which defines, when report may be sent
  
  Examples:
    - send report to admin@localhost:
        report(['<admin@localhost>'], report.MSG_TMPL, ... )
    - send report to email sender:
        report(['%(SENDER)s'], report.MSG_TMPL, ... )