Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1495 connectés 

 


 Mot :   Pseudo :  
 
 Page :   1  2
Page Suivante
Auteur Sujet :

Stats quotidiennes SpamAssassin

n°974520
jaymzwise
Posté le 05-11-2007 à 18:17:46  profilanswer
 

Reprise du message précédent :
Oui, effectivement concernant les bad headers, les mails sont bien livrés au destinataire.
Je vérifierai si le daemon clam tourne correctement.
 
En tout cas, merci beaucoup pour ton aide ;)

mood
Publicité
Posté le 05-11-2007 à 18:17:46  profilanswer
 

n°974733
jaymzwise
Posté le 06-11-2007 à 09:13:18  profilanswer
 

Salut,
 
Concernant le rapport de logwatch c'est bon, j'ai bien les hams et les spams.
Par contre j'ai toujours un problème dans les logs concernant ClamAV.
 
Toujours le même message :

Code :
  1. (!!)WARN: all primary virus scanners failed, considering backups


 
Quand je démarre amavis, j'ai ce qui suit dans les logs :

Code :
  1. Found secondary av scanner ClamAV-clamscan at /usr/local/bin/clamscan

n°974741
toniotonio
Posté le 06-11-2007 à 09:28:07  profilanswer
 

le demon clamd est arreté ou bien il y aun pb avec le socket:
 
ps auxw | grep clam
 
 


---------------
Messagerie dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com
n°974743
jaymzwise
Posté le 06-11-2007 à 09:30:11  profilanswer
 

Le démon Clamd tourne à priori :

Code :
  1. amavis   28510  0.1  3.8  65264 49888 ?        Ss   07:41   0:07 /usr/local/sbin/clamd

n°974748
toniotonio
Posté le 06-11-2007 à 09:33:28  profilanswer
 

que disent les logs d'amavis/postfix lors de la reception d'un mail ?


---------------
Messagerie dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com
n°974752
jaymzwise
Posté le 06-11-2007 à 09:38:34  profilanswer
 

Voici les logs :

