/*
 * -------------------------------------------------------------
 *
 *       
 *   
 *  $Revision: 1.51 $
 *
 * -------------------------------------------------------------
 */

         ,  
:

[  1]
1 = 
.....
N = 

.....

[  X]
1 = 
.....
Y = 

      :

---
_ = _ (__  "")

 
---

     :
-  (STRING),   , ,   ..;
-   (STRING_LIST),  ,  ;
-  (COUNT),     0  2^31 - 1;
-  (OCTAL),     ;
-  (BOOL),     :
     yes, on, true -  ,
     no, off, false -   ,   ,
       ,    .
-   (ADDRESS),    
    :  :_
    :
   inet -  TCP ,  _  
         :
           @_
         _     IP ,    
         .
         :
           Address = inet:3000@localhost
   local -   UNIX ,  _
              .
         :
           Address = local:/var/drweb/run/.drwebd
-    (ADDRESS_LIST)

 ,      . 


    [DaemonCommunication]  ,  
   .

Address = ADDRESS_LIST ()

    : -d -u -n -p 
     ,    
   .      
   .     , 
.        :
   pid - ,        pid-
         .
         :
           Address = pid:/var/drweb/run/drwebd.pid
     : 
     Address = pid:/var/drweb/run/drwebd.pid, inet:3000@srv2.example.com

Cache = BOOL (on)

    : -v 
        TCP 
   .    (yes, on, true)    
  ,   IP     ( 
)       IP;   ,
 IP      (  
 ).

Timeout = COUNT (0)

    : -t 
    ( )      .
         ,   
,   ProcessingErrors (.).  0  
 .

UseTcpNodelay = BOOL (no)

    TCP_NODELAY    . 
   ,        
 .
 [SendmailCommunication]  (.  [Mailer])


     [Scanning]    .

HeuristicAnalysis = BOOL (on)

    : -ha 
       
, ,     .

StripPath = COUNT (0)

        ,  
StripPath   (/).     
 (/)    .
NOTE:    ,   -p  patch (man patch).
NOTE:  .     PrefixPath.
: path = /some/path/to/file.ext
        StripPath = 1 -> path = some/path/to/file.ext
        StripPath = 2 -> path = path/to/file.ext

PrefixPath = STRING (absent)

,       ,  
     StripPath.    
  chrooted MTA  Samba  non-chrooted ( chrooted   
) DrWeb .
:   PrefixPath    .
: path = /some/path/to/file.ext
        PrefixPath = /my/prefix -> path = /my/prefix/some/path/to/file.ext

EXAMPLE:     
  LocalScan = yes
  StripPath = 3
  PrefixPath = /jail
   : spool/file.ext
1)   LocalScan : /var/drweb/spool/file.ext
2)   StripPath : spool/file.ext
3)   PrefixPath : /jail/spool/file.ext
DrWeb Daemon     : /jail/spool/file.ext

IncludeReport = BOOL (yes)

        (.  $DAEMON_REPORT$
  ). 

IncludeStats = BOOL (no)

        (.  $SCAN_STAT$ 
 ).

ReportMaxSize = COUNT (4096)

    ( IncludeReport = yes).  0
,     ,   , .. 
 " "    .

LocalScan = BOOL (yes)

    : -l 
    " ".  
" "       (  
   ),       (
).     ,  
    .
:      ,   
   " "  .

RuleFilter = BOOL (off)

    : -hs 
     . 
 ,       
 (/usr/local/etc/drweb/drweb32.ini). .   .  
     4.27.

Spool = STRING ()

    : -f 
  ,       .

SpoolFilesMode = OCTAL (0600)

,       spool-. 

SpoolFilenamesMode = STRING (Std)

 ,      ,  
   :
* std - ,  mkstemp (: %{SpoolFilenamesPrefix}XXXXXX)
* tai -  TAI  (: %sec.%usec.%{SpoolFilenamesPrefix}XXXXXX)
      ,       tai2tai64n  
      tai64nlocal   daemontools.
* rand48 -  lrand48 (: %{SpoolFilenamesPrefix}XXXXXXXX)
               
        mkstemp (Solaris)     

SpoolFilenamesPrefix = STRING (drweb.tmp.)

     (.  SpoolFilenamesMode)

FilterAccount = STRING ()

    : -o 
 ,       .

RunForeground = BOOL (no)

     "yes",     "", 
        ( 
daemontools).

AddXHeaders = BOOL (no)

    "yes",     X-Antivirus  
X-Antivirus-Code     .  X-Antivirus
  "Dr.Web(R) for Mail Servers on %hostname% host". 
X-Antivirus-Code  ,  Dr.Web(R)     .

DenyMode = STRING (byAll)

      "" 
.   ,      , 
        (   
)   "" .   , 
 ,     , ,   
   (   )  
