1. ==> /etc/amavis/conf.d/01-debian <==
  2. use strict;
  3. # ADMINISTRATORS:
  4. # Debian suggests that any changes you need to do that should never
  5. # be "updated" by the Debian package should be made in another file,
  6. # overriding the settings in this file.
  7. #
  8. # The package will *not* overwrite your settings, but by keeping
  9. # them separate, you will make the task of merging changes on these
  10. # configuration files much simpler...
  11. # see /usr/share/doc/amavisd-new/examples/amavisd.conf-default for
  12. # a list of all variables with their defaults;
  13. # see /usr/share/doc/amavisd-new/examples/amavisd.conf-sample for
  14. # a traditional-style commented file
  15. # [note: the above files were not converted to Debian settings!]
  16. #
  17. # for more details see documentation in /usr/share/doc/amavisd-new
  18. # and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
  19. # SETTINGS RARELY MODIFIED BY THE LOCAL ADMIN
  20. $ENV{PATH} = $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
  21. $file = 'file';
  22. $gzip = 'gzip';
  23. $bzip2 = 'bzip2';
  24. $lzop = 'lzop';
  25. $rpm2cpio = ['rpm2cpio.pl','rpm2cpio'];
  26. $cabextract = 'cabextract';
  27. $uncompress = ['uncompress', 'gzip -d', 'zcat'];
  28. #$unfreeze = ['unfreeze', 'freeze -d', 'melt', 'fcat']; #disabled (non-free, no security support)
  29. $unfreeze = undef;
  30. $arc = ['nomarch', 'arc'];
  31. $unarj = ['arj', 'unarj'];
  32. #$unrar = ['rar', 'unrar']; #disabled (non-free, no security support)
  33. $unrar = ['unrar-free'];
  34. $zoo = 'zoo';
  35. $lha = 'lha';
  36. $lha = undef;
  37. $pax = 'pax';
  38. $cpio = 'cpio';
  39. $ar = 'ar';
  40. $ripole = 'ripole';
  41. $dspam = 'dspam';
  42. 1; # ensure a defined return
  43. ==> /etc/amavis/conf.d/05-domain_id <==
  44. use strict;
  45. # $mydomain is used just for convenience in the config files and it is not
  46. # used internally by amavisd-new except in the default X_HEADER_LINE (which
  47. # Debian overrides by default anyway).
  48. chomp($mydomain = `head -n 1 /etc/mailname`);
  49. # amavisd-new needs to know which email domains are to be considered local
  50. # to the administrative domain. Only emails to "local" domains are subject
  51. # to certain functionality, such as the addition of spam tags.
  52. #
  53. # Default local domains to $mydomain and all subdomains. Remember to
  54. # override or redefine this if $mydomain is changed later in the config
  55. # sequence.
  56. @local_domains_acl = ( ".$mydomain" );
  57. 1; # ensure a defined return
  58. ==> /etc/amavis/conf.d/05-node_id <==
  59. use strict;
  60. # $myhostname is used by amavisd-new for node identification, and it is
  61. # important to get it right (e.g. for ESMTP EHLO, loop detection, and so on).
  62. chomp($myhostname = `hostname --fqdn`);
  63. # To manually set $myhostname, edit the following line with the correct Fully
  64. # Qualified Domain Name (FQDN) and remove the # at the beginning of the line.
  65. #
  66. #$myhostname = "mail.example.com";
  67. 1; # ensure a defined return
  68. ==> /etc/amavis/conf.d/15-av_scanners <==
  69. use strict;
  70. ##
  71. ## AV Scanners (Debian version)
  72. ##
  73. @av_scanners = (
  74. # ### http://www.clanfield.info/sophie/ (http://www.vanja.com/tools/sophie/)
  75. # ['Sophie',
  76. # \&ask_daemon, ["{}/\n", '/var/run/sophie'],
  77. # qr/(?x)^ 0+ ( : | [\000\r\n]* $)/m, qr/(?x)^ 1 ( : | [\000\r\n]* $)/m,
  78. # qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/m ],
  79. # ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/
  80. # ['Sophos SAVI', \&sophos_savi ],
  81. ### http://www.clamav.net/
  82. ['ClamAV-clamd',
  83. \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
  84. qr/\bOK$/m, qr/\bFOUND$/m,
  85. qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
  86. # NOTE: run clamd under the same user as amavisd, or run it under its own
  87. # uid such as clamav, add user clamav to the amavis group, and then add
  88. # AllowSupplementaryGroups to clamd.conf;
  89. # NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
  90. # this entry; when running chrooted one may prefer socket "$MYHOME/clamd".
  91. # ### http://www.openantivirus.org/
  92. # ['OpenAntiVirus ScannerDaemon (OAV)',
  93. # \&ask_daemon, ["SCAN {}\n", '127.0.0.1:8127'],
  94. # qr/^OK/m, qr/^FOUND: /m, qr/^FOUND: (.+)/m ],
  95. # ### http://www.vanja.com/tools/trophie/
  96. # ['Trophie',
  97. # \&ask_daemon, ["{}/\n", '/var/run/trophie'],
  98. # qr/(?x)^ 0+ ( : | [\000\r\n]* $)/m, qr/(?x)^ 1 ( : | [\000\r\n]* $)/m,
  99. # qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/m ],
  100. # ### http://www.grisoft.com/
  101. # ['AVG Anti-Virus',
  102. # \&ask_daemon, ["SCAN {}\n", '127.0.0.1:55555'],
  103. # qr/^200/m, qr/^403/m, qr/^403 .*?: ([^\r\n]+)/m ],
  104. # ### http://www.f-prot.com/
  105. # ['F-Prot fpscand', # F-PROT Antivirus for BSD/Linux/Solaris, version 6
  106. # \&ask_daemon,
  107. # ["SCAN FILE {}/*\n", '127.0.0.1:10200'],
  108. # qr/^(0|8|64) /m,
  109. # qr/^([1235679]|1[01345]) |<[^>:]*(?i)(infected|suspicious|unwanted)/m,
  110. # qr/(?i)<[^>:]*(?:infected|suspicious|unwanted)[^>:]*: ([^>]*)>/m ],
  111. # ### http://www.f-prot.com/
  112. # ['F-Prot f-protd', # old version
  113. # \&ask_daemon,
  114. # ["GET {}/*?-dumb%20-archive%20-packed HTTP/1.0\r\n\r\n",
  115. # ['127.0.0.1:10200', '127.0.0.1:10201', '127.0.0.1:10202',
  116. # '127.0.0.1:10203', '127.0.0.1:10204'] ],
  117. # qr/(?i)<summary[^>]*>clean<\/summary>/m,
  118. # qr/(?i)<summary[^>]*>infected<\/summary>/m,
  119. # qr/(?i)<name>(.+)<\/name>/m ],
  120. # ### http://www.sald.com/, http://www.dials.ru/english/, http://www.drweb.ru/
  121. # ['DrWebD', \&ask_daemon, # DrWebD 4.31 or later
  122. # [pack('N',1). # DRWEBD_SCAN_CMD
  123. # pack('N',0x00280001). # DONT_CHANGEMAIL, IS_MAIL, RETURN_VIRUSES
  124. # pack('N', # path length
  125. # length("$TEMPBASE/amavis-yyyymmddTHHMMSS-xxxxx/parts/pxxx")).
  126. # '{}/*'. # path
  127. # pack('N',0). # content size
  128. # pack('N',0),
  129. # '/var/drweb/run/drwebd.sock',
  130. # # '/var/amavis/var/run/drwebd.sock', # suitable for chroot
  131. # # '/usr/local/drweb/run/drwebd.sock', # FreeBSD drweb ports default
  132. # # '127.0.0.1:3000', # or over an inet socket
  133. # ],
  134. # qr/\A\x00[\x10\x11][\x00\x10]\x00/sm, # IS_CLEAN,EVAL_KEY; SKIPPED
  135. # qr/\A\x00[\x00\x01][\x00\x10][\x20\x40\x80]/sm,# KNOWN_V,UNKNOWN_V,V._MODIF
  136. # qr/\A.{12}(?:infected with )?([^\x00]+)\x00/sm,
  137. # ],
  138. # # NOTE: If using amavis-milter, change length to:
  139. # # length("$TEMPBASE/amavis-milter-xxxxxxxxxxxxxx/parts/pxxx").
  140. ### http://www.kaspersky.com/ (kav4mailservers)
  141. ['KasperskyLab AVP - aveclient',
  142. ['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient',
  143. '/opt/kav/5.5/kav4mailservers/bin/aveclient','aveclient'],
  144. '-p /var/run/aveserver -s {}/*',
  145. [0,3,6,8], qr/\b(INFECTED|SUSPICION|SUSPICIOUS)\b/m,
  146. qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.+)/m,
  147. ],
  148. # NOTE: one may prefer [0],[2,3,4,5], depending on how suspicious,
  149. # currupted or protected archives are to be handled
  150. ### http://www.kaspersky.com/
  151. ['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'],
  152. '-* -P -B -Y -O- {}', [0,3,6,8], [2,4], # any use for -A -K ?
  153. qr/infected: (.+)/m,
  154. sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"},
  155. sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
  156. ],
  157. ### The kavdaemon and AVPDaemonClient have been removed from Kasperky
  158. ### products and replaced by aveserver and aveclient
  159. ['KasperskyLab AVPDaemonClient',
  160. [ '/opt/AVP/kavdaemon', 'kavdaemon',
  161. '/opt/AVP/AvpDaemonClient', 'AvpDaemonClient',
  162. '/opt/AVP/AvpTeamDream', 'AvpTeamDream',
  163. '/opt/AVP/avpdc', 'avpdc' ],
  164. "-f=$TEMPBASE {}", [0,8], [3,4,5,6], qr/infected: ([^\r\n]+)/m ],
  165. # change the startup-script in /etc/init.d/kavd to:
  166. # DPARMS="-* -Y -dl -f=/var/amavis /var/amavis"
  167. # (or perhaps: DPARMS="-I0 -Y -* /var/amavis" )
  168. # adjusting /var/amavis above to match your $TEMPBASE.
  169. # The '-f=/var/amavis' is needed if not running it as root, so it
  170. # can find, read, and write its pid file, etc., see 'man kavdaemon'.
  171. # defUnix.prf: there must be an entry "*/var/amavis" (or whatever
  172. # directory $TEMPBASE specifies) in the 'Names=' section.
  173. # cd /opt/AVP/DaemonClients; configure; cd Sample; make
  174. # cp AvpDaemonClient /opt/AVP/
  175. # su - vscan -c "${PREFIX}/kavdaemon ${DPARMS}"
  176. ### http://www.centralcommand.com/
  177. ['CentralCommand Vexira (new) vascan',
  178. ['vascan','/usr/lib/Vexira/vascan'],
  179. "-a s --timeout=60 --temp=$TEMPBASE -y $QUARANTINEDIR ".
  180. "--log=/var/log/vascan.log {}",
  181. [0,3], [1,2,5],
  182. qr/(?x)^\s* (?:virus|iworm|macro|mutant|sequence|trojan)\ found:\ ( [^\]\s']+ )\ \.\.\.\ /m ],
  183. # Adjust the path of the binary and the virus database as needed.
  184. # 'vascan' does not allow to have the temp directory to be the same as
  185. # the quarantine directory, and the quarantine option can not be disabled.
  186. # If $QUARANTINEDIR is not used, then another directory must be specified
  187. # to appease 'vascan'. Move status 3 to the second list if password
  188. # protected files are to be considered infected.
  189. ### http://www.avira.com/
  190. ### Avira AntiVir (formerly H+BEDV) or (old) CentralCommand Vexira Antivirus
  191. ['Avira AntiVir', ['antivir','vexira'],
  192. '--allfiles -noboot -nombr -rs -s -z {}', [0], qr/ALERT:|VIRUS:/m,
  193. qr/(?x)^\s* (?: ALERT: \s* (?: \[ | [^']* ' ) |
  194. (?i) VIRUS:\ .*?\ virus\ '?) ( [^\]\s']+ )/m ],
  195. # NOTE: if you only have a demo version, remove -z and add 214, as in:
  196. # '--allfiles -noboot -nombr -rs -s {}', [0,214], qr/ALERT:|VIRUS:/,
  197. ### http://www.commandsoftware.com/
  198. ['Command AntiVirus for Linux', 'csav',
  199. '-all -archive -packed {}', [50], [51,52,53],
  200. qr/Infection: (.+)/m ],
  201. ### http://www.symantec.com/
  202. ['Symantec CarrierScan via Symantec CommandLineScanner',
  203. 'cscmdline', '-a scan -i 1 -v -s 127.0.0.1:7777 {}',
  204. qr/^Files Infected:\s+0$/m, qr/^Infected\b/m,
  205. qr/^(?:Info|Virus Name):\s+(.+)/m ],
  206. ### http://www.symantec.com/
  207. ['Symantec AntiVirus Scan Engine',
  208. 'savsecls', '-server 127.0.0.1:7777 -mode scanrepair -details -verbose {}',
  209. [0], qr/^Infected\b/m,
  210. qr/^(?:Info|Virus Name):\s+(.+)/m ],
  211. # NOTE: check options and patterns to see which entry better applies
  212. # ### http://www.f-secure.com/products/anti-virus/ version 4.65
  213. # ['F-Secure Antivirus for Linux servers',
  214. # ['/opt/f-secure/fsav/bin/fsav', 'fsav'],
  215. # '--delete=no --disinf=no --rename=no --archive=yes --auto=yes '.
  216. # '--dumb=yes --list=no --mime=yes {}', [0], [3,6,8],
  217. # qr/(?:infection|Infected|Suspected): (.+)/m ],
  218. ### http://www.f-secure.com/products/anti-virus/ version 5.52
  219. ['F-Secure Antivirus for Linux servers',
  220. ['/opt/f-secure/fsav/bin/fsav', 'fsav'],
  221. '--virus-action1=report --archive=yes --auto=yes '.
  222. '--dumb=yes --list=no --mime=yes {}', [0], [3,4,6,8],
  223. qr/(?:infection|Infected|Suspected|Riskware): (.+)/m ],
  224. # NOTE: internal archive handling may be switched off by '--archive=no'
  225. # to prevent fsav from exiting with status 9 on broken archives
  226. # ### http://www.avast.com/
  227. # ['avast! Antivirus daemon',
  228. # \&ask_daemon, # greets with 220, terminate with QUIT
  229. # ["SCAN {}\015\012QUIT\015\012", '/var/run/avast4/mailscanner.sock'],
  230. # qr/\t\[\+\]/m, qr/\t\[L\]\t/m, qr/\t\[L\]\t([^[ \t\015\012]+)/m ],
  231. # ### http://www.avast.com/
  232. # ['avast! Antivirus - Client/Server Version', 'avastlite',
  233. # '-a /var/run/avast4/mailscanner.sock -n {}', [0], [1],
  234. # qr/\t\[L\]\t([^[ \t\015\012]+)/m ],
  235. ['CAI InoculateIT', 'inocucmd', # retired product
  236. '-sec -nex {}', [0], [100],
  237. qr/was infected by virus (.+)/m ],
  238. # see: http://www.flatmtn.com/computer/Linux-Antivirus_CAI.html
  239. ### http://www3.ca.com/Solutions/Product.asp?ID=156 (ex InoculateIT)
  240. ['CAI eTrust Antivirus', 'etrust-wrapper',
  241. '-arc -nex -spm h {}', [0], [101],
  242. qr/is infected by virus: (.+)/m ],
  243. # NOTE: requires suid wrapper around inocmd32; consider flag: -mod reviewer
  244. # see http://marc.theaimsgroup.com/?l=amavis-user&m=109229779912783
  245. ### http://mks.com.pl/english.html
  246. ['MkS_Vir for Linux (beta)', ['mks32','mks'],
  247. '-s {}/*', [0], [1,2],
  248. qr/--[ \t]*(.+)/m ],
  249. ### http://mks.com.pl/english.html
  250. ['MkS_Vir daemon', 'mksscan',
  251. '-s -q {}', [0], [1..7],
  252. qr/^... (\S+)/m ],
  253. # ### http://www.nod32.com/, version v2.52 (old)
  254. # ['ESET NOD32 for Linux Mail servers',
  255. # ['/opt/eset/nod32/bin/nod32cli', 'nod32cli'],
  256. # '--subdir --files -z --sfx --rtp --adware --unsafe --pattern --heur '.
  257. # '-w -a --action-on-infected=accept --action-on-uncleanable=accept '.
  258. # '--action-on-notscanned=accept {}',
  259. # [0,3], [1,2], qr/virus="([^"]+)"/m ],
  260. # ### http://www.eset.com/, version v2.7 (old)
  261. # ['ESET NOD32 Linux Mail Server - command line interface',
  262. # ['/usr/bin/nod32cli', '/opt/eset/nod32/bin/nod32cli', 'nod32cli'],
  263. # '--subdir {}', [0,3], [1,2], qr/virus="([^"]+)"/m ],
  264. # ### http://www.eset.com/, version 2.71.12
  265. # ['ESET Software ESETS Command Line Interface',
  266. # ['/usr/bin/esets_cli', 'esets_cli'],
  267. # '--subdir {}', [0], [1,2,3], qr/virus="([^"]+)"/m ],
  268. ### http://www.eset.com/, version 3.0
  269. ['ESET Software ESETS Command Line Interface',
  270. ['/usr/bin/esets_cli', 'esets_cli'],
  271. '--subdir {}', [0], [2,3],
  272. qr/:\s*action="(?!accepted)[^"]*"\n.*:\s*virus="([^"]*)"/m ],
  273. ## http://www.nod32.com/, NOD32LFS version 2.5 and above
  274. ['ESET NOD32 for Linux File servers',
  275. ['/opt/eset/nod32/sbin/nod32','nod32'],
  276. '--files -z --mail --sfx --rtp --adware --unsafe --pattern --heur '.
  277. '-w -a --action=1 -b {}',
  278. [0], [1,10], qr/^object=.*, virus="(.*?)",/m ],
  279. # Experimental, based on posting from Rado Dibarbora (Dibo) on 2002-05-31
  280. # ['ESET Software NOD32 Client/Server (NOD32SS)',
  281. # \&ask_daemon2, # greets with 200, persistent, terminate with QUIT
  282. # ["SCAN {}/*\r\n", '127.0.0.1:8448' ],
  283. # qr/^200 File OK/m, qr/^201 /m, qr/^201 (.+)/m ],
  284. ### http://www.norman.com/products_nvc.shtml
  285. ['Norman Virus Control v5 / Linux', 'nvcc',
  286. '-c -l:0 -s -u -temp:$TEMPBASE {}', [0,10,11], [1,2,14],
  287. qr/(?i).* virus in .* -> \'(.+)\'/m ],
  288. ### http://www.pandasoftware.com/
  289. ['Panda CommandLineSecure 9 for Linux',
  290. ['/opt/pavcl/usr/bin/pavcl','pavcl'],
  291. '-auto -aex -heu -cmp -nbr -nor -nos -eng -nob {}',
  292. qr/Number of files infected[ .]*: 0+(?!\d)/m,
  293. qr/Number of files infected[ .]*: 0*[1-9]/m,
  294. qr/Found virus :\s*(\S+)/m ],
  295. # NOTE: for efficiency, start the Panda in resident mode with 'pavcl -tsr'
  296. # before starting amavisd - the bases are then loaded only once at startup.
  297. # To reload bases in a signature update script:
  298. # /opt/pavcl/usr/bin/pavcl -tsr -ulr; /opt/pavcl/usr/bin/pavcl -tsr
  299. # Please review other options of pavcl, for example:
  300. # -nomalw, -nojoke, -nodial, -nohackt, -nospyw, -nocookies
  301. # ### http://www.pandasoftware.com/
  302. # ['Panda Antivirus for Linux', ['pavcl'],
  303. # '-TSR -aut -aex -heu -cmp -nbr -nor -nso -eng {}',
  304. # [0], [0x10, 0x30, 0x50, 0x70, 0x90, 0xB0, 0xD0, 0xF0],
  305. # qr/Found virus :\s*(\S+)/m ],
  306. # GeCAD AV technology is acquired by Microsoft; RAV has been discontinued.
  307. # Check your RAV license terms before fiddling with the following two lines!
  308. # ['GeCAD RAV AntiVirus 8', 'ravav',
  309. # '--all --archive --mail {}', [1], [2,3,4,5], qr/Infected: (.+)/m ],
  310. # # NOTE: the command line switches changed with scan engine 8.5 !
  311. # # (btw, assigning stdin to /dev/null causes RAV to fail)
  312. ### http://www.nai.com/
  313. ['NAI McAfee AntiVirus (uvscan)', 'uvscan',
  314. '--secure -rv --mime --summary --noboot - {}', [0], [13],
  315. qr/(?x) Found (?:
  316. \ the\ (.+)\ (?:virus|trojan) |
  317. \ (?:virus|trojan)\ or\ variant\ ([^ ]+) |
  318. :\ (.+)\ NOT\ a\ virus)/m,
  319. # sub {$ENV{LD_PRELOAD}='/lib/libc.so.6'},
  320. # sub {delete $ENV{LD_PRELOAD}},
  321. ],
  322. # NOTE1: with RH9: force the dynamic linker to look at /lib/libc.so.6 before
  323. # anything else by setting environment variable LD_PRELOAD=/lib/libc.so.6
  324. # and then clear it when finished to avoid confusing anything else.
  325. # NOTE2: to treat encrypted files as viruses replace the [13] with:
  326. # qr/^\s{5,}(Found|is password-protected|.*(virus|trojan))/
  327. ### http://www.virusbuster.hu/en/
  328. ['VirusBuster', ['vbuster', 'vbengcl'],
  329. "{} -ss -i '*' -log=$MYHOME/vbuster.log", [0], [1],
  330. qr/: '(.*)' - Virus/m ],
  331. # VirusBuster Ltd. does not support the daemon version for the workstation
  332. # engine (vbuster-eng-1.12-linux-i386-libc6.tgz) any longer. The names of
  333. # binaries, some parameters AND return codes have changed (from 3 to 1).
  334. # See also the new Vexira entry 'vascan' which is possibly related.
  335. # ### http://www.virusbuster.hu/en/
  336. # ['VirusBuster (Client + Daemon)', 'vbengd',
  337. # '-f -log scandir {}', [0], [3],
  338. # qr/Virus found = (.*);/m ],
  339. # # HINT: for an infected file it always returns 3,
  340. # # although the man-page tells a different story
  341. ### http://www.cyber.com/
  342. ['CyberSoft VFind', 'vfind',
  343. '--vexit {}/*', [0], [23], qr/##==>>>> VIRUS ID: CVDL (.+)/m,
  344. # sub {$ENV{VSTK_HOME}='/usr/lib/vstk'},
  345. ],
  346. ### http://www.avast.com/
  347. ['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'],
  348. '-a -i -n -t=A {}', [0], [1], qr/\binfected by:\s+([^ \t\n\[\]]+)/m ],
  349. ### http://www.ikarus-software.com/
  350. ['Ikarus AntiVirus for Linux', 'ikarus',
  351. '{}', [0], [40], qr/Signature (.+) found/m ],
  352. ### http://www.bitdefender.com/
  353. ['BitDefender', 'bdscan', # new version
  354. '--action=ignore --no-list {}', qr/^Infected files *:0+(?!\d)/m,
  355. qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/m,
  356. qr/(?:suspected|infected): (.*)(?:\033|$)/m ],
  357. ### http://www.bitdefender.com/
  358. ['BitDefender', 'bdc', # old version
  359. '--arc --mail {}', qr/^Infected files *:0+(?!\d)/m,
  360. qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/m,
  361. qr/(?:suspected|infected): (.*)(?:\033|$)/m ],
  362. # consider also: --all --nowarn --alev=15 --flev=15. The --all argument may
  363. # not apply to your version of bdc, check documentation and see 'bdc --help'
  364. ### ArcaVir for Linux and Unix http://www.arcabit.pl/
  365. ['ArcaVir for Linux', ['arcacmd','arcacmd.static'],
  366. '-v 1 -summary 0 -s {}', [0], [1,2],
  367. qr/(?:VIR|WIR):[ \t]*(.+)/m ],
  368. # ['File::Scan', sub {Amavis::AV::ask_av(sub{
  369. # use File::Scan; my($fn)=@_;
  370. # my($f)=File::Scan->new(max_txt_size=>0, max_bin_size=>0);
  371. # my($vname) = $f->scan($fn);
  372. # $f->error ? (2,"Error: ".$f->error)
  373. # : ($vname ne '') ? (1,"$vname FOUND") : (0,"Clean")}, @_) },
  374. # ["{}/*"], [0], [1], qr/^(.*) FOUND$/m ],
  375. # ### fully-fledged checker for JPEG marker segments of invalid length
  376. # ['check-jpeg',
  377. # sub { use JpegTester (); Amavis::AV::ask_av(\&JpegTester::test_jpeg, @_) },
  378. # ["{}/*"], undef, [1], qr/^(bad jpeg: .*)$/m ],
  379. # # NOTE: place file JpegTester.pm somewhere where Perl can find it,
  380. # # for example in /usr/local/lib/perl5/site_perl
  381. # ### example: simpleminded checker for JPEG marker segments with
  382. # ### invalid length (only checks first 32k, which is not thorough enough)
  383. # ['check-jpeg-simple',
  384. # sub { Amavis::AV::ask_av(sub {
  385. # my($f)=@_; local(*FF,$_,$1,$2); my(@r)=(0,'not jpeg');
  386. # open(FF,$f) or die "jpeg: open err $f: $!";
  387. # binmode(FF) or die "jpeg: binmode err $f: $!";
  388. # defined read(FF,$_,32000) or die "jpeg: read err $f: $!";
  389. # close(FF) or die "jpeg: close err $f: $!";
  390. # if (/^\xff\xd8\xff/) {
  391. # @r=(0,'jpeg ok');
  392. # while (!/\G(?:\xff\xd9|\z)/gc) { # EOI or eof
  393. # if (/\G\xff+(?=\xff|\z)/gc) {} # fill-bytes before marker
  394. # elsif (/\G\xff([\x01\xd0-\xd8])/gc) {} # TEM, RSTi, SOI
  395. # elsif (/\G\xff([^\x00\xff])(..)/gcs) { # marker segment start
  396. # my($n)=unpack("n",$2)-2;
  397. # $n=32766 if $n>32766; # Perl regexp limit
  398. # if ($n<0) {@r=(1,"bad jpeg: len=$n, pos=".pos); last}
  399. # elsif (/\G.{$n}/gcs) {} # ok
  400. # elsif (/\G.{0,$n}\z/gcs) {last} # truncated
  401. # else {@r=(1,"bad jpeg: unexpected, pos=".pos); last}
  402. # }
  403. # elsif (/\G[^\xff]+/gc) {} # ECS
  404. # elsif (/\G(?:\xff\x00)+/gc) {} # ECS
  405. # else {@r=(2,"bad jpeg: unexpected char, pos=".pos); last}
  406. # }
  407. # }; @r}, @_) },
  408. # ["{}/*"], undef, [1], qr/^(bad jpeg: .*)$/m ],
  409. # ### an example/testing/template virus scanner (external), wastes 3 seconds
  410. # ['wasteful sleeper example',
  411. # '/bin/sleep', '3', # calls external program
  412. # undef, undef, qr/no such/m ],
  413. # ### an example/testing/template virus scanner (internal), does nothing
  414. # ['null',
  415. # sub {}, ["{}"], # supplies its own subroutine, no external program
  416. # undef, undef, qr/no such/m ],
  417. );
  418. # If no virus scanners from the @av_scanners list produce 'clean' nor
  419. # 'infected' status (i.e. they all fail to run or the list is empty),
  420. # then _all_ scanners from the @av_scanners_backup list are tried
  421. # (again, subject to $first_infected_stops_scan). When there are both
  422. # daemonized and equivalent or similar command-line scanners available,
  423. # it is customary to place slower command-line scanners in the
  424. # @av_scanners_backup list. The default choice is somewhat arbitrary,
  425. # move entries from one list to another as desired, keeping main scanners
  426. # in the primary list to avoid warnings.
  427. @av_scanners_backup = (
  428. ### http://www.clamav.net/ - backs up clamd or Mail::ClamAV
  429. ['ClamAV-clamscan', 'clamscan',
  430. "--stdout --no-summary -r --tempdir=$TEMPBASE {}",
  431. [0], qr/:.*\sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
  432. ### http://www.f-prot.com/ - backs up F-Prot Daemon, V6
  433. ['F-PROT Antivirus for UNIX', ['fpscan'],
  434. '--report --mount --adware {}', # consider: --applications -s 4 -u 3 -z 10
  435. [0,8,64], [1,2,3, 4+1,4+2,4+3, 8+1,8+2,8+3, 12+1,12+2,12+3],
  436. qr/^\[Found\s+[^\]]*\]\s+<([^ \t(>]*)/m ],
  437. ### http://www.f-prot.com/ - backs up F-Prot Daemon (old)
  438. ['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'],
  439. '-dumb -archive -packed {}', [0,8], [3,6], # or: [0], [3,6,8],
  440. qr/(?:Infection:|security risk named) (.+)|\s+contains\s+(.+)$/m ],
  441. ### http://www.trendmicro.com/ - backs up Trophie
  442. ['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'],
  443. '-za -a {}', [0], qr/Found virus/m, qr/Found virus (.+) in/m ],
  444. ### http://www.sald.com/, http://drweb.imshop.de/ - backs up DrWebD
  445. ['drweb - DrWeb Antivirus', # security LHA hole in Dr.Web 4.33 and earlier
  446. ['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'],
  447. '-path={} -al -go -ot -cn -upn -ok-',
  448. [0,32], [1,9,33], qr' infected (?:with|by)(?: virus)? (.*)$'m ],
  449. ### http://www.kaspersky.com/
  450. ['Kaspersky Antivirus v5.5',
  451. ['/opt/kaspersky/kav4fs/bin/kav4fs-kavscanner',
  452. '/opt/kav/5.5/kav4unix/bin/kavscanner',
  453. '/opt/kav/5.5/kav4mailservers/bin/kavscanner', 'kavscanner'],
  454. '-i0 -xn -xp -mn -R -ePASBME {}/*', [0,10,15], [5,20,21,25],
  455. qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.*)/m,
  456. # sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"},
  457. # sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
  458. ],
  459. # Commented out because the name 'sweep' clashes with Debian and FreeBSD
  460. # package/port of an audio editor. Make sure the correct 'sweep' is found
  461. # in the path when enabling.
  462. #
  463. # ### http://www.sophos.com/ - backs up Sophie or SAVI-Perl
  464. # ['Sophos Anti Virus (sweep)', 'sweep',
  465. # '-nb -f -all -rec -ss -sc -archive -cab -mime -oe -tnef '.
  466. # '--no-reset-atime {}',
  467. # [0,2], qr/Virus .*? found/m,
  468. # qr/^>>> Virus(?: fragment)? '?(.*?)'? found/m,
  469. # ],
  470. # # other options to consider: -idedir=/usr/local/sav
  471. # Always succeeds and considers mail clean.
  472. # Potentially useful when all other scanners fail and it is desirable
  473. # to let mail continue to flow with no virus checking (when uncommented).
  474. # ['always-clean', sub {0}],
  475. );
  476. 1; # ensure a defined return
  477. ==> /etc/amavis/conf.d/15-content_filter_mode <==
  478. use strict;
  479. # You can modify this file to re-enable SPAM checking through spamassassin
  480. # and to re-enable antivirus checking.
  481. #
  482. # Default antivirus checking mode
  483. # Please note, that anti-virus checking is DISABLED by
  484. # default.
  485. # If You wish to enable it, please uncomment the following lines:
  486. @bypass_virus_checks_maps = (
  487. \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
  488. #
  489. # Default SPAM checking mode
  490. # Please note, that anti-spam checking is DISABLED by
  491. # default.
  492. # If You wish to enable it, please uncomment the following lines:
  493. @bypass_spam_checks_maps = (
  494. \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
  495. 1; # ensure a defined return
  496. ==> /etc/amavis/conf.d/20-debian_defaults <==
  497. use strict;
  498. # ADMINISTRATORS:
  499. # Debian suggests that any changes you need to do that should never
  500. # be "updated" by the Debian package should be made in another file,
  501. # overriding the settings in this file.
  502. #
  503. # The package will *not* overwrite your settings, but by keeping
  504. # them separate, you will make the task of merging changes on these
  505. # configuration files much simpler...
  506. # see /usr/share/doc/amavisd-new/examples/amavisd.conf-default for
  507. # a list of all variables with their defaults;
  508. # see /usr/share/doc/amavisd-new/examples/amavisd.conf-sample for
  509. # a traditional-style commented file
  510. # [note: the above files were not converted to Debian settings!]
  511. #
  512. # for more details see documentation in /usr/share/doc/amavisd-new
  513. # and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
  514. $QUARANTINEDIR = "$MYHOME/virusmails";
  515. $quarantine_subdir_levels = 1; # enable quarantine dir hashing
  516. $log_recip_templ = undef; # disable by-recipient level-0 log entries
  517. $DO_SYSLOG = 1; # log via syslogd (preferred)
  518. $syslog_ident = 'amavis'; # syslog ident tag, prepended to all messages
  519. $syslog_facility = 'mail';
  520. $syslog_priority = 'debug'; # switch to info to drop debug output, etc
  521. $enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny)
  522. $enable_global_cache = 1; # enable use of libdb-based cache if $enable_db=1
  523. $inet_socket_port = 10024; # default listening socket
  524. $sa_spam_subject_tag = '***SPAM*** ';
  525. $sa_tag_level_deflt = -999; # add spam info headers if at, or above that level
  526. $sa_tag2_level_deflt = 6.31; # add 'spam detected' headers at that level
  527. $sa_kill_level_deflt = 6.31; # triggers spam evasive actions
  528. $sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent
  529. $sa_mail_body_size_limit = 200*1024; # don't waste time on SA if mail is larger
  530. $sa_local_tests_only = 0; # only tests which do not require internet access?
  531. # Quota limits to avoid bombs (like 42.zip)
  532. $MAXLEVELS = 14;
  533. $MAXFILES = 1500;
  534. $MIN_EXPANSION_QUOTA = 100*1024; # bytes
  535. $MAX_EXPANSION_QUOTA = 300*1024*1024; # bytes
  536. # You should:
  537. # Use D_DISCARD to discard data (viruses)
  538. # Use D_BOUNCE to generate local bounces by amavisd-new
  539. # Use D_REJECT to generate local or remote bounces by the calling MTA
  540. # Use D_PASS to deliver the message
  541. #
  542. # Whatever you do, *NEVER* use D_REJECT if you have other MTAs *forwarding*
  543. # mail to your account. Use D_BOUNCE instead, otherwise you are delegating
  544. # the bounce work to your friendly forwarders, which might not like it at all.
  545. #
  546. # On dual-MTA setups, one can often D_REJECT, as this just makes your own
  547. # MTA generate the bounce message. Test it first.
  548. #
  549. # Bouncing viruses is stupid, always discard them after you are sure the AV
  550. # is working correctly. Bouncing real SPAM is also useless, if you cannot
  551. # D_REJECT it (and don't D_REJECT mail coming from your forwarders!).
  552. $final_virus_destiny = D_PASS; # (data not lost, see virus quarantine)
  553. $final_banned_destiny = D_PASS; # D_REJECT when front-end MTA
  554. $final_spam_destiny = D_PASS;
  555. $final_bad_header_destiny = D_PASS; # False-positive prone (for spam)
  556. $enable_dkim_verification = 0; #disabled to prevent warning
  557. $virus_admin = "postmaster\@$mydomain"; # due to D_DISCARD default
  558. # Set to empty ("") to add no header
  559. $X_HEADER_LINE = "Scanned with ClamAV";
  560. # REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS
  561. #
  562. # DO NOT SEND VIRUS NOTIFICATIONS TO OUTSIDE OF YOUR DOMAIN. EVER.
  563. #
  564. # These days, almost all viruses fake the envelope sender and mail headers.
  565. # Therefore, "virus notifications" became nothing but undesired, aggravating
  566. # SPAM. This holds true even inside one's domain. We disable them all by
  567. # default, except for the EICAR test pattern.
  568. #
  569. @viruses_that_fake_sender_maps = (new_RE(
  570. [qr'\bEICAR\b'i => 0], # av test pattern name
  571. [qr/.*/ => 1], # true for everything else
  572. ));
  573. @keep_decoded_original_maps = (new_RE(
  574. # qr'^MAIL$', # retain full original message for virus checking (can be slow)
  575. qr'^MAIL-UNDECIPHERABLE$', # recheck full mail if it contains undecipherables
  576. qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
  577. # qr'^Zip archive data', # don't trust Archive::Zip
  578. ));
  579. # for $banned_namepath_re, a new-style of banned table, see amavisd.conf-sample
  580. $banned_filename_re = new_RE(
  581. # qr'^UNDECIPHERABLE$', # is or contains any undecipherable components
  582. # block certain double extensions anywhere in the base name
  583. qr'\.[^./]*\.(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)\.?$'i,
  584. qr'\{[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}\}?$'i, # Windows Class ID CLSID, strict
  585. qr'^application/x-msdownload$'i, # block these MIME types
  586. qr'^application/x-msdos-program$'i,
  587. qr'^application/hta$'i,
  588. # qr'^application/x-msmetafile$'i, # Windows Metafile MIME type
  589. # qr'^\.wmf$', # Windows Metafile file(1) type
  590. # qr'^message/partial$'i, qr'^message/external-body$'i, # rfc2046 MIME types
  591. # [ qr'^\.(Z|gz|bz2)$' => 0 ], # allow any in Unix-compressed
  592. # [ qr'^\.(rpm|cpio|tar)$' => 0 ], # allow any in Unix-type archives
  593. # [ qr'^\.(zip|rar|arc|arj|zoo)$'=> 0 ], # allow any within such archives
  594. # [ qr'^application/x-zip-compressed$'i => 0], # allow any within such archives
  595. qr'.\.(exe|vbs|pif|scr|bat|cmd|com|cpl)$'i, # banned extension - basic
  596. # qr'.\.(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|emf|exe|fxp|grp|hlp|hta|
  597. # inf|ins|isp|js|jse|lnk|mda|mdb|mde|mdw|mdt|mdz|msc|msi|msp|mst|
  598. # ops|pcd|pif|prg|reg|scr|sct|shb|shs|vb|vbe|vbs|
  599. # wmf|wsc|wsf|wsh)$'ix, # banned ext - long
  600. # qr'.\.(mim|b64|bhx|hqx|xxe|uu|uue)$'i, # banned extension - WinZip vulnerab.
  601. qr'^\.(exe-ms)$', # banned file(1) types
  602. # qr'^\.(exe|lha|tnef|cab|dll)$', # banned file(1) types
  603. );
  604. # See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262631
  605. # and http://www.cknow.com/vtutor/vtextensions.htm
  606. # ENVELOPE SENDER SOFT-WHITELISTING / SOFT-BLACKLISTING
  607. @score_sender_maps = ({ # a by-recipient hash lookup table,
  608. # results from all matching recipient tables are summed
  609. # ## per-recipient personal tables (NOTE: positive: black, negative: white)
  610. # '[email protected]' => [{'.ebay.com' => -3.0}],
  611. # '.cleargreen.com' => -5.0}],
  612. ## site-wide opinions about senders (the '.' matches any recipient)
  613. '.' => [ # the _first_ matching sender determines the score boost
  614. new_RE( # regexp-type lookup table, just happens to be all soft-blacklist
  615. [qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou)@'i => 5.0],
  616. [qr'^(greatcasino|investments|lose_weight_today|market\.alert)@'i=> 5.0],
  617. [qr'^(money2you|MyGreenCard|new\.tld\.registry|opt-out|opt-in)@'i=> 5.0],
  618. [qr'^(optin|saveonlsmoking2002k|specialoffer|specialoffers)@'i => 5.0],
  619. [qr'^(stockalert|stopsnoring|wantsome|workathome|yesitsfree)@'i => 5.0],
  620. [qr'^(your_friend|greatoffers)@'i => 5.0],
  621. [qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i => 5.0],
  622. ),
  623. # read_hash("/var/amavis/sender_scores_sitewide"),
  624. # This are some examples for whitelists, since envelope senders can be forged
  625. # they are not enabled by default.
  626. { # a hash-type lookup table (associative array)
  627. #'[email protected]' => -3.0,
  628. #'[email protected]' => -3.0,
  629. #'[email protected]' => -3.0,
  630. #'[email protected]' => -3.0,
  631. #'securityfocus.com' => -3.0,
  632. #'[email protected]' => -3.0,
  633. #'[email protected]' => -3.0,
  634. #'[email protected]' => -3.0,
  635. #'[email protected]'=> -3.0,
  636. #'[email protected]' => -3.0,
  637. #'spamassassin.apache.org' => -3.0,
  638. #'[email protected]' => -3.0,
  639. #'[email protected]' => -3.0,
  640. #'[email protected]' => -3.0,
  641. #'[email protected]' => -3.0,
  642. #'[email protected]' => -3.0,
  643. #'[email protected]' => -3.0,
  644. #'[email protected]' => -3.0,
  645. #'[email protected]' => -3.0,
  646. #'[email protected]' => -3.0,
  647. #'[email protected]' => -3.0,
  648. #'[email protected]' => -3.0,
  649. #'[email protected]' => -3.0,
  650. #'[email protected]' => -3.0,
  651. #'[email protected]' => -3.0,
  652. #'[email protected]' => -5.0,
  653. #'[email protected]' => -3.0,
  654. #'returns.groups.yahoo.com' => -3.0,
  655. #'[email protected]' => -3.0,
  656. #lc('[email protected]') => -3.0,
  657. #lc('[email protected]') => -5.0,
  658. # soft-blacklisting (positive score)
  659. #'[email protected]' => 3.0,
  660. #'.example.net' => 1.0,
  661. },
  662. ], # end of site-wide tables
  663. });
  664. 1; # ensure a defined return
  665. ==> /etc/amavis/conf.d/25-amavis_helpers <==
  666. use strict;
  667. ##
  668. ## Functionality required for amavis helpers like
  669. ## amavis-release.
  670. ##
  671. # Enable required AM.PDP protocol socket.
  672. #
  673. # this is incompatible with the old helpers, but one can
  674. # have multiple inet (not unix) sockets to overcome this
  675. # issue. Refer to the amavisd-new documentation for more
  676. # information
  677. $unix_socketname = "/var/lib/amavis/amavisd.sock";
  678. $interface_policy{'SOCK'} = 'AM.PDP-SOCK';
  679. $policy_bank{'AM.PDP-SOCK'} = {
  680. protocol => 'AM.PDP',
  681. auth_required_release => 0, # don't require secret-id for release
  682. };
  683. 1; # ensure a defined return
  684. ==> /etc/amavis/conf.d/30-template_localization <==
  685. use strict;
  686. # l10n (localization) of the AMaViSd-new DSN templates
  687. # Override or change as necessary
  688. # Select notifications text encoding when Unicode-aware Perl is converting
  689. # text from internal character representation to external encoding (charset
  690. # in MIME terminology). Used as argument to Perl Encode::encode subroutine.
  691. #
  692. # to be used in RFC 2047-encoded header field bodies, e.g. in Subject:
  693. #$hdr_encoding = 'iso-8859-1'; # (default: 'iso-8859-1')
  694. #
  695. # to be used in notification body text: its encoding and Content-type.charset
  696. #$bdy_encoding = 'iso-8859-1'; # (default: 'iso-8859-1')
  697. # Default template texts for notifications may be overruled by directly
  698. # assigning new text to template variables, or by reading template text
  699. # from files. A second argument may be specified in a call to read_text(),
  700. # specifying character encoding layer to be used when reading from the
  701. # external file, e.g. 'utf8', 'iso-8859-1', or often just $bdy_encoding.
  702. # Text will be converted to internal character representation by Perl 5.8.0
  703. # or later; second argument is ignored otherwise. See PerlIO::encoding,
  704. # Encode::PerlIO and perluniintro man pages.
  705. #
  706. # $notify_sender_templ = read_text('/var/amavis/notify_sender.txt');
  707. # $notify_virus_sender_templ= read_text('/var/amavis/notify_virus_sender.txt');
  708. # $notify_virus_admin_templ = read_text('/var/amavis/notify_virus_admin.txt');
  709. # $notify_virus_recips_templ= read_text('/var/amavis/notify_virus_recips.txt');
  710. # $notify_spam_sender_templ = read_text('/var/amavis/notify_spam_sender.txt');
  711. # $notify_spam_admin_templ = read_text('/var/amavis/notify_spam_admin.txt');
  712. # If notification template files are collectively available in some directory,
  713. # you can use read_l10n_templates which calls read_text for each known
  714. # template. Name the files as above, and include a file named "charset" with
  715. # the charset used in the files. This is how Debian ships l10n templates.
  716. #
  717. # syntax: read_l10n_templates(<directory>); OR
  718. # read_l10n_templates(<subdirectory>, <master directory>);
  719. #
  720. read_l10n_templates('en_US', '/etc/amavis');
  721. 1; # ensure a defined return
  722. ==> /etc/amavis/conf.d/50-user <==
  723. use strict;
  724. #
  725. # Place your configuration directives here. They will override those in
  726. # earlier files.
  727. #
  728. # See /usr/share/doc/amavisd-new/ for documentation and examples of
  729. # the directives you can use in this file
  730. #
  731. @local_domains_acl = ( "localhost" );
  732. $log_level = 3;
  733. #------------ Do not modify anything below this line -------------
  734. 1; # ensure a defined return