Code :
  1. Nov  6 09:14:24 x postfix/smtpd[5758]: connect from smtp6-g19.free.fr[212.27.42.36]
  2. Nov  6 09:14:24 x postfix/smtpd[5758]: 714677D69: client=smtp6-g19.free.fr[212.27.42.36]
  3. Nov  6 09:14:24 x postfix/cleanup[5761]: 714677D69: message-id=<20071106071034.76E3483C4@atenea.ine.es>
  4. Nov  6 09:14:24 x postfix/cleanup[5761]: 714677D69: resent-message-id=<1194338046.473026fef3276@imp.free.fr>
  5. Nov  6 09:14:24 x postfix/smtpd[5758]: disconnect from smtp6-g19.free.fr[212.27.42.36]
  6. Nov  6 09:14:24 x postfix/qmgr[1512]: 714677D69: from=<eblopez@ine.es>, size=4114, nrcpt=1 (queue active)
  7. Nov  6 09:14:24 x amavis[2515]: (02515-03) ESMTP::10024 /var/amavis/tmp/amavis-20071106T085008-02515: <eblopez@ine.es> -> <x@x.x> SIZE=4114 BODY=8BITMIME Received: from x.x.x ([127.0.0.1]) by localhost (x.x.x [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <x@x.x>; Tue,  6 Nov 2007 09:14:24 +0100 (CET)
  8. Nov  6 09:14:24 x amavis[2515]: (02515-03) Checking: AtKi4RqYwh86 [212.27.42.36] <eblopez@ine.es> -> <x@x.x>
  9. Nov  6 09:14:24 x amavis[2515]: (02515-03) p001 1 Content-Type: text/plain, size: 788 B, name:
  10. Nov  6 09:14:24 x amavis[2515]: (02515-03) (!!)WARN: all primary virus scanners failed, considering backups
  11. Nov  6 09:14:38 x amavis[2515]: (02515-03) SPAM-TAG, <eblopez@ine.es> -> <x@x.x>, No, score=0 tagged_above=-9999.9 required=5 tests=[none]
  12. Nov  6 09:14:38 x postfix/smtpd[5800]: connect from localhost[127.0.0.1]
  13. Nov  6 09:14:38 x postfix/smtpd[5800]: 9CD1A7D72: client=localhost[127.0.0.1]
  14. Nov  6 09:14:38 x postfix/cleanup[5761]: 9CD1A7D72: message-id=<20071106071034.76E3483C4@atenea.ine.es>
  15. Nov  6 09:14:38 x postfix/cleanup[5761]: 9CD1A7D72: resent-message-id=<1194338046.473026fef3276@imp.free.fr>
  16. Nov  6 09:14:38 x postfix/smtpd[5800]: disconnect from localhost[127.0.0.1]
  17. Nov  6 09:14:38 x amavis[2515]: (02515-03) FWD via SMTP: <eblopez@ine.es> -> <x@x.x>,BODY=8BITMIME 250 2.6.0 Ok, id=02515-03, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9CD1A7D72
  18. Nov  6 09:14:38 x amavis[2515]: (02515-03) Passed CLEAN, [212.27.42.36] [212.27.42.68] <eblopez@ine.es> -> <x@x.x>, Message-ID: <20071106071034.76E3483C4@atenea.ine.es>, Resent-Message-ID: <1194338046.473026fef3276@imp.free.fr>, mail_id: AtKi4RqYwh86, Hits: 0, size: 4113, queued_as: 9CD1A7D72, 13983 ms
  19. Nov  6 09:14:38 x amavis[2515]: (02515-03) TIMING [total 13990 ms] - SMTP greeting: 3 (0%)0, SMTP EHLO: 1 (0%)0, SMTP pre-MAIL: 1 (0%)0, SMTP pre-DATA-flush: 3 (0%)0, SMTP DATA: 77 (1%)1, check_init: 1 (0%)1, digest_hdr: 2 (0%)1, digest_body: 0 (0%)1, gen_mail_id: 1 (0%)1, mime_decode: 16 (0%)1, get-file-type1: 18 (0%)1, parts_decode: 0 (0%)1, check_header: 6 (0%)1, AV-scan-1: 3886 (28%)29, spam-wb-list: 3 (0%)29, SA parse: 7 (0%)29, SA check: 9671 (69%)98, update_cache: 7 (0%)98, decide_mail_destiny: 2 (0%)98, fwd-connect: 42 (0%)98, fwd-mail-pip: 120 (1%)99, fwd-rcpt-pip: 0 (0%)99, fwd-data-chkpnt: 0 (0%)99, write-header: 3 (0%)99, fwd-data-contents: 0 (0%)99, fwd-end-chkpnt: 99 (1%)100, prepare-dsn: 1 (0%)100, main_log_entry: 13 (0%)100, update_snmp: 2 (0%)100, SMTP pre-response: 1 (0%)100, SMTP response: 0 (0%)100, unlink-1-files: 0 (0%)100, rundown: 1 (0%)100
  20. Nov  6 09:14:38 x postfix/smtp[5764]: 714677D69: to=<x@x.x>, relay=127.0.0.1[127.0.0.1]:10024, delay=15, delays=0.5/0.04/0.01/14, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 9CD1A7D72)
  21. Nov  6 09:14:38 x postfix/qmgr[1512]: 9CD1A7D72: from=<eblopez@ine.es>, size=4660, nrcpt=1 (queue active)
  22. Nov  6 09:14:38 x postfix/qmgr[1512]: 714677D69: removed
  23. Nov  6 09:14:38 x postfix/local[5802]: 9CD1A7D72: to=<x@x.x>, relay=local, delay=0.42, delays=0.28/0.06/0/0.09, dsn=2.0.0, status=sent (delivered to maildir)
  24. Nov  6 09:14:39 x spamd[26574]: prefork: periodic ping from spamd parent
  25. Nov  6 09:14:39 x spamd[26574]: prefork: sysread(7) not ready, wait max 300 secs
  26. Nov  6 09:14:39 x spamd[26575]: prefork: periodic ping from spamd parent
  27. Nov  6 09:14:39 x spamd[26575]: prefork: sysread(8) not ready, wait max 300 secs
  28. Nov  6 09:14:39 x postfix/qmgr[1512]: 9CD1A7D72: removed


Message édité par jaymzwise le 06-11-2007 à 09:39:22
n°974760
toniotonio
Posté le 06-11-2007 à 09:47:00  profilanswer
 

tu peux arreter definitivement spamd, il n'est plus utile dans cette configuration.
 
 
fais voir ton amavisd.conf et ton /etc/clamd.conf
 


---------------
Messagerie dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com
n°974774
jaymzwise
Posté le 06-11-2007 à 10:00:11  profilanswer
 

Clamd.conf :

Code :
  1. ##
  2. ## Example config file for the Clam AV daemon
  3. ## Please read the clamd.conf(5) manual before editing this file.
  4. ##
  5. # Comment or remove the line below.
  6. # Uncomment this option to enable logging.
  7. # LogFile must be writable for the user running daemon.
  8. # A full path is required.
  9. # Default: disabled
  10. LogFile /var/log/clamav/clamd.log
  11. # By default the log file is locked for writing - the lock protects against
  12. # running clamd multiple times (if want to run another clamd, please
  13. # copy the configuration file, change the LogFile variable, and run
  14. # the daemon with --config-file option).
  15. # This option disables log file locking.
  16. # Default: no
  17. #LogFileUnlock yes
  18. # Maximum size of the log file.
  19. # Value of 0 disables the limit.
  20. # You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
  21. # and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
  22. # in bytes just don't use modifiers.
  23. # Default: 1M
  24. LogFileMaxSize 20M
  25. # Log time with each message.
  26. # Default: no
  27. LogTime yes
  28. # Also log clean files. Useful in debugging but drastically increases the
  29. # log size.
  30. # Default: no
  31. #LogClean yes
  32. # Use system logger (can work together with LogFile).
  33. # Default: no
  34. #LogSyslog yes
  35. # Specify the type of syslog messages - please refer to 'man syslog'
  36. # for facility names.
  37. # Default: LOG_LOCAL6
  38. #LogFacility LOG_MAIL
  39. # Enable verbose logging.
  40. # Default: no
  41. #LogVerbose yes
  42. # This option allows you to save a process identifier of the listening
  43. # daemon (main thread).
  44. # Default: disabled
  45. PidFile /var/run/clamav/clamd.pid
  46. # Optional path to the global temporary directory.
  47. # Default: system specific (usually /tmp or /var/tmp).
  48. TemporaryDirectory /tmp
  49. # Path to the database directory.
  50. # Default: hardcoded (depends on installation options)
  51. DatabaseDirectory /var/lib/clamav
  52. # The daemon works in a local OR a network mode. Due to security reasons we
  53. # recommend the local mode.
  54. # Path to a local socket file the daemon will listen on.
  55. # Default: disabled (must be specified by a user)
  56. LocalSocket /var/run/clamav/clamd.ctl
  57. # Remove stale socket after unclean shutdown.
  58. # Default: no
  59. FixStaleSocket yes
  60. # TCP port address.
  61. # Default: no
  62. #TCPSocket 3310
  63. # TCP address.
  64. # By default we bind to INADDR_ANY, probably not wise.
  65. # Enable the following to provide some degree of protection
  66. # from the outside world.
  67. # Default: no
  68. #TCPAddr 127.0.0.1
  69. # Maximum length the queue of pending connections may grow to.
  70. # Default: 15
  71. #MaxConnectionQueueLength 30
  72. # Clamd uses FTP-like protocol to receive data from remote clients.
  73. # If you are using clamav-milter to balance load between remote clamd daemons
  74. # on firewall servers you may need to tune the options below.
  75. # Close the connection when the data size limit is exceeded.
  76. # The value should match your MTA's limit for a maximum attachment size.
  77. # Default: 10M
  78. #StreamMaxLength 20M
  79. # Limit port range.
  80. # Default: 1024
  81. #StreamMinPort 30000
  82. # Default: 2048
  83. #StreamMaxPort 32000
  84. # Maximum number of threads running at the same time.
  85. # Default: 10
  86. #MaxThreads 20
  87. # Waiting for data from a client socket will timeout after this time (seconds).
  88. # Value of 0 disables the timeout.
  89. # Default: 120
  90. #ReadTimeout 300
  91. # Waiting for a new job will timeout after this time (seconds).
  92. # Default: 30
  93. #IdleTimeout 60
  94. # Maximum depth directories are scanned at.
  95. # Default: 15
  96. #MaxDirectoryRecursion 20
  97. # Follow directory symlinks.
  98. # Default: no
  99. #FollowDirectorySymlinks yes
  100. # Follow regular file symlinks.
  101. # Default: no
  102. #FollowFileSymlinks yes
  103. # Perform a database check.
  104. # Default: 1800 (30 min)
  105. #SelfCheck 600
  106. # Execute a command when virus is found. In the command string %v will
  107. # be replaced with the virus name.
  108. # Default: no
  109. #VirusEvent /usr/local/bin/send_sms 123456789 "VIRUS ALERT: %v"
  110. # Run as another user (clamd must be started by root for this option to work)
  111. # Default: don't drop privileges
  112. User amavis
  113. # Initialize supplementary group access (clamd must be started by root).
  114. # Default: no
  115. AllowSupplementaryGroups yes
  116. # Stop daemon when libclamav reports out of memory condition.
  117. #ExitOnOOM yes
  118. # Don't fork into background.
  119. # Default: no
  120. #Foreground yes
  121. # Enable debug messages in libclamav.
  122. # Default: no
  123. #Debug yes
  124. # Do not remove temporary files (for debug purposes).
  125. # Default: no
  126. #LeaveTemporaryFiles yes
  127. # Detect Possibly Unwanted Applications.
  128. # Default: no
  129. #DetectPUA yes
  130. # In some cases (eg. complex malware, exploits in graphic files, and others),
  131. # ClamAV uses special algorithms to provide accurate detection. This option
  132. # controls the algorithmic detection.
  133. # Default: yes
  134. #AlgorithmicDetection yes
  135. ##
  136. ## Executable files
  137. ##
  138. # PE stands for Portable Executable - it's an executable file format used
  139. # in all 32 and 64-bit versions of Windows operating systems. This option allows
  140. # ClamAV to perform a deeper analysis of executable files and it's also
  141. # required for decompression of popular executable packers such as UPX, FSG,
  142. # and Petite.
  143. # Default: yes
  144. #ScanPE yes
  145. # Executable and Linking Format is a standard format for UN*X executables.
  146. # This option allows you to control the scanning of ELF files.
  147. # Default: yes
  148. #ScanELF yes
  149. # With this option clamav will try to detect broken executables (both PE and
  150. # ELF) and mark them as Broken.Executable.
  151. # Default: no
  152. #DetectBrokenExecutables yes
  153. ##
  154. ## Documents
  155. ##
  156. # This option enables scanning of OLE2 files, such as Microsoft Office
  157. # documents and .msi files.
  158. # Default: yes
  159. #ScanOLE2 yes
  160. # This option enables scanning within PDF files.
  161. # Default: no
  162. #ScanPDF yes
  163. ##
  164. ## Mail files
  165. ##
  166. # Enable internal e-mail scanner.
  167. # Default: yes
  168. #ScanMail yes
  169. # If an email contains URLs ClamAV can download and scan them.
  170. # WARNING: This option may open your system to a DoS attack.
  171. #          Never use it on loaded servers.
  172. # Default: no
  173. #MailFollowURLs no
  174. # Recursion level limit for the mail scanner.
  175. # Default: 64
  176. #MailMaxRecursion 128
  177. # With this option enabled ClamAV will try to detect phishing attempts by using
  178. # signatures.
  179. # Default: yes
  180. #PhishingSignatures yes
  181. # Scan URLs found in mails for phishing attempts using heuristics.
  182. # Default: yes
  183. #PhishingScanURLs yes
  184. # Use phishing detection only for domains listed in the .pdb database. It is
  185. # not recommended to have this option turned off, because scanning of all
  186. # domains may lead to many false positives!
  187. # Default: yes
  188. #PhishingRestrictedScan yes
  189. # Always block SSL mismatches in URLs, even if the URL isn't in the database.
  190. # This can lead to false positives.
  191. #
  192. # Default: no
  193. #PhishingAlwaysBlockSSLMismatch no
  194. # Always block cloaked URLs, even if URL isn't in database.
  195. # This can lead to false positives.
  196. #
  197. # Default: no
  198. #PhishingAlwaysBlockCloak no
  199. ##
  200. ## HTML
  201. ##
  202. # Perform HTML normalisation and decryption of MS Script Encoder code.
  203. # Default: yes
  204. #ScanHTML yes
  205. ##
  206. ## Archives
  207. ##
  208. # ClamAV can scan within archives and compressed files.
  209. # Default: yes
  210. #ScanArchive yes
  211. # The options below protect your system against Denial of Service attacks
  212. # using archive bombs.
  213. # Files in archives larger than this limit won't be scanned.
  214. # Value of 0 disables the limit.
  215. # Default: 10M
  216. #ArchiveMaxFileSize 15M
  217. # Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR
  218. # file, all files within it will also be scanned. This options specifies how
  219. # deeply the process should be continued.
  220. # Value of 0 disables the limit.
  221. # Default: 8
  222. #ArchiveMaxRecursion 10
  223. # Number of files to be scanned within an archive.
  224. # Value of 0 disables the limit.
  225. # Default: 1000
  226. #ArchiveMaxFiles 1500
  227. # If a file in an archive is compressed more than ArchiveMaxCompressionRatio
  228. # times it will be marked as a virus (Oversized.ArchiveType, e.g. Oversized.Zip)
  229. # Value of 0 disables the limit.
  230. # Default: 250
  231. #ArchiveMaxCompressionRatio 300
  232. # Use slower but memory efficient decompression algorithm.
  233. # only affects the bzip2 decompressor.
  234. # Default: no
  235. #ArchiveLimitMemoryUsage yes
  236. # Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
  237. # Default: no
  238. #ArchiveBlockEncrypted no
  239. # Mark archives as viruses (e.g. RAR.ExceededFileSize, Zip.ExceededFilesLimit)
  240. # if ArchiveMaxFiles, ArchiveMaxFileSize, or ArchiveMaxRecursion limit is
  241. # reached.
  242. # Default: no
  243. #ArchiveBlockMax no
  244. # Enable support for Sensory Networks' NodalCore hardware accelerator.
  245. # Default: no
  246. #NodalCoreAcceleration yes
  247. ##
  248. ## Clamuko settings
  249. ## WARNING: This is experimental software. It is very likely it will hang
  250. ##          up your system!!!
  251. ##
  252. # Enable Clamuko. Dazuko (/dev/dazuko) must be configured and running.
  253. # Default: no
  254. #ClamukoScanOnAccess yes
  255. # Set access mask for Clamuko.
  256. # Default: no
  257. #ClamukoScanOnOpen yes
  258. #ClamukoScanOnClose yes
  259. #ClamukoScanOnExec yes
  260. # Set the include paths (all files inside them will be scanned). You can have
  261. # multiple ClamukoIncludePath directives but each directory must be added
  262. # in a seperate line.
  263. # Default: disabled
  264. #ClamukoIncludePath /home
  265. #ClamukoIncludePath /students
  266. # Set the exclude paths. All subdirectories are also excluded.
  267. # Default: disabled
  268. #ClamukoExcludePath /home/bofh
  269. # Don't scan files larger than ClamukoMaxFileSize
  270. # Value of 0 disables the limit.
  271. # Default: 5M
  272. #ClamukoMaxFileSize 10M


 
amavisd.conf :

Code :
  1. use strict;
  2. # a minimalistic configuration file for amavisd-new with all necessary settings
  3. #
  4. #   see amavisd.conf-default for a list of all variables with their defaults;
  5. #   see amavisd.conf-sample for a traditional-style commented file;
  6. #   for more details see documentation in INSTALL, README_FILES/*
  7. #   and at http://www.ijs.si/software/amavisd [...] -docs.html
  8. # COMMONLY ADJUSTED SETTINGS:
  9. # @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
  10. # @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
  11. # $bypass_decode_parts = 1;         # controls running of decoders&dearchivers
  12. # @bypass_header_checks_maps = (1);
  13. $max_servers = 2;            # num of pre-forked children (2..15 is common), -m
  14. $daemon_user  = 'amavis';     # (no default;  customary: vscan or amavis), -u
  15. $daemon_group = 'amavis';     # (no default;  customary: vscan or amavis), -g
  16. $mydomain = 'cer83.net';   # a convenient default for other settings
  17. $MYHOME = '/var/amavis';   # a convenient default for other settings, -H
  18. $TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
  19. $ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR, used by SA, etc.
  20. $QUARANTINEDIR = '/var/virusmails';  # -Q
  21. # $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
  22. # $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R
  23. # $db_home   = "$MYHOME/db";      # dir for bdb nanny/cache/snmp databases, -D
  24. # $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
  25. # $lock_file = "$MYHOME/var/amavisd.lock";  # -L
  26. # $pid_file  = "$MYHOME/var/amavisd.pid";   # -P
  27. #NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually
  28. $log_level = 2;              # verbosity 0..5, -d
  29. $log_recip_templ = undef;    # disable by-recipient level-0 log entries
  30. $DO_SYSLOG = 1;              # log via syslogd (preferred)
  31. $syslog_facility = 'mail';   # Syslog facility as a string
  32.            # e.g.: mail, daemon, user, local0, ... local7
  33. $syslog_priority = 'debug';  # Syslog base (minimal) priority as a string,
  34.            # choose from: emerg, alert, crit, err, warning, notice, info, debug
  35. $enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and nanny)
  36. $enable_global_cache = 1;    # enable use of libdb-based cache if $enable_db=1
  37. $nanny_details_level = 2;    # nanny verbosity: 1: traditional, 2: detailed
  38. @local_domains_maps = ( [".$mydomain"] );  # list of all local domains
  39. @mynetworks = qw( 127.0.0.0/8 [:1] [FE80::]/10 [FEC0::]/10
  40.                   132.133.0.0/16 );
  41. $unix_socketname = "$MYHOME/amavisd.sock";  # amavisd-release or amavis-milter
  42.                # option(s) -p overrides $inet_socket_port and $unix_socketname
  43. $inet_socket_port = 10024;   # listen on this local TCP port(s)
  44. # $inet_socket_port = [10024,10026];  # listen on multiple TCP ports
  45. $policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
  46.   originating => 1,  # is true in MYNETS by default, but let's make it explicit
  47.   os_fingerprint_method => undef,  # don't query p0f for internal clients
  48. };
  49. # it is up to MTA to re-route mail from authenticated roaming users or
  50. # from internal hosts to a dedicated TCP port (such as 10026) for filtering
  51. $interface_policy{'10026'} = 'ORIGINATING';
  52. $policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
  53.   originating => 1,  # declare that mail was submitted by our smtp client
  54.   allow_disclaimers => 1,  # enables disclaimer insertion if available
  55.   # notify administrator of locally originating malware
  56.   virus_admin_maps => ["virusalert\@$mydomain"],
  57.   spam_admin_maps  => ["virusalert\@$mydomain"],
  58.   warnbadhsender   => 1,
  59.   # forward to a smtpd service providing DKIM signing service
  60.   forward_method => 'smtp:[127.0.0.1]:10027',
  61.   # force MTA conversion to 7-bit (e.g. before DKIM signing)
  62.   smtpd_discard_ehlo_keywords => ['8BITMIME'],
  63.   bypass_banned_checks_maps => [1],  # allow sending any file names and types
  64.   terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
  65. };
  66. $interface_policy{'SOCK'} = 'AM.PDP-SOCK'; # only applies with $unix_socketname
  67. # Use with amavis-release over a socket or with Petr Rehor's amavis-milter.c
  68. # (with amavis-milter.c from this package or old amavis.c client use 'AM.CL'):
  69. $policy_bank{'AM.PDP-SOCK'} = {
  70.   protocol => 'AM.PDP',
  71.   auth_required_release => 0,  # do not require secret_id for amavisd-release
  72. };
  73. $sa_tag_level_deflt  = -9999.9;  # add spam info headers if at, or above that level
  74. $sa_tag2_level_deflt = 5;  # add 'spam detected' headers at that level
  75. $sa_kill_level_deflt = 9999.9;  # triggers spam evasive actions (e.g. blocks mail)
  76. $sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent
  77. # $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off
  78. $penpals_bonus_score = 8;    # (no effect without a @storage_sql_dsn database)
  79. $penpals_threshold_high = $sa_kill_level_deflt;  # don't waste time on hi spam
  80. $sa_mail_body_size_limit = 500*1024; # don't waste time on SA if mail is larger
  81. $sa_local_tests_only = 0;    # only tests which do not require internet access?
  82. # @lookup_sql_dsn =
  83. #   ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
  84. #     ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
  85. #     ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
  86. # @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
  87. # $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP;
  88. #   defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16)
  89. $virus_admin               = "virusalert\@$mydomain";  # notifications recip.
  90. $mailfrom_notify_admin     = "virusalert\@$mydomain";  # notifications sender
  91. $mailfrom_notify_recip     = "virusalert\@$mydomain";  # notifications sender
  92. $mailfrom_notify_spamadmin = "spam.police\@$mydomain"; # notifications sender
  93. $mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
  94. @addr_extension_virus_maps      = ('virus');
  95. @addr_extension_banned_maps     = ('banned');
  96. @addr_extension_spam_maps       = ('spam');
  97. @addr_extension_bad_header_maps = ('badh');
  98. # $recipient_delimiter = '+';  # undef disables address extensions altogether
  99. # when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+
  100. $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
  101. # $dspam = 'dspam';
  102. $MAXLEVELS = 14;
  103. $MAXFILES = 1500;
  104. $MIN_EXPANSION_QUOTA =      100*1024;  # bytes  (default undef, not enforced)
  105. $MAX_EXPANSION_QUOTA = 300*1024*1024;  # bytes  (default undef, not enforced)
  106. $sa_spam_subject_tag = '{Spam?}';
  107. $defang_virus  = 1;  # MIME-wrap passed infected mail
  108. $defang_banned = 1;  # MIME-wrap passed mail containing banned name
  109. # for defanging bad headers only turn on certain minor contents categories:
  110. $defang_by_ccat{+CC_BADH.",3"} = 1;  # NUL or CR character in header
  111. $defang_by_ccat{+CC_BADH.",5"} = 1;  # header line longer than 998 characters
  112. $defang_by_ccat{+CC_BADH.",6"} = 1;  # header field syntax error
  113. # OTHER MORE COMMON SETTINGS (defaults may suffice):
  114. $myhostname = 'srvintra.cer83.net';  # must be a fully-qualified domain name!
  115. # $notify_method  = 'smtp:[127.0.0.1]:10025';
  116. # $forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
  117. # $final_virus_destiny      = D_DISCARD;
  118. # $final_banned_destiny     = D_BOUNCE;
  119. # $final_spam_destiny       = D_BOUNCE;
  120. $final_bad_header_destiny = D_PASS;
  121. # $os_fingerprint_method = 'p0f:127.0.0.1:2345';  # to query p0f-analyzer.pl
  122. ## hierarchy by which a final setting is chosen:
  123. ##   policy bank (based on port or IP address) -> *_by_ccat
  124. ##   *_by_ccat (based on mail contents) -> *_maps
  125. ##   *_maps (based on recipient address) -> final configuration value
  126. # SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)
  127. # $warnbadhsender,
  128. # $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps)
  129. #
  130. # @bypass_virus_checks_maps, @bypass_spam_checks_maps,
  131. # @bypass_banned_checks_maps, @bypass_header_checks_maps,
  132. #
  133. # @virus_lovers_maps, @spam_lovers_maps,
  134. # @banned_files_lovers_maps, @bad_header_lovers_maps,
  135. #
  136. # @blacklist_sender_maps, @score_sender_maps,
  137. #
  138. # $clean_quarantine_method, $virus_quarantine_to, $banned_quarantine_to,
  139. # $bad_header_quarantine_to, $spam_quarantine_to,
  140. #
  141. # $defang_bad_header, $defang_undecipherable, $defang_spam
  142. # REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS
  143. @keep_decoded_original_maps = (new_RE(
  144. # qr'^MAIL$',   # retain full original message for virus checking (can be slow)
  145.   qr'^MAIL-UNDECIPHERABLE$', # recheck full mail if it contains undecipherables
  146.   qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
  147. # qr'^Zip archive data',     # don't trust Archive::Zip
  148. ));
  149. # for $banned_namepath_re (a new-style of banned table) see amavisd.conf-sample
  150. $banned_filename_re = new_RE(
  151. ### BLOCKED ANYWHERE
  152. # qr'^UNDECIPHERABLE$',  # is or contains any undecipherable components
  153.   qr'^\.(exe-ms|dll)$',                   # banned file(1) types, rudimentary
  154. # qr'^\.(exe|lha|tnef|cab|dll)$',         # banned file(1) types
  155. ### BLOCK THE FOLLOWING, EXCEPT WITHIN UNIX ARCHIVES:
  156. # [ qr'^\.(gz|bz2)$'             => 0 ],  # allow any in gzip or bzip2
  157.   [ qr'^\.(rpm|cpio|tar)$'       => 0 ],  # allow any in Unix-type archives
  158.   qr'.\.(pif|scr)$'i,                     # banned extensions - rudimentary
  159. # qr'^\.zip$',                            # block zip type
  160. ### BLOCK THE FOLLOWING, EXCEPT WITHIN ARCHIVES:
  161. # [ qr'^\.(zip|rar|arc|arj|zoo)$'=> 0 ],  # allow any within these archives
  162.   qr'^application/x-msdownload$'i,        # block these MIME types
  163.   qr'^application/x-msdos-program$'i,
  164.   qr'^application/hta$'i,
  165. # qr'^message/partial$'i,         # rfc2046 MIME type
  166. # qr'^message/external-body$'i,   # rfc2046 MIME type
  167. # qr'^(application/x-msmetafile|image/x-wmf)$'i,  # Windows Metafile MIME type
  168. # qr'^\.wmf$',                            # Windows Metafile file(1) type
  169.   # block certain double extensions in filenames
  170.   qr'\.[^./]*[A-Za-z][^./]*\.\s*(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)[.\s]*$'i,
  171. # qr'\{[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}\}?'i, # Class ID CLSID, strict
  172. # qr'\{[0-9a-z]{4,}(-[0-9a-z]{4,}){0,7}\}?'i, # Class ID extension CLSID, loose
  173.   qr'.\.(exe|vbs|pif|scr|cpl)$'i,             # banned extension - basic
  174. # qr'.\.(exe|vbs|pif|scr|cpl|bat|cmd|com)$'i, # banned extension - basic+cmd
  175. # qr'.\.(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|emf|exe|fxp|grp|hlp|hta|
  176. #        inf|ins|isp|js|jse|lnk|mda|mdb|mde|mdw|mdt|mdz|msc|msi|msp|mst|
  177. #        ops|pcd|pif|prg|reg|scr|sct|shb|shs|vb|vbe|vbs|
  178. #        wmf|wsc|wsf|wsh)$'ix,  # banned ext - long
  179. # qr'.\.(ani|cur|ico)$'i,                 # banned cursors and icons filename
  180. # qr'^\.ani$',                            # banned animated cursor file(1) type
  181. # qr'.\.(mim|b64|bhx|hqx|xxe|uu|uue)$'i,  # banned extension - WinZip vulnerab.
  182. );
  183. # See http://support.microsoft.com/defau [...] US;q262631
  184. # and http://www.cknow.com/vtutor/vtextensions.htm
  185. # ENVELOPE SENDER SOFT-WHITELISTING / SOFT-BLACKLISTING
  186. @score_sender_maps = ({ # a by-recipient hash lookup table,
  187.                         # results from all matching recipient tables are summed
  188. # ## per-recipient personal tables  (NOTE: positive: black, negative: white)
  189. # 'user1@example.com'  => [{'bla-mobile.press@example.com' => 10.0}],
  190. # 'user3@example.com'  => [{'.ebay.com'                 => -3.0}],
  191. # 'user4@example.com'  => [{'cleargreen@cleargreen.com' => -7.0,
  192. #                           '.cleargreen.com'           => -5.0}],
  193.   ## site-wide opinions about senders (the '.' matches any recipient)
  194.   '.' => [  # the _first_ matching sender determines the score boost
  195.    new_RE(  # regexp-type lookup table, just happens to be all soft-blacklist
  196.     [qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou)@'i         => 5.0],
  197.     [qr'^(greatcasino|investments|lose_weight_today|market\.alert)@'i=> 5.0],
  198.     [qr'^(money2you|MyGreenCard|new\.tld\.registry|opt-out|opt-in)@'i=> 5.0],
  199.     [qr'^(optin|saveonlsmoking2002k|specialoffer|specialoffers)@'i   => 5.0],
  200.     [qr'^(stockalert|stopsnoring|wantsome|workathome|yesitsfree)@'i  => 5.0],
  201.     [qr'^(your_friend|greatoffers)@'i                                => 5.0],
  202.     [qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i                    => 5.0],
  203.    ),
  204. #  read_hash("/var/amavis/sender_scores_sitewide" ),
  205.    { # a hash-type lookup table (associative array)
  206.      'nobody@cert.org'                        => -3.0,
  207.      'cert-advisory@us-cert.gov'              => -3.0,
  208.      'owner-alert@iss.net'                    => -3.0,
  209.      'slashdot@slashdot.org'                  => -3.0,
  210.      'securityfocus.com'                      => -3.0,
  211.      'ntbugtraq@listserv.ntbugtraq.com'       => -3.0,
  212.      'security-alerts@linuxsecurity.com'      => -3.0,
  213.      'mailman-announce-admin@python.org'      => -3.0,
  214.      'amavis-user-admin@lists.sourceforge.net'=> -3.0,
  215.      'amavis-user-bounces@lists.sourceforge.net' => -3.0,
  216.      'spamassassin.apache.org'                => -3.0,
  217.      'notification-return@lists.sophos.com'   => -3.0,
  218.      'owner-postfix-users@postfix.org'        => -3.0,
  219.      'owner-postfix-announce@postfix.org'     => -3.0,
  220.      'owner-sendmail-announce@lists.sendmail.org'   => -3.0,
  221.      'sendmail-announce-request@lists.sendmail.org' => -3.0,
  222.      'donotreply@sendmail.org'                => -3.0,
  223.      'ca+envelope@sendmail.org'               => -3.0,
  224.      'noreply@freshmeat.net'                  => -3.0,
  225.      'owner-technews@postel.acm.org'          => -3.0,
  226.      'ietf-123-owner@loki.ietf.org'           => -3.0,
  227.      'cvs-commits-list-admin@gnome.org'       => -3.0,
  228.      'rt-users-admin@lists.fsck.com'          => -3.0,
  229.      'clp-request@comp.nus.edu.sg'            => -3.0,
  230.      'surveys-errors@lists.nua.ie'            => -3.0,
  231.      'emailnews@genomeweb.com'                => -5.0,
  232.      'yahoo-dev-null@yahoo-inc.com'           => -3.0,
  233.      'returns.groups.yahoo.com'               => -3.0,
  234.      'clusternews@linuxnetworx.com'           => -3.0,
  235.      lc('lvs-users-admin@LinuxVirtualServer.org')    => -3.0,
  236.      lc('owner-textbreakingnews@CNNIMAIL12.CNN.COM') => -5.0,
  237.      # soft-blacklisting (positive score)
  238.      'sender@example.net'                     =>  3.0,
  239.      '.example.net'                           =>  1.0,
  240.    },
  241.   ],  # end of site-wide tables
  242. });
  243. @decoders = (
  244.   ['mail', \&do_mime_decode],
  245.   ['asc',  \&do_ascii],
  246.   ['uue',  \&do_ascii],
  247.   ['hqx',  \&do_ascii],
  248.   ['ync',  \&do_ascii],
  249.   ['F',    \&do_uncompress, ['unfreeze','freeze -d','melt','fcat'] ],
  250.   ['Z',    \&do_uncompress, ['uncompress','gzip -d','zcat'] ],
  251.   ['gz',   \&do_uncompress,  'gzip -d'],
  252.   ['gz',   \&do_gunzip],
  253.   ['bz2',  \&do_uncompress,  'bzip2 -d'],
  254.   ['lzo',  \&do_uncompress,  'lzop -d'],
  255.   ['rpm',  \&do_uncompress, ['rpm2cpio.pl','rpm2cpio'] ],
  256.   ['cpio', \&do_pax_cpio,   ['pax','gcpio','cpio'] ],
  257.   ['tar',  \&do_pax_cpio,   ['pax','gcpio','cpio'] ],
  258.   ['deb',  \&do_ar,          'ar'],
  259. # ['a',    \&do_ar,          'ar'],  # unpacking .a seems an overkill
  260.   ['zip',  \&do_unzip],
  261.   ['7z',   \&do_7zip,       ['7zr','7za','7z'] ],
  262.   ['rar',  \&do_unrar,      ['rar','unrar'] ],
  263.   ['arj',  \&do_unarj,      ['arj','unarj'] ],
  264.   ['arc',  \&do_arc,        ['nomarch','arc'] ],
  265.   ['zoo',  \&do_zoo,        ['zoo','unzoo'] ],
  266.   ['lha',  \&do_lha,         'lha'],
  267. # ['doc',  \&do_ole,         'ripole'],
  268.   ['cab',  \&do_cabextract,  'cabextract'],
  269.   ['tnef', \&do_tnef_ext,    'tnef'],
  270.   ['tnef', \&do_tnef],
  271. # ['sit',  \&do_unstuff,     'unstuff'],  # broken/unsafe decoder
  272.   ['exe',  \&do_executable, ['rar','unrar'], 'lha', ['arj','unarj'] ],
  273. );
  274. @av_scanners = (
  275. # ### http://www.clanfield.info/sophie/ (http://www.vanja.com/tools/sophie/)
  276. # ['Sophie',
  277. #   \&ask_daemon, ["{}/\n", '/var/run/sophie'],
  278. #   qr/(?x)^ 0+ ( : | [\000\r\n]* $)/,  qr/(?x)^ 1 ( : | [\000\r\n]* $)/,
  279. #   qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/ ],
  280. # ### http://www.csupomona.edu/~henson/w [...] SAVI-Perl/
  281. # ['Sophos SAVI', \&sophos_savi ],
  282. # ### http://www.clamav.net/
  283. # ['ClamAV-clamd',
  284. #   \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd"],
  285. #   qr/\bOK$/, qr/\bFOUND$/,
  286. #   qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
  287. # # NOTE: run clamd under the same user as amavisd, or run it under its own
  288. # #   uid such as clamav, add user clamav to the amavis group, and then add
  289. # #   AllowSupplementaryGroups to clamd.conf;
  290. # # NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
  291. # #   this entry; when running chrooted one may prefer socket "$MYHOME/clamd".
  292. # ### http://www.clamav.net/ and CPAN  (memory-hungry! clamd is preferred)
  293. # # note that Mail::ClamAV requires perl to be build with threading!
  294. # ['Mail::ClamAV', \&ask_clamav, "*", [0], [1], qr/^INFECTED: (.+)/],
  295. # ### http://www.openantivirus.org/
  296. # ['OpenAntiVirus ScannerDaemon (OAV)',
  297. #   \&ask_daemon, ["SCAN {}\n", '127.0.0.1:8127'],
  298. #   qr/^OK/, qr/^FOUND: /, qr/^FOUND: (.+)/ ],
  299. # ### http://www.vanja.com/tools/trophie/
  300. # ['Trophie',
  301. #   \&ask_daemon, ["{}/\n", '/var/run/trophie'],
  302. #   qr/(?x)^ 0+ ( : | [\000\r\n]* $)/,  qr/(?x)^ 1 ( : | [\000\r\n]* $)/,
  303. #   qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/ ],
  304. # ### http://www.grisoft.com/
  305. # ['AVG Anti-Virus',
  306. #   \&ask_daemon, ["SCAN {}\n", '127.0.0.1:55555'],
  307. #   qr/^200/, qr/^403/, qr/^403 .*?: ([^\r\n]+)/ ],
  308. # ### http://www.f-prot.com/
  309. # ['FRISK F-Prot Daemon',
  310. #   \&ask_daemon,
  311. #   ["GET {}/*?-dumb%20-archive%20-packed HTTP/1.0\r\n\r\n",
  312. #     ['127.0.0.1:10200','127.0.0.1:10201','127.0.0.1:10202',
  313. #      '127.0.0.1:10203','127.0.0.1:10204'] ],
  314. #   qr/(?i)<summary[^>]*>clean<\/summary>/,
  315. #   qr/(?i)<summary[^>]*>infected<\/summary>/,
  316. #   qr/(?i)<name>(.+)<\/name>/ ],
  317. # ### http://www.sald.com/, http://www.dials.ru/english/, http://www.drweb.ru/
  318. # ['DrWebD', \&ask_daemon,   # DrWebD 4.31 or later
  319. #   [pack('N',1).  # DRWEBD_SCAN_CMD
  320. #    pack('N',0x00280001).   # DONT_CHANGEMAIL, IS_MAIL, RETURN_VIRUSES
  321. #    pack('N',     # path length
  322. #      length("$TEMPBASE/amavis-yyyymmddTHHMMSS-xxxxx/parts/pxxx" )).
  323. #    '{}/*'.       # path
  324. #    pack('N',0).  # content size
  325. #    pack('N',0),
  326. #    '/var/drweb/run/drwebd.sock',
  327. #  # '/var/amavis/var/run/drwebd.sock',   # suitable for chroot
  328. #  # '/usr/local/drweb/run/drwebd.sock',  # FreeBSD drweb ports default
  329. #  # '127.0.0.1:3000',                    # or over an inet socket
  330. #   ],
  331. #   qr/\A\x00[\x10\x11][\x00\x10]\x00/s,         # IS_CLEAN,EVAL_KEY; SKIPPED
  332. #   qr/\A\x00[\x00\x01][\x00\x10][\x20\x40\x80]/s, # KNOWN_V,UNKNOWN_V,V._MODIF
  333. #   qr/\A.{12}(?:infected with )?([^\x00]+)\x00/s,
  334. # ],
  335. # # NOTE: If using amavis-milter, change length to:
  336. # # length("$TEMPBASE/amavis-milter-xxxxxxxxxxxxxx/parts/pxxx" ).
  337.   ### http://www.kaspersky.com/  (kav4mailservers)
  338.   ['KasperskyLab AVP - aveclient',
  339.     ['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient',
  340.      '/opt/kav/5.5/kav4mailservers/bin/aveclient','aveclient'],
  341.     '-p /var/run/aveserver -s {}/*',
  342.     [0,3,6,8], qr/\b(INFECTED|SUSPICION|SUSPICIOUS)\b/,
  343.     qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.+)/,
  344.   ],
  345.   # NOTE: one may prefer [0],[2,3,4,5], depending on how suspicious,
  346.   # currupted or protected archives are to be handled
  347.   ### http://www.kaspersky.com/
  348.   ['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'],
  349.     '-* -P -B -Y -O- {}', [0,3,6,8], [2,4],    # any use for -A -K   ?
  350.     qr/infected: (.+)/,
  351.     sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"},
  352.     sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
  353.   ],
  354.   ### The kavdaemon and AVPDaemonClient have been removed from Kasperky
  355.   ### products and replaced by aveserver and aveclient
  356.   ['KasperskyLab AVPDaemonClient',
  357.     [ '/opt/AVP/kavdaemon',       'kavdaemon',
  358.       '/opt/AVP/AvpDaemonClient', 'AvpDaemonClient',
  359.       '/opt/AVP/AvpTeamDream',    'AvpTeamDream',
  360.       '/opt/AVP/avpdc', 'avpdc' ],
  361.     "-f=$TEMPBASE {}", [0,8], [3,4,5,6], qr/infected: ([^\r\n]+)/ ],
  362.     # change the startup-script in /etc/init.d/kavd to:
  363.     #   DPARMS="-* -Y -dl -f=/var/amavis /var/amavis"
  364.     #   (or perhaps:   DPARMS="-I0 -Y -* /var/amavis" )
  365.     # adjusting /var/amavis above to match your $TEMPBASE.
  366.     # The '-f=/var/amavis' is needed if not running it as root, so it
  367.     # can find, read, and write its pid file, etc., see 'man kavdaemon'.
  368.     # defUnix.prf: there must be an entry "*/var/amavis" (or whatever
  369.     #   directory $TEMPBASE specifies) in the 'Names=' section.
  370.     # cd /opt/AVP/DaemonClients; configure; cd Sample; make
  371.     # cp AvpDaemonClient /opt/AVP/
  372.     # su - vscan -c "${PREFIX}/kavdaemon ${DPARMS}"
  373.   ### http://www.centralcommand.com/
  374.   ['CentralCommand Vexira (new) vascan',
  375.     ['vascan','/usr/lib/Vexira/vascan'],
  376.     "-a s --timeout=60 --temp=$TEMPBASE -y $QUARANTINEDIR ".
  377.     "--log=/var/log/vascan.log {}",
  378.     [0,3], [1,2,5],
  379.     qr/(?x)^\s* (?:virus|iworm|macro|mutant|sequence|trojan)\ found:\ ( [^\]\s']+ )\ \.\.\.\ / ],
  380.     # Adjust the path of the binary and the virus database as needed.
  381.     # 'vascan' does not allow to have the temp directory to be the same as
  382.     # the quarantine directory, and the quarantine option can not be disabled.
  383.     # If $QUARANTINEDIR is not used, then another directory must be specified
  384.     # to appease 'vascan'. Move status 3 to the second list if password
  385.     # protected files are to be considered infected.
  386.   ### http://www.avira.com/
  387.   ### Avira AntiVir (formerly H+BEDV) or (old) CentralCommand Vexira Antivirus
  388.   ['Avira AntiVir', ['antivir','vexira'],
  389.     '--allfiles -noboot -nombr -rs -s -z {}', [0], qr/ALERT:|VIRUS:/,
  390.     qr/(?x)^\s* (?: ALERT: \s* (?: \[ | [^']* ' ) |
  391.          (?i) VIRUS:\ .*?\ virus\ '?) ( [^\]\s']+ )/ ],
  392.     # NOTE: if you only have a demo version, remove -z and add 214, as in:
  393.     #  '--allfiles -noboot -nombr -rs -s {}', [0,214], qr/ALERT:|VIRUS:/,
  394.   ### http://www.commandsoftware.com/
  395.   ['Command AntiVirus for Linux', 'csav',
  396.     '-all -archive -packed {}', [50], [51,52,53],
  397.     qr/Infection: (.+)/ ],
  398.   ### http://www.symantec.com/
  399.   ['Symantec CarrierScan via Symantec CommandLineScanner',
  400.     'cscmdline', '-a scan -i 1 -v -s 127.0.0.1:7777 {}',
  401.     qr/^Files Infected:\s+0$/, qr/^Infected\b/,
  402.     qr/^(?:Info|Virus Name):\s+(.+)/ ],
  403.   ### http://www.symantec.com/
  404.   ['Symantec AntiVirus Scan Engine',
  405.     'savsecls', '-server 127.0.0.1:7777 -mode scanrepair -details -verbose {}',
  406.     [0], qr/^Infected\b/,
  407.     qr/^(?:Info|Virus Name):\s+(.+)/ ],
  408.     # NOTE: check options and patterns to see which entry better applies
  409. # ### http://www.f-secure.com/products/anti-virus/  version 4.65
  410. #  ['F-Secure Antivirus for Linux servers',
  411. #   ['/opt/f-secure/fsav/bin/fsav', 'fsav'],
  412. #   '--delete=no --disinf=no --rename=no --archive=yes --auto=yes '.
  413. #   '--dumb=yes --list=no --mime=yes {}', [0], [3,6,8],
  414. #   qr/(?:infection|Infected|Suspected): (.+)/ ],
  415.   ### http://www.f-secure.com/products/anti-virus/  version 5.52
  416.    ['F-Secure Antivirus for Linux servers',
  417.     ['/opt/f-secure/fsav/bin/fsav', 'fsav'],
  418.     '--virus-action1=report --archive=yes --auto=yes '.
  419.     '--dumb=yes --list=no --mime=yes {}', [0], [3,4,6,8],
  420.     qr/(?:infection|Infected|Suspected|Riskware): (.+)/ ],
  421.     # NOTE: internal archive handling may be switched off by '--archive=no'
  422.     #   to prevent fsav from exiting with status 9 on broken archives
  423. # ### http://www.avast.com/
  424. # ['avast! Antivirus daemon',
  425. #   \&ask_daemon,       # greets with 220, terminate with QUIT
  426. #   ["SCAN {}\015\012QUIT\015\012", '/var/run/avast4/mailscanner.sock'],
  427. #   qr/\t\[\+\]/, qr/\t\[L\]\t/, qr/\t\[L\]\t([^[ \t\015\012]+)/ ],
  428. # ### http://www.avast.com/
  429. # ['avast! Antivirus - Client/Server Version', 'avastlite',
  430. #   '-a /var/run/avast4/mailscanner.sock -n {}', [0], [1],
  431. #   qr/\t\[L\]\t([^[ \t\015\012]+)/ ],
  432.   ['CAI InoculateIT', 'inocucmd',  # retired product
  433.     '-sec -nex {}', [0], [100],
  434.     qr/was infected by virus (.+)/ ],
  435.   # see: http://www.flatmtn.com/computer/Li [...] s_CAI.html
  436.   ### http://www3.ca.com/Solutions/Product.asp?ID=156  (ex InoculateIT)
  437.   ['CAI eTrust Antivirus', 'etrust-wrapper',
  438.     '-arc -nex -spm h {}', [0], [101],
  439.     qr/is infected by virus: (.+)/ ],
  440.     # NOTE: requires suid wrapper around inocmd32; consider flag: -mod reviewer
  441.     # see http://marc.theaimsgroup.com/?l=am [...] 9779912783
  442.   ### http://mks.com.pl/english.html
  443.   ['MkS_Vir for Linux (beta)', ['mks32','mks'],
  444.     '-s {}/*', [0], [1,2],
  445.     qr/--[ \t]*(.+)/ ],
  446.   ### http://mks.com.pl/english.html
  447.   ['MkS_Vir daemon', 'mksscan',
  448.     '-s -q {}', [0], [1..7],
  449.     qr/^... (\S+)/ ],
  450. # ### http://www.nod32.com/,  version v2.52 and above
  451. # ['ESET NOD32 for Linux Mail servers',
  452. #   ['/opt/eset/nod32/bin/nod32cli', 'nod32cli'],
  453. #    '--subdir --files -z --sfx --rtp --adware --unsafe --pattern --heur '.
  454. #    '-w -a --action-on-infected=accept --action-on-uncleanable=accept '.
  455. #    '--action-on-notscanned=accept {}',
  456. #   [0,3], [1,2], qr/virus="([^"]+)"/ ],
  457.   ### http://www.eset.com/, version v2.7
  458.   ['ESET NOD32 Linux Mail Server - command line interface',
  459.     ['/usr/bin/nod32cli', '/opt/eset/nod32/bin/nod32cli', 'nod32cli'],
  460.     '--subdir {}', [0,3], [1,2], qr/virus="([^"]+)"/ ],
  461.   ## http://www.nod32.com/,  NOD32LFS version 2.5 and above
  462.   ['ESET NOD32 for Linux File servers',
  463.     ['/opt/eset/nod32/sbin/nod32','nod32'],
  464.     '--files -z --mail --sfx --rtp --adware --unsafe --pattern --heur '.
  465.     '-w -a --action=1 -b {}',
  466.     [0], [1,10], qr/^object=.*, virus="(.*?)",/ ],
  467. # Experimental, based on posting from Rado Dibarbora (Dibo) on 2002-05-31
  468. # ['ESET Software NOD32 Client/Server (NOD32SS)',
  469. #   \&ask_daemon2,    # greets with 200, persistent, terminate with QUIT
  470. #   ["SCAN {}/*\r\n", '127.0.0.1:8448' ],
  471. #   qr/^200 File OK/, qr/^201 /, qr/^201 (.+)/ ],
  472.   ### http://www.norman.com/products_nvc.shtml
  473.   ['Norman Virus Control v5 / Linux', 'nvcc',
  474.     '-c -l:0 -s -u -temp:$TEMPBASE {}', [0,10,11], [1,2,14],
  475.     qr/(?i).* virus in .* -> \'(.+)\'/ ],
  476.   ### http://www.pandasoftware.com/
  477.   ['Panda CommandLineSecure 9 for Linux',
  478.     ['/opt/pavcl/usr/bin/pavcl','pavcl'],
  479.     '-auto -aex -heu -cmp -nbr -nor -nos -eng -nob {}',
  480.     qr/Number of files infected[ .]*: 0+(?!\d)/,
  481.     qr/Number of files infected[ .]*: 0*[1-9]/,
  482.     qr/Found virus :\s*(\S+)/ ],
  483.   # NOTE: for efficiency, start the Panda in resident mode with 'pavcl -tsr'
  484.   # before starting amavisd - the bases are then loaded only once at startup.
  485.   # To reload bases in a signature update script:
  486.   #   /opt/pavcl/usr/bin/pavcl -tsr -ulr; /opt/pavcl/usr/bin/pavcl -tsr
  487.   # Please review other options of pavcl, for example:
  488.   #  -nomalw, -nojoke, -nodial, -nohackt, -nospyw, -nocookies
  489. # ### http://www.pandasoftware.com/
  490. # ['Panda Antivirus for Linux', ['pavcl'],
  491. #   '-TSR -aut -aex -heu -cmp -nbr -nor -nso -eng {}',
  492. #   [0], [0x10, 0x30, 0x50, 0x70, 0x90, 0xB0, 0xD0, 0xF0],
  493. #   qr/Found virus :\s*(\S+)/ ],
  494. # GeCAD AV technology is acquired by Microsoft; RAV has been discontinued.
  495. # Check your RAV license terms before fiddling with the following two lines!
  496. # ['GeCAD RAV AntiVirus 8', 'ravav',
  497. #   '--all --archive --mail {}', [1], [2,3,4,5], qr/Infected: (.+)/ ],
  498. # # NOTE: the command line switches changed with scan engine 8.5 !
  499. # # (btw, assigning stdin to /dev/null causes RAV to fail)
  500.   ### http://www.nai.com/
  501.   ['NAI McAfee AntiVirus (uvscan)', 'uvscan',
  502.     '--secure -rv --mime --summary --noboot - {}', [0], [13],
  503.     qr/(?x) Found (?:
  504.         \ the\ (.+)\ (?:virus|trojan)  |
  505.         \ (?:virus|trojan)\ or\ variant\ ([^ ]+)  |
  506.         :\ (.+)\ NOT\ a\ virus)/,
  507.   # sub {$ENV{LD_PRELOAD}='/lib/libc.so.6'},
  508.   # sub {delete $ENV{LD_PRELOAD}},
  509.   ],
  510.   # NOTE1: with RH9: force the dynamic linker to look at /lib/libc.so.6 before
  511.   # anything else by setting environment variable LD_PRELOAD=/lib/libc.so.6
  512.   # and then clear it when finished to avoid confusing anything else.
  513.   # NOTE2: to treat encrypted files as viruses replace the [13] with:
  514.   #  qr/^\s{5,}(Found|is password-protected|.*(virus|trojan))/
  515.   ### http://www.virusbuster.hu/en/
  516.   ['VirusBuster', ['vbuster', 'vbengcl'],
  517.     "{} -ss -i '*' -log=$MYHOME/vbuster.log", [0], [1],
  518.     qr/: '(.*)' - Virus/ ],
  519.   # VirusBuster Ltd. does not support the daemon version for the workstation
  520.   # engine (vbuster-eng-1.12-linux-i386-libc6.tgz) any longer. The names of
  521.   # binaries, some parameters AND return codes have changed (from 3 to 1).
  522.   # See also the new Vexira entry 'vascan' which is possibly related.
  523. # ### http://www.virusbuster.hu/en/
  524. # ['VirusBuster (Client + Daemon)', 'vbengd',
  525. #   '-f -log scandir {}', [0], [3],
  526. #   qr/Virus found = (.*);/ ],
  527. # # HINT: for an infected file it always returns 3,
  528. # # although the man-page tells a different story
  529.   ### http://www.cyber.com/
  530.   ['CyberSoft VFind', 'vfind',
  531.     '--vexit {}/*', [0], [23], qr/##==>>>> VIRUS ID: CVDL (.+)/,
  532.   # sub {$ENV{VSTK_HOME}='/usr/lib/vstk'},
  533.   ],
  534.   ### http://www.avast.com/
  535.   ['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'],
  536.     '-a -i -n -t=A {}', [0], [1], qr/\binfected by:\s+([^ \t\n\[\]]+)/ ],
  537.   ### http://www.ikarus-software.com/
  538.   ['Ikarus AntiVirus for Linux', 'ikarus',
  539.     '{}', [0], [40], qr/Signature (.+) found/ ],
  540.   ### http://www.bitdefender.com/
  541.   ['BitDefender', 'bdc',
  542.     '--arc --mail {}', qr/^Infected files *:0+(?!\d)/,
  543.     qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/,
  544.     qr/(?:suspected|infected): (.*)(?:\033|$)/ ],
  545.   # consider also: --all --nowarn --alev=15 --flev=15.  The --all argument may
  546.   # not apply to your version of bdc, check documentation and see 'bdc --help'
  547.   ### ArcaVir for Linux and Unix http://www.arcabit.pl/
  548.   ['ArcaVir for Linux', ['arcacmd','arcacmd.static'],
  549.     '-v 1 -summary 0 -s {}', [0], [1,2],
  550.     qr/(?:VIR|WIR):[ \t]*(.+)/ ],
  551. # ['File::Scan', sub {Amavis::AV::ask_av(sub{
  552. #   use File::Scan; my($fn)=@_;
  553. #   my($f)=File::Scan->new(max_txt_size=>0, max_bin_size=>0);
  554. #   my($vname) = $f->scan($fn);
  555. #   $f->error ? (2,"Error: ".$f->error)
  556. #   : ($vname ne '') ? (1,"$vname FOUND" ) : (0,"Clean" )}, @_) },
  557. #   ["{}/*"], [0], [1], qr/^(.*) FOUND$/ ],
  558. # ### fully-fledged checker for JPEG marker segments of invalid length
  559. # ['check-jpeg',
  560. #   sub { use JpegTester (); Amavis::AV::ask_av(\&JpegTester::test_jpeg, @_) },
  561. #   ["{}/*"], undef, [1], qr/^(bad jpeg: .*)$/ ],
  562. # # NOTE: place file JpegTester.pm somewhere where Perl can find it,
  563. # #       for example in /usr/local/lib/perl5/site_perl
  564. );
  565. @av_scanners_backup = (
  566.   ### http://www.clamav.net/   - backs up clamd or Mail::ClamAV
  567.   ['ClamAV-clamscan', 'clamscan',
  568.     "--stdout --no-summary -r --tempdir=$TEMPBASE {}",
  569.     [0], qr/:.*\sFOUND$/, qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
  570.   ### http://www.f-prot.com/   - backs up F-Prot Daemon
  571.   ['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'],
  572.     '-dumb -archive -packed {}', [0,8], [3,6],   # or: [0], [3,6,8],
  573.     qr/(?:Infection:|security risk named) (.+)|\s+contains\s+(.+)$/ ],
  574.   ### http://www.trendmicro.com/   - backs up Trophie
  575.   ['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'],
  576.     '-za -a {}', [0], qr/Found virus/, qr/Found virus (.+) in/ ],
  577.   ### http://www.sald.com/, http://drweb.imshop.de/   - backs up DrWebD
  578.   ['drweb - DrWeb Antivirus',  # security LHA hole in Dr.Web 4.33 and earlier
  579.     ['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'],
  580.     '-path={} -al -go -ot -cn -upn -ok-',
  581.     [0,32], [1,9,33], qr' infected (?:with|by)(?: virus)? (.*)$'],
  582.    ### http://www.kaspersky.com/
  583.    ['Kaspersky Antivirus v5.5',
  584.      ['/opt/kaspersky/kav4fs/bin/kav4fs-kavscanner',
  585.       '/opt/kav/5.5/kav4unix/bin/kavscanner',
  586.       '/opt/kav/5.5/kav4mailservers/bin/kavscanner', 'kavscanner'],
  587.      '-i0 -xn -xp -mn -R -ePASBME {}/*', [0,10,15], [5,20,21,25],
  588.      qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.*)/ ,
  589. #    sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"},
  590. #    sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
  591.    ],
  592. # Commented out because the name 'sweep' clashes with Debian and FreeBSD
  593. # package/port of an audio editor. Make sure the correct 'sweep' is found
  594. # in the path when enabling.
  595. #
  596. # ### http://www.sophos.com/   - backs up Sophie or SAVI-Perl
  597. # ['Sophos Anti Virus (sweep)', 'sweep',
  598. #   '-nb -f -all -rec -ss -sc -archive -cab -mime -oe -tnef '.
  599. #   '--no-reset-atime {}',
  600. #   [0,2], qr/Virus .*? found/,
  601. #   qr/^>>> Virus(?: fragment)? '?(.*?)'? found/,
  602. # ],
  603. # # other options to consider: -idedir=/usr/local/sav
  604. # always succeeds (uncomment to consider mail clean if all other scanners fail)
  605. # ['always-clean', sub {0}],
  606. );
  607. 1;  # insure a defined return