"" .
   ,        
   DenyList.   ,    
      .   
 :
* byAll - ,    (  ) 
   (  )  DenyList
  (  DenyOnOne = no)
* byOne - ,      (  ) 
    (  )  DenyList
  (  DenyOnOne = yes)
* bySender - ,      
   DenyList
* bySenderAndOneRecipient - ,       
      (  ) 
   DenyList
* byOneRecipient - ,       
    DenyList
* byAllRecipients - ,     
    DenyList

DenyList = STRING ()

  ,  "" ;   ,   
.


    [Actions]  ,    
   .

---------------------------------------------------------------------------
 : 

 1.      quarantine   ,
          
    ,     .

 2.      ( )    
 ,    ,      (. 
  SkipObject, ArchiveRestriction, ProcessingErrors, ScanningErrors).


 3. ""    ,   
 "cure"  "remove"      . 
  ,     ,    
  CureFail.  Incurable   ,   
  Infected   "cure".
---------------------------------------------------------------------------
: 

LicenseLimit = STRING (tempfail)

,       - 
.
 :
pass -    
tempfail -    " -   " 
             
reject -     

Infected = STRING (quarantine)

,    ""   
 -  . 
 : 
cure -       
remove -       
reject -     
quarantine -        
redirect -   RedirectMail      
discard - ""   (" ") 

Suspicious = STRING (quarantine)

,    ""   
 -   . 
 :
pass -    
reject -     
quarantine -        
redirect -   RedirectMail      
discard - ""   (" ") 

Incurable = STRING (quarantine)

,        "" 
.  .  .
 :
remove -       
reject -     
quarantine -        
redirect -   RedirectMail      
discard - ""   (" ") 

CureFail = STRING (quarantine)

,         
    .  .  .
 :
reject -     
quarantine -        
redirect -   RedirectMail      
discard - ""   (" ") 

Adware = STRING (quarantine)

,       
 .
Possible actions : 
pass -    
reject -     
discard - ""   (" ") 

Dialers = STRING (quarantine)

,       
  (  ).
Possible actions : 
pass -    
reject -     
discard - ""   (" ") 

Jokes = STRING (quarantine)

,      -.
Possible actions : 
pass -    
reject -     
discard - ""   (" ") 

Riskware = STRING (quarantine)

,      
  .
Possible actions : 
pass -    
reject -     
discard - ""   (" ") 

Hacktools = STRING (quarantine)

,      
   ().
Possible actions : 
pass -    
reject -     
discard - ""   (" ") 

RuleFilterAlert = STRING (quarantine)

    : -z -hs 
, ,      
 . 
 : 
quarantine -        
redirect -   RedirectMail      
reject -     
discard - ""   (" ") 

EmptyFrom = STRING (continue)

    : -z 
, ,      <>.
 : 
reject -     
discard - ""   (" ") 
,       
RFC   :
"he MTA MUST accept messages with <> sender" (rfc-2505 see 2.6.1)

SkipObject = STRING (reject)

    : -k 
, ,     ,   
    (, ,  ).
 : 
pass -    
reject -     
quarantine -        
redirect -   RedirectMail      

ArchiveRestriction = STRING (reject)

    : -j 
, ,     ,   
   ,      (
,   )  ,    
 (. MaxCompressionRatio, MaxFileSizeToExtract and MaxArchiveLevel  
/usr/local/etc/drweb/drweb32.ini). 
 : 
pass -    
reject -     
quarantine -        
redirect -   RedirectMail      

ScanningErrors = STRING (quaratine)

    : -y 
, ,       
 (,          ).
 : 
pass -    
reject -     
quarantine -        
redirect -   RedirectMail      
tempfail -    " -   " 
             

ProcessingErrors = STRING (quarantine)

    : -b 
, ,       
 (,         ).
 : 
pass -    
reject -     
quarantine -        
redirect -   RedirectMail      
tempfail -    " -   " 
             

UseCustomReply = BOOL (no)

  \      SMTP
  AdminMail = STRING ()

    : -g 
  ,     ,
   .  $POSTMASTER$  
 .

FilterMail = STRING ()

,       .  
$FILTER_MAIL$    .

RedirectMail = STRING (absent)

,         
   redirect.

UnnotificableVirusesList = STRING (absent)

  ,   ,     
    ;    ,   
. .    viruses_list.rus.txt

UnnotificableAddressesList = STRING (absent)

  ,   ,     
    ;    ,   
. .    addresses_list.rus.txt

Quarantine = STRING ()

    : -a 
  "" - ,     .

QuarantineFilesMode = OCTAL (0660)

,       .

QuarantineFilenamesMode = STRING (Std)

 ,     ,   , 
     :
* std - ,  mkstemp (: %{QuarantineFilenamesPrefix}XXXXXX)
* tai -  TAI  (: %sec.%usec.%{QuarantineFilenamesPrefix}XXXXXX)
      ,       tai2tai64n  
      tai64nlocal   daemontools.
* rand48 -  lrand48 (: %{QuarantineFilenamesPrefix}XXXXXXXX)
               
        mkstemp (Solaris)     

QuarantineFilenamesPrefix = STRING (drweb.quarantine.)

   ,    (.  
QuarantineFilenamesMode).



     [NotificationOptions]   

FastNotify = BOOL (no)

      - 
   ,      
  .     
         . 
      ,   
 ( md5), ,       
  (Milter.LogLevel  6),   
 .  ,       
smtp- (   "" (standalone) smtp), 
       no.

NotifyHashSalt = STRING ()

,        .


     [VirusNotifications]    
 .

SenderNotify = BOOL (yes)
AdminNotify = BOOL (yes)
RcptsNotify = BOOL (yes)

  ,    ,  
  .

SenderTemplate = STRING ()
AdminTemplate = STRING ()
RcptsTemplate = STRING ()

    .

     [SkipNotifications],
[ArchiveRestrictionNotifications]  [ErrorNotifications] - ,  
 ,    .

     [Logging]       .

Level = STRING (Quiet)

    : -w -q 
    .    
 : Quiet (  ), Errors ( ), 
Alerts (. +   ), Info (. +  ), 
Verbose ( ), Debug ( ).   
  SyslogPriority    SyslogFacility.

SyslogFacility = STRING (Mail)

          
 syslogd.  : Daemon, Mail, Local0 .. Local7.

SyslogPriority = STRING (Info)

        syslogd.
 : Debug, Info, Notice, Alert.


 [Submitter]  (.  [Mailer]).


     [Mailer]   .

MailSystem = STRING (Sendmail)

  ,      .

Sendmail = STRING ()

      c  sendmail :
{program} {add_args} {default_args} -f {sender} -- {rcpts} < {mail.msg}
   /usr/sbin/sendmail
 .   SendmailArgs    .

SendmailArgs = STRING ()

 (   )    
 .   : -i -bm.
: 
  SendmailArgs = "-C/usr/exim/alt_exim.conf"
  SendmailArgs = "-FUserName"

MilterAddress = ADDRESS ()

    : -m -i -s 
  ,        Sendmail.

  :
   1.  sendmail, drweb-smf &      
    Unix :
   *  /usr/local/etc/drweb/drweb32.ini
     SocketMode = Unix
     SocketFile = /path/to/daemon.socket
   *  sendmail.mc :
     MAIL_FILTER(`drweb-filter', `S=local:/path/to/drweb-smf.socket, F=T, T=C:5m;S:15m;R:15m;E:1h')
   *  drweb_smf.conf :
     [DaemonCommunication]
     Address = local:/path/to/daemon.socket
     [Mailer]
     MilterAddress = local:/path/to/drweb-smf.socket
           
   2.  sendmail, drweb-smf &      
    TCP :
   *  /usr/local/etc/drweb/drweb32.ini
     SocketMode = TCP
     DaemonPort = 3000
     Interfaces = localhost
   *  sendmail.mc :
     MAIL_FILTER(`drweb-filter', `S=inet:3001@localhost, F=T, T=C:5m;S:15m;R:15m;E:1h')
   *  drweb_smf.conf :
     [DaemonCommunication]
     Address = inet:3000@localhost
     [Mailer]
     MilterAddress = inet:3001@localhost
                      
   3.  sendmail   host_A, drweb-smf  host_B,   
   host_C,      , 
   i) sendmail & drweb-smf   ,   : host_A == host_B
   ii) sendmail   , drweb-smf &   : host_B == host_C

   *  /usr/local/etc/drweb/drweb32.ini :
     SocketMode = TCP
     DaemonPort = 3000
     Interfaces = "host_C"
   *  sendmail.mc :
     MAIL_FILTER(`drweb-filter', `S=inet:3001@host_B, F=T, T=C:5m;S:15m;R:15m;E:1h')
   *  drweb_smf.conf :
     [DaemonCommunication]
     Address = inet:3000@host_C
     [Mailer]
     MilterAddress = inet:3001@host_B
     
MilterTimeout = COUNT (7120)

 ( ),     sendmail.  
,   Timeout.  (  )  sendmail.cf

MilterPendedConnections = COUNT (32)

  "" (pended)   sendmail  .

MilterDebugLevel = COUNT (0)

    Milter, ..     
(0 -    .. 9 - . )




     [Agent]  ,   
   .

Address = ADDRESS (absent)

  .      
      stat.drweb.com.
 agent/readme.rus.txt     .

Timeout = COUNT (10)

 ( )    .