Message édité par jaymzwise le 06-11-2007 à 10:07:43
n°974776
toniotonio
Posté le 06-11-2007 à 10:02:47  profilanswer
 

il manque la fin d'amavisd.conf non ?


---------------
Messagerie dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com
n°974777
jaymzwise
Posté le 06-11-2007 à 10:08:15  profilanswer
 

En effet, j'avais oublié un "petit" morceau  :D

mood
Publicité
Posté le 06-11-2007 à 10:08:15  profilanswer
 

n°974778
toniotonio
Posté le 06-11-2007 à 10:11:57  profilanswer
 

remplace tout ce qui a la fin entre les lignes
 

Code :
  1. @av_scanners = (


 
et  
 

Code :
  1. 1;  # insure a defined return


 
par
 

Code :
  1. # ### http://www.clamav.net/
  2. ['ClamAV-clamd',
  3.    \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
  4.    qr/\bOK$/, qr/\bFOUND$/,
  5.    qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
  6. );
  7. @av_scanners_backup = (
  8.   ### http://www.clamav.net/   - backs up clamd or Mail::ClamAV
  9.   ['ClamAV-clamscan', 'clamscan',
  10.     "--stdout --no-summary -r --tempdir=$TEMPBASE {}",
  11.     [0], qr/:.*\sFOUND$/, qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
  12. );


---------------
Messagerie dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com
n°974792
jaymzwise
Posté le 06-11-2007 à 10:27:36  profilanswer
 

Nickel.
Le message a disparu des logs.
 
Encore merci pour ton aide.
 
Petite question concernant SpamAssassin drivé par Amavis.
Le fichier /etc/mail/spamassassin/local.cf est-il quand même pris en compte ?
J'ai activé l'utilisation de bayes, ce paramètre est-il effectif ?
 
Lorsque je reçois un spam, j'ai bien le sujet qui est modifié mais je n'ai plus le détail du rapport dans le mail.
Je suppose que c'est une option à activer mais je ne vois pas laquelle.

n°974798
toniotonio
Posté le 06-11-2007 à 10:31:52  profilanswer
 

jaymzwise a écrit :

Nickel.
Le message a disparu des logs.
 
Encore merci pour ton aide.
 
Petite question concernant SpamAssassin drivé par Amavis.
Le fichier /etc/mail/spamassassin/local.cf est-il quand même pris en compte ?
J'ai activé l'utilisation de bayes, ce paramètre est-il effectif ?
 
Lorsque je reçois un spam, j'ai bien le sujet qui est modifié mais je n'ai plus le détail du rapport dans le mail.
Je suppose que c'est une option à activer mais je ne vois pas laquelle.


 
 
un peu des 2 en fait.
pour les options principales c'est le fichier amavis.conf qui est prioritaire: le niveau de declenchement spam, l'ajout des headers....
d'ailleurs pour le header il faut ajouter dans amavisd.conf:
 

Code :
  1. $sa_spam_report_header = 1;


 
dans le local.cf de SA certaines options fonctionnent toujours comme notamment tout ce qui concerne bayes.
 
Jette un oeil a mon tuto pour la config.


---------------
Messagerie dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com
n°974824
jaymzwise
Posté le 06-11-2007 à 10:54:01  profilanswer
 

J'ai rajouté $sa_spam_report_header = 1; dans mon amavisd.conf.
J'ai bien un détail dans le sujet mais avec mon ancienne configuration, le spam était marqué puis transformé en pièce jointe et dans le corps du message j'avais le détail du score.

n°974831
toniotonio
Posté le 06-11-2007 à 10:58:19  profilanswer
 

de memoire c'est  

Code :
  1. $defang_spam = 1;


 
pour avoir le comportement que tu desires.


---------------
Messagerie dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com
n°974839
jaymzwise
Posté le 06-11-2007 à 11:03:19  profilanswer
 

Exact, tout fonctionne parfaitement  :sol:  
Un grand merci pour ton aide  :D

mood
Publicité
Posté le   profilanswer
 

 Page :   1  2
Page Suivante

Aller à :
Ajouter une réponse
 

Sujets relatifs
Pb entre les version Perl de SpamAssassinPerformance Spamassassin
Serveur messagerie , Probléme Spamassassinquestion postfix+amavis+clamav+spamassassin
Problème Clamav et SpamassassinScores SpamAssassin
[Postfix + Amavis + Spamassassin] Spamassassin n'attribue pas de scorePostfix et Spamassassin ne dialoguent pas
Mrtg/Bind9 probleme de statsspamassassin ne trouve plus rien
Plus de sujets relatifs à : Stats quotidiennes SpamAssassin


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR