Advertisement
fakessh

dspam.conf

Dec 27th, 2011
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.51 KB | None | 0 0
  1. ks37777 ~]# cat /etc/dspam.conf
  2. ## $Id: dspam.conf.in,v 1.100 2011/07/09 00:00:52 sbajic Exp $
  3. ## dspam.conf -- DSPAM configuration file
  4. ##
  5.  
  6. #
  7. # DSPAM Home: Specifies the base directory to be used for DSPAM storage
  8. #
  9. Home /var/lib/dspam
  10.  
  11. #
  12. # StorageDriver: Specifies the storage driver backend (library) to use.
  13. # You'll only need to set this if you are using dynamic storage driver plugins
  14. # from a binary distribution. The default build statically links the storage
  15. # driver (when only one is specified at configure time), overriding this
  16. # setting, which only comes into play if multiple storage drivers are specified
  17. # at configure time. When using dynamic linking, be sure to include the path
  18. # to the library if necessary, and some systems may use an extension other
  19. # than .so (e.g. OSX uses .dylib).
  20. #
  21. # Options include:
  22. #
  23. # libmysql_drv.so libpgsql_drv.so libsqlite_drv.so
  24. # libsqlite3_drv.so libhash_drv.so
  25. #
  26. # IMPORTANT: Switching storage drivers requires more than merely changing
  27. # this option. If you do not wish to lose all of your data, you will need to
  28. # migrate it to the new backend before making this change.
  29. #
  30. StorageDriver /usr/lib/dspam/libhash_drv.so
  31.  
  32. #
  33. # Trusted Delivery Agent: Specifies the local delivery agent DSPAM should call
  34. # when delivering mail as a trusted user. Use %u to specify the user DSPAM is
  35. # processing mail for. It is generally a good idea to allow the MTA to specify
  36. # the pass-through arguments at run-time, but they may also be specified here.
  37. #
  38. # Most operating system defaults:
  39. #TrustedDeliveryAgent "/usr/bin/procmail" # Linux
  40. #TrustedDeliveryAgent "/usr/bin/mail" # Solaris
  41. #TrustedDeliveryAgent "/usr/libexec/mail.local" # FreeBSD
  42. #TrustedDeliveryAgent "/usr/bin/procmail" # Cygwin
  43. #
  44. # Other popular configurations:
  45. #TrustedDeliveryAgent "/usr/cyrus/bin/deliver" # Cyrus
  46. #TrustedDeliveryAgent "/bin/maildrop" # Maildrop
  47. #TrustedDeliveryAgent "/usr/local/sbin/exim -oMr spam-scanned" # Exim
  48.  
  49.  
  50. Home /var/lib/dspam
  51. StorageDriver /usr/lib/dspam/libhash_drv.so
  52. DeliveryHost 127.0.0.1
  53. DeliveryPort 10037
  54. DeliveryIdent localhost
  55. DeliveryProto SMTP
  56. TrustedDeliveryAgent "/usr/libexec/dovecot/deliver -d %u"
  57. UntrustedDeliveryAgent "/usr/libexec/dovecot/deliver -d %u"
  58. OnFail error
  59. Trust mail
  60. Trust users
  61. Trust root
  62. Trust dspam
  63. Trust postfix
  64. Trust daemon
  65. TrainingMode teft
  66. TestConditionalTraining on
  67. Feature whitelist
  68. Feature tb=5
  69. Algorithm graham burton
  70. Tokenizer osb
  71. Pvalue bcr
  72. WebStats on
  73. Preference "trainingMode=TEFT"
  74. Preference "spamAction=tag"
  75. Preference "spamSubject=[SPAM]"
  76. Preference "statisticalSedation=5"
  77. Preference "enableBNR=on"
  78. Preference "enableWhitelist=on"
  79. Preference "signatureLocation=headers"
  80. Preference "tagSpam=on"
  81. Preference "tagNonspam=on"
  82. Preference "showFactors=on"
  83. Preference "optIn=off"
  84. Preference "optOut=off"
  85. Preference "whitelistThreshold=20"
  86. Preference "makeCorpus=off"
  87. Preference "storeFragments=off"
  88. Preference "localStore="
  89. Preference "processorBias=on"
  90. Preference "fallbackDomain=off"
  91. Preference "trainPristine=off"
  92. Preference "optOutClamAV=off"
  93. Preference "ignoreRBLLookups=off"
  94. Preference "RBLInoculate=off"
  95. Preference "notifications=on"
  96.  
  97.  
  98. #
  99. # Untrusted Delivery Agent: Specifies the local delivery agent and arguments
  100. # DSPAM should use when delivering mail and running in untrusted user mode.
  101. # Because DSPAM will not allow pass-through arguments to be specified to
  102. # untrusted users, all arguments should be specified here. Use %u to specify
  103. # the user DSPAM is processing mail for. This configuration parameter is only
  104. # necessary if you plan on allowing untrusted processing.
  105. #
  106. #UntrustedDeliveryAgent "/usr/bin/procmail -d %u"
  107.  
  108. #
  109. # SMTP or LMTP Delivery: Alternatively, you may wish to use SMTP or LMTP
  110. # delivery to deliver your message to the mail server instead of using a
  111. # delivery agent. You will need to configure with --enable-daemon to use host
  112. # delivery, however you do not need to operate in daemon mode. Specify an IP
  113. # address or UNIX path to a domain socket below as a host.
  114. #
  115. # If you would like to set up DeliveryHost's on a per-domain basis, use
  116. # the syntax: DeliveryHost.domain.com 1.2.3.4
  117. #
  118. #DeliveryHost 127.0.0.1
  119. #DeliveryPort 24
  120. #DeliveryIdent localhost
  121. DeliveryProto SMTP
  122.  
  123. #
  124. # FallbackDomains: If you want to specify certain domains as fallback domains,
  125. # enable this option. For example, you could create a user @domain.com, and
  126. # if bob@domain.com does not resolve to a known user on the system, the user
  127. # could default to your @domain.com user. NOTE: This also requires designating
  128. # fallbackDomain for the domain name;
  129. # e.g. dspam_admin ch pref domain.com fallbackDomain on
  130. #
  131. #FallbackDomains on
  132.  
  133. #
  134. # Quarantine Agent: DSPAM's default behavior is to quarantine all mail it
  135. # thinks is spam. If you wish to override this behavior, you may specify
  136. # a quarantine agent which will be called with all messages DSPAM thinks is
  137. # spam. Use %u to specify the user DSPAM is processing mail for.
  138. #
  139. #QuarantineAgent "/usr/bin/procmail -d spam"
  140.  
  141. #
  142. # DSPAM can optionally process "plused users" (addresses in the user+detail
  143. # form) by truncating the username just before the "+", so all internal
  144. # processing occurs for "user", but delivery will be performed for
  145. # "user+detail". This is only useful if the LDA can handle "plused users"
  146. # (for example Cyrus IMAP) and when configured for LMTP delivery above
  147. #
  148. #EnablePlusedDetail on
  149.  
  150. #
  151. # Character to use as seperator between user names and address extensions.
  152. # If you change this value then please adjust QuarantineMailbox to use the
  153. # new specified character. The default is '+'.
  154. #
  155. PlusedCharacter +
  156.  
  157. #
  158. # Turn this feature on if you want to force DSPAM to lowercase the "plused
  159. # users" username.
  160. #
  161. #PlusedUserLowercase on
  162.  
  163. #
  164. # Quarantine Mailbox: DSPAM's LMTP code can send spam mail using LMTP to a
  165. # "plused" mailbox (such as user+quarantine) leaving quarantine processing
  166. # for retraining or deletion to be performed by the LDA and the mail client.
  167. # "plused" mailboxes are supported by Cyrus IMAP and possibly other LDAs. If
  168. # you don't set/change PlusedCharacter then the mailbox name must have the +
  169. # since the + is the default used character.
  170. #
  171. #QuarantineMailbox +quarantine
  172.  
  173. #
  174. # OnFail: What to do if local delivery or quarantine should fail. If set
  175. # to "unlearn", DSPAM will unlearn the message prior to exiting with an
  176. # un successful return code. The default option, "error" will not unlearn
  177. # the message but return the appropriate error code. The unlearn option
  178. # is use-ful on some systems where local delivery failures will cause the
  179. # message to be requeued for delivery, and could result in the message
  180. # being processed multiple times. During a very large failure, however,
  181. # this could cause a significant load increase.
  182. #
  183. OnFail error
  184.  
  185. #
  186. # Trusted Users: Only the users specified below will be allowed to perform
  187. # administrative functions in DSPAM such as setting the active user and
  188. # accessing tools. All other users attempting to run DSPAM will be restricted;
  189. # their uids will be forced to match the active username and they will not be
  190. # able to specify delivery agent privileges or use tools.
  191. #
  192. Trust root
  193. Trust dspam
  194. Trust apache
  195. Trust mail
  196. Trust mailnull
  197. Trust smmsp
  198. Trust daemon
  199. #Trust nobody
  200. #Trust majordomo
  201.  
  202. #
  203. # Debugging: Enables debugging for some or all users. IMPORTANT: DSPAM must
  204. # be compiled with debug support in order to use this option. DSPAM should
  205. # never be running in production with debug active unless you are
  206. # troubleshooting problems.
  207. #
  208. # DebugOpt: One or more of: process, classify, spam, fp, inoculation, corpus
  209. # process standard message processing
  210. # classify message classification using --classify
  211. # spam error correction of missed spam
  212. # fp error correction of false positives
  213. # inoculation message inoculations (source=inoculation)
  214. # corpus corpusfed messages (source=corpus)
  215. #
  216. #Debug *
  217. #Debug bob bill
  218. #
  219. #DebugOpt process spam fp
  220.  
  221. #
  222. # ClassAlias: Alias a particular class to spam/nonspam. This is useful if
  223. # classifying things other than spam.
  224. #
  225. #ClassAliasSpam badstuff
  226. #ClassAliasNonspam goodstuff
  227.  
  228. #
  229. # Training Mode: The default training mode to use for all operations, when
  230. # one has not been specified on the commandline or in the user's preferences.
  231. # Acceptable values are:
  232. # toe Train on Error (Only)
  233. # teft Train Everything (Trains on every message)
  234. # tum Train Until Mature (Train only tokens without enough data)
  235. # notrain Do not train or store signatures (large ISP systems, post-train)
  236. #
  237. TrainingMode teft
  238.  
  239. #
  240. # TestConditionalTraining: By default, dspam will retrain certain errors
  241. # until the condition is no longer met. This usually accelerates learning.
  242. # Some people argue that this can increase the risk of errors, however.
  243. #
  244. TestConditionalTraining on
  245.  
  246. #
  247. # Features: Specify features to activate by default; can also be specified
  248. # on the commandline. See the documentation for a list of available features.
  249. # If _any_ features are specified on the commandline, these are ignored.
  250. #
  251. #Feature noise
  252. Feature whitelist
  253.  
  254. # Training Buffer: The training buffer waters down statistics during training.
  255. # It is designed to prevent false positives, but can also dramatically reduce
  256. # dspam's catch rate during initial training. This can be a number from 0
  257. # (no buffering) to 10 (maximum buffering). If you are paranoid about false
  258. # positives, you should probably enable this option.
  259. #
  260. #Feature tb=5
  261.  
  262. #
  263. # Algorithms: Specify the statistical algorithms to use, overriding any
  264. # defaults configured in the build. The options are:
  265. # naive Naive-Bayesian (All Tokens)
  266. # graham Graham-Bayesian ("A Plan for Spam")
  267. # burton Burton-Bayesian (SpamProbe)
  268. # robinson Robinson's Geometric Mean Test (Obsolete)
  269. # chi-square Fisher-Robinson's Chi-Square Algorithm
  270. #
  271. # You may have multiple algorithms active simultaneously, but it is strongly
  272. # recommended that you group Bayesian algorithms with other Bayesian
  273. # algorithms, and any use of Chi-Square remain exclusive.
  274. #
  275. # NOTE: For standard "CRM114" Markovian weighting, use 'naive', or consider
  276. # using 'burton' for slightly better accuracy
  277. #
  278. # Don't mess with this unless you know what you're doing
  279. #
  280. #Algorithm chi-square
  281. #Algorithm naive
  282. Algorithm graham burton
  283.  
  284. #
  285. # Tokenizer: Specify the tokenizer to use. The tokenizer is the piece
  286. # responsible for parsing the message into individual tokens. Depending on
  287. # how many resources you are willing to trade off vs. accuracy, you may
  288. # choose to use a less or more detailed tokenizer:
  289. # word uniGram (single word) tokenizer
  290. # Tokenizes message into single individual words/tokens
  291. # example: "free" and "viagra"
  292. # chain biGram (chained tokens) tokenizer (default)
  293. # Single words + chains adjacent tokens together
  294. # example: "free" and "viagra" and "free viagra"
  295. # sbph Sparse Binary Polynomial Hashing tokenizer
  296. # Creates sparse token patterns across sliding window of 5-tokens
  297. # example: "the quick * fox jumped" and "the * * fox jumped"
  298. # osb Orthogonal Sparse biGram tokenizer
  299. # Similar to SBPH, but only uses the biGrams
  300. # example: "the * * fox" and "the * * * jumped"
  301. #
  302. # In general the reccomendation is to use 'osb' for new installations.
  303. # The default value of 'chain' remains here as not to surprise anyone upgrading
  304. # that has not changed from the default value.
  305. #
  306. Tokenizer chain
  307.  
  308. #
  309. # PValue: Specify the technique used for calculating Probability Values,
  310. # overriding any defaults configured in the build. These options are:
  311. # bcr Bayesian Chain Rule (Graham's Technique - "A Plan for Spam")
  312. # robinson Robinson's Technique (used in Chi-Square)
  313. # markov Markovian Weighted Technique (for Markovian discrimination)
  314. #
  315. # Unlike the "Algorithms" property, you may only have one of these defined.
  316. # Use of the chi-square algorithm automatically changes this to robinson.
  317. #
  318. # Don't mess with this unless you know what you're doing.
  319. #
  320. #PValue robinson
  321. #PValue markov
  322. PValue bcr
  323.  
  324. #
  325. # WebStats: Enable this if you are using the CGI, which writes .stats files
  326. WebStats on
  327.  
  328. #
  329. # ImprobabilityDrive: Calculate odds-ratios for ham/spam, and add to
  330. # X-DSPAM-Improbability headers
  331. #
  332. ImprobabilityDrive on
  333.  
  334. #
  335. # Preferences: Specify any preferences to set by default, unless otherwise
  336. # overridden by the user (see next section) or a default.prefs file.
  337. # If user or default.prefs are found, the user's preferences will override any
  338. # defaults.
  339. #
  340. #Preference "trainingMode=TEFT" # { TOE | TUM | TEFT | NOTRAIN } -> default:teft
  341. #Preference "spamAction=tag" # { quarantine | tag | deliver } -> default:quarantine
  342. #Preference "spamSubject=[SPAM]" # { string } -> default:[SPAM]
  343. #Preference "statisticalSedation=5" # { 0 - 10 } -> default:0
  344. #Preference "enableBNR=on" # { on | off } -> default:off
  345. #Preference "enableWhitelist=on" # { on | off } -> default:on
  346. #Preference "signatureLocation=headers" # { message | headers } -> default:message
  347. #Preference "tagSpam=off" # { on | off }
  348. #Preference "tagNonspam=off" # { on | off }
  349. #Preference "showFactors=off" # { on | off } -> default:off
  350. #Preference "optIn=on" # { on | off }
  351. #Preference "optOut=on" # { on | off }
  352. #Preference "whitelistThreshold=10" # { Integer } -> default:10
  353. #Preference "makeCorpus=off" # { on | off } -> default:off
  354. #Preference "storeFragments=off" # { on | off } -> default:off
  355. #Preference "localStore=" # { on | off } -> default:username
  356. #Preference "processorBias=on" # { on | off } -> default:on
  357. #Preference "fallbackDomain=off" # { on | off } -> default:off
  358. #Preference "trainPristine=off" # { on | off } -> default:off
  359. #Preference "optOutClamAV=off" # { on | off } -> default:off
  360. #Preference "ignoreRBLLookups=off" # { on | off } -> default:off
  361. #Preference "RBLInoculate=off" # { on | off } -> default:off
  362. #Preference "notifications=off" # { on | off } -> default:off
  363.  
  364. #
  365. # Overrides: Specifies the user preferences which may override configuration
  366. # and commandline defaults. Any other preferences supplied by an untrusted user
  367. # will be ignored.
  368. #
  369. AllowOverride enableBNR
  370. AllowOverride enableWhitelist
  371. AllowOverride fallbackDomain
  372. AllowOverride ignoreGroups
  373. AllowOverride ignoreRBLLookups
  374. AllowOverride localStore
  375. AllowOverride makeCorpus
  376. AllowOverride optIn
  377. AllowOverride optOut
  378. AllowOverride optOutClamAV
  379. AllowOverride processorBias
  380. AllowOverride RBLInoculate
  381. AllowOverride showFactors
  382. AllowOverride signatureLocation
  383. AllowOverride spamAction
  384. AllowOverride spamSubject
  385. AllowOverride statisticalSedation
  386. AllowOverride storeFragments
  387. AllowOverride tagNonspam
  388. AllowOverride tagSpam
  389. AllowOverride trainPristine
  390. AllowOverride trainingMode
  391. AllowOverride whitelistThreshold
  392. AllowOverride dailyQuarantineSummary
  393. AllowOverride notifications
  394.  
  395. # --- MySQL ---
  396.  
  397. #
  398. # Storage driver settings: Specific to a particular storage driver. Uncomment
  399. # the configuration specific to your installation, if applicable.
  400. #
  401. #MySQLServer /var/lib/mysql/mysql.sock
  402. #MySQLPort
  403. #MySQLUser dspam
  404. #MySQLPass changeme
  405. #MySQLDb dspam
  406. #MySQLCompress true
  407. #MySQLReconnect true
  408.  
  409. # If you are using replication for clustering, you can also specify a separate
  410. # server to perform all writes to.
  411. #
  412. #MySQLWriteServer /var/lib/mysql/mysql.sock
  413. #MySQLWritePort
  414. #MySQLWriteUser dspam
  415. #MySQLWritePass changeme
  416. #MySQLWriteDb dspam_write
  417. #MySQLCompress true
  418. #MySQLReconnect true
  419.  
  420. # If your replication isn't close to real-time, your retraining might fail if
  421. # the signature isn't found. One workaround for this is to use the write
  422. # database for all signature reads:
  423. #
  424. #MySQLReadSignaturesFromWriteDb on
  425.  
  426. # If you're running DSPAM in client/server (daemon) mode, uncomment the
  427. # setting below to override the default connection cache size (the number
  428. # of connections the server pools between all clients). The connection cache
  429. # represents the maximum number of database connections *available* and should
  430. # be set based on the maximum number of concurrent connections you're likely
  431. # to have. Each connection may be used by only one thread at a time, so all
  432. # other threads _will block_ until another connection becomes available.
  433. #
  434. #MySQLConnectionCache 10
  435.  
  436. # If you're using vpopmail or some other type of virtual setup and wish to
  437. # change the table dspam uses to perform username/uid lookups, you can over-
  438. # ride it below
  439.  
  440. #MySQLVirtualTable dspam_virtual_uids
  441. #MySQLVirtualUIDField uid
  442. #MySQLVirtualUsernameField username
  443.  
  444. # UIDInSignature: MySQL supports the insertion of the user id into the DSPAM
  445. # signature. This allows you to create one single spam or fp alias
  446. # (pointing to some arbitrary user), and the uid in the signature will
  447. # switch to the correct user. Result: you need only one spam alias
  448.  
  449. #MySQLUIDInSignature on
  450.  
  451. # --- PostgreSQL ---
  452.  
  453. # For PgSQLServer you can Use a TCP/IP address or a socket. If your socket is
  454. # in /var/run/postgresql/.s.PGSQL.5432 specify just the path where the socket
  455. # resits (without .s.PGSQL.5432).
  456.  
  457. #PgSQLServer /var/run/postgresql/
  458. #PgSQLPort
  459. #PgSQLUser dspam
  460. #PgSQLPass changeme
  461. #PgSQLDb dspam
  462.  
  463. # If you're running DSPAM in client/server (daemon) mode, uncomment the
  464. # setting below to override the default connection cache size (the number
  465. # of connections the server pools between all clients).
  466. #
  467. #PgSQLConnectionCache 3
  468.  
  469. # UIDInSignature: PgSQL supports the insertion of the user id into the DSPAM
  470. # signature. This allows you to create one single spam or fp alias
  471. # (pointing to some arbitrary user), and the uid in the signature will
  472. # switch to the correct user. Result: you need only one spam alias
  473.  
  474. #PgSQLUIDInSignature on
  475.  
  476. # If you're using vpopmail or some other type of virtual setup and wish to
  477. # change the table dspam uses to perform username/uid lookups, you can over-
  478. # ride it below
  479.  
  480. #PgSQLVirtualTable dspam_virtual_uids
  481. #PgSQLVirtualUIDField uid
  482. #PgSQLVirtualUsernameField username
  483.  
  484. # --- SQLite ---
  485.  
  486. #SQLitePragma "synchronous = OFF"
  487.  
  488. # --- Hash ---
  489.  
  490. #
  491. # HashRecMax: Default number of records to create in the initial segment when
  492. # building hash files. 100,000 yields files 1.6MB in size, but can fill up
  493. # fast, so be sure to increase this (to a million or more) if you're not using
  494. # autoextend.
  495. #
  496. # NOTE: If you're using a heavy-weight tokenizer, such as SBPH, you should be
  497. # looking for settings in the 'millions' of records.
  498. #
  499. # Primes List:
  500. # 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317, 196613,
  501. # 393241, 786433, 1572869, 3145739, 6291469, 12582917, 25165843, 50331653,
  502. # 100663319, 201326611, 402653189, 805306457, 1610612741, 3221225473,
  503. # 4294967291
  504. #
  505. HashRecMax 98317
  506.  
  507. #
  508. # HashAutoExtend: Autoextend hash databases when they fill up. This allows
  509. # them to continue to train by adding extents (extensions) to the file. There
  510. # will be a small delay during the growth process, as everything needs to be
  511. # closed and remapped.
  512. #
  513. HashAutoExtend on
  514.  
  515. #
  516. # HashMaxExtents: The maximum number of extents that may be created in a single
  517. # hash file. Set this to zero for unlimited
  518. #
  519. HashMaxExtents 0
  520.  
  521. #
  522. # HashExtentSize: The initial record size for newly created extents. Creating
  523. # this too small could result in many extents being created. Creating this too
  524. # large could result in excessive disk space usage. Typically, a value close
  525. # to half of the HashRecMax size is good.
  526. #
  527. HashExtentSize 49157
  528.  
  529. #
  530. # HashPctIncrease: Increase the next extent size by n% from the size of the
  531. # last extent. This is useful in accommodating systems where the default
  532. # HashExtentSize can be too small for certain high-volume users, and can also
  533. # help keep seeks nice and speedy and/or prevent too many unnecessary extents
  534. # from being created when using a low HashMaxSeek. The default behavior, when
  535. # HashPctIncrease is not used, is to always use # HashExtentSize with no
  536. # increase.
  537. #
  538. HashPctIncrease 10
  539.  
  540. #
  541. # HashMaxSeek: The maximum number of record seeks when inserting a new record
  542. # before failing or adding a new extent. This ultimately translates into the
  543. # max # of acceptable seeks per segment. Setting this too high will exhaustively
  544. # scan each segment and hurt performance. Typically, a low value is acceptable
  545. # as even older extents will continue to fill as training progresses.
  546. #
  547. HashMaxSeek 10
  548.  
  549. #
  550. # HashConcurrentUser: If you are using a single, stateful hash database in
  551. # daemon mode, specifying a concurrent user below will cause the user to be
  552. # permanently mapped into memory and shared via rwlocks. This is very fast and
  553. # very cool if you are running a "userless" relay appliance.
  554. #
  555. #HashConcurrentUser user
  556.  
  557. #
  558. # HashConnectionCache: If running in daemon mode, this is the max # of
  559. # concurrent connections that will be supported. NOTE: If you are using
  560. # HashConcurrentUser, this option is ignored, as all connections are read-
  561. # write locked instead of mutex locked.
  562. #
  563. HashConnectionCache 10
  564.  
  565.  
  566. # --- ExtLookup ---
  567.  
  568. # ExtLookup: Perform various external lookup functions depending on user-
  569. # defined variables. ExtLookup can either be set to 'on' or 'off'. The
  570. # behavior of such lookups are defined by the use of ExtLookupMode, which
  571. # can be set to 'verify', 'map' and 'strict'.
  572. #
  573. # verify Will cause dspam to validate the user, prior to
  574. # creating the user entry in the system.
  575. #
  576. # map Will cause dspam to try to map the user address
  577. # to a certain unique identifier.
  578. #
  579. # strict Will cause dspam to enforce both 'verify' and 'map'.
  580. #
  581. # ExtLookupDriver will set the engine behind the lookups. For now the only
  582. # supported mechanisms are 'ldap' and 'program'. The first will make dspam
  583. # talk directly to the configured LDAP server. The second will prefrom the
  584. # various lookup functions by running a certain binary program or executable
  585. # script. The program MUST be a binary executable or a script with a well
  586. # defined interperter in its first line ( #!/path/to/interpreter ). There
  587. # are plans to support TLS/SSL connections to backend databases.
  588. #
  589. #ExtLookup on # Turns on/off external lookup
  590. #ExtLookupMode strict # available modes are 'verify', 'map' and 'strict'.
  591. # 'strict' enforces both verify and map
  592. #ExtLookupDriver ldap # Currently only ldap and program are supported.
  593. # There are plans to support both MySQL and Postgres.
  594. #ExtLookupServer ldap.domain.com # Can either be a database hostname or the full path to
  595. # an executable lookup program and its arguments.
  596. #ExtLookupPort 389 # Desired port when connecting to the lookup database.
  597. #ExtLookupDB "ou=Users,dc=domain,dc=com" # Can either be an LDAP search base or a database name (TODO).
  598. #ExtLookupQuery "(&(objectClass=qmailUser)(|(mail=%u)(mailAlternateAddress=%u)))" # Can either be an LDAP search filter or an SQL query (TODO)
  599. #ExtLookupLDAPAttribute "mail" # Attribute to be used when ExtLookupDriver is 'ldap'
  600. # and ExtLookupMode 'map' or 'strict'
  601. #ExtLookupLDAPScope sub # Can be set to 'base', 'sub' or 'one'. Only used when ExtLookupDriver is 'ldap'.
  602. #ExtLookupLDAPVersion 3 # Sets the LDAP protocol version (1, 2 or 3)
  603. #ExtLookupLogin "cn=admin,dc=domain,dc=com" # Login to be used when connecting to any direct database backend.
  604. #ExtLookupPassword itsasecret # Password to use with ExtLookupLogin.
  605. #ExtLookupCrypto tls # Sets the use of TLS on backend communication (only compatible with LDAPv3)
  606.  
  607.  
  608. # --- Profiles ---
  609.  
  610. #
  611. # You can specify multiple storage profiles, and specify the server to
  612. # use on the commandline with --profile. For example:
  613. #
  614. #Profile DECAlpha
  615. #MySQLServer.DECAlpha 10.0.0.1
  616. #MySQLPort.DECAlpha 3306
  617. #MySQLUser.DECAlpha dspam
  618. #MySQLPass.DECAlpha changeme
  619. #MySQLDb.DECAlpha dspam
  620. #MySQLCompress.DECAlpha true
  621. #MySQLReconnect.DECAlpha true
  622. #
  623. #Profile Sun420R
  624. #MySQLServer.Sun420R 10.0.0.2
  625. #MySQLPort.Sun420R 3306
  626. #MySQLUser.Sun420R dspam
  627. #MySQLPass.Sun420R changeme
  628. #MySQLDb.Sun420R dspam
  629. #MySQLCompress.Sun420R false
  630. #MySQLReconnect.Sun420R true
  631. #
  632. #DefaultProfile DECAlpha
  633.  
  634. #
  635. # If you're using storage profiles, you can set failovers for each profile.
  636. # Of course, if you'll be failing over to another database, that database
  637. # must have the same information as the first. If you're using a global
  638. # database with no training, this should be relatively simple. If you're
  639. # configuring per-user data, however, you'll need to set up some type of
  640. # replication between databases.
  641. #
  642. #Failover.DECAlpha SUN420R
  643. #Failover.Sun420R DECAlpha
  644.  
  645. # If the storage fails, the agent will follow each profile's failover up to
  646. # a maximum number of failover attempts. This should be set to a maximum of
  647. # the number of profiles you have, otherwise the agent could loop and try
  648. # the same profile multiple times (unless this is your desired behavior).
  649. #
  650. #FailoverAttempts 1
  651.  
  652. #
  653. # Ignored headers: If DSPAM is behind other tools which may add a header to
  654. # incoming emails, it may be beneficial to ignore these headers - especially
  655. # if they are coming from another spam filter. If you are _not_ using one of
  656. # these tools, however, leaving the appropriate headers commented out will
  657. # allow DSPAM to use them as telltale signs of forged email.
  658. #
  659. #IgnoreHeader X-Spam-Status
  660. #IgnoreHeader X-Spam-Scanned
  661. #IgnoreHeader X-Virus-Scanner-Result
  662.  
  663. #
  664. # Lookup: Perform lookups on streamlined blackhole list servers (see
  665. # http://www.nuclearelephant.com/projects/sbl/). The streamlined blacklist
  666. # server is machine-automated, unsupervised blacklisting system designed to
  667. # provide real-time and highly accurate blacklisting based on network spread.
  668. # When performing a lookup, DSPAM will automatically learn the inbound message
  669. # as spam if the source IP is listed. Until an official public RABL server is
  670. # available, this feature is only useful if you are running your own
  671. # streamlined blackhole list server for internal reporting among multiple mail
  672. # servers. Provide the name of the lookup zone below to use.
  673. #
  674. # This function performs standard reverse-octet.domain lookups, and while it
  675. # will function with many RBLs, it's strongly discouraged to use those
  676. # maintained by humans as they're often inaccurate and could hurt filter
  677. # learning and accuracy.
  678. #
  679. #Lookup "sbl.yourdomain.com"
  680.  
  681. #
  682. # RBLInoculate: If you want to inoculate the user from RBL'd messages it would
  683. # have otherwise missed, set this to on.
  684. #
  685. #RBLInoculate off
  686.  
  687. #
  688. # Notifications: Enable the sending of notification emails to users (first
  689. # message, quarantine full, etc.)
  690. #
  691. Notifications off
  692.  
  693. #
  694. # QuarantineWarnSize: You may specify a size when DSPAM should send a "Quarantine
  695. # Full" message to each user. This is only working if you enable notifications
  696. # (see above). Value is in bytes. Default is 2097152 -> 2MB.
  697. #
  698. #QuarantineWarnSize 2097152
  699.  
  700. #
  701. # Purge configuration: Set dspam_clean purge default options, if not otherwise
  702. # specified on the commandline
  703. #
  704. PurgeSignatures 14 # Stale signatures
  705. PurgeNeutral 90 # Tokens with neutralish probabilities
  706. PurgeUnused 90 # Unused tokens
  707. PurgeHapaxes 30 # Tokens with less than 5 hits (hapaxes)
  708. PurgeHits1S 15 # Tokens with only 1 spam hit
  709. PurgeHits1I 15 # Tokens with only 1 innocent hit
  710.  
  711. #
  712. # Purge configuration for SQL-based installations using purge.sql
  713. #
  714. #PurgeSignature off # Specified in purge.sql
  715. #PurgeNeutral 90
  716. #PurgeUnused off # Specified in purge.sql
  717. #PurgeHapaxes off # Specified in purge.sql
  718. #PurgeHits1S off # Specified in purge.sql
  719. #PurgeHits1I off # Specified in purge.sql
  720.  
  721. #
  722. # Local Mail Exchangers: Used for source address tracking, tells DSPAM which
  723. # mail exchangers are local and therefore should be ignored in the Received:
  724. # header when tracking the source of an email. Note: you should use the address
  725. # of the host as appears between brackets [ ] in the Received header.
  726. # By default DSPAM is considering the following IPs always as LocalMX:
  727. # 10.0.0.0/8 - Private IP addresses (RFC 1918)
  728. # 127.0.0.0/8 - Localhost Loopback Address (RFC 1700)
  729. # 169.254.0.0/16 - Zeroconf / APIPA (RFC 3330)
  730. # 172.16.0.0/12 - Private IP addresses (RFC 1918)
  731. # 192.168.0.0/16 - Private IP addresses (RFC 1918)
  732. #
  733. LocalMX 127.0.0.1
  734.  
  735. #
  736. # Logging: Disabling logging for users will make usage graphs unavailable to
  737. # them. Disabling system logging will make admin graphs unavailable.
  738. #
  739. SystemLog on
  740. UserLog on
  741.  
  742. #
  743. # TrainPristine: for systems where the original message remains server side
  744. # and can therefore be presented in pristine format for retraining. This option
  745. # will cause DSPAM to cease all writing of signatures and DSPAM headers to the
  746. # message, and deliver the message in as pristine format as possible. This mode
  747. # REQUIRES that the original message in its pristine format (as of delivery)
  748. # be presented for retraining, as in the case of webmail, imap, or other
  749. # applications where the message is actually kept server-side during reading,
  750. # and is preserved. DO NOT use this switch unless the original message can be
  751. # presented for retraining with the ORIGINAL HEADERS and NO MODIFICATIONS.
  752. #
  753. # NOTE: You can't use this setting with dspam_trian; if you're going to use it,
  754. # wait until after you train any corpora.
  755. #
  756. #TrainPristine on
  757.  
  758. #
  759. # Opt: in or out; determines DSPAM's default filtering behavior. If this value
  760. # is set to in, users must opt-in to filtering by dropping a .dspam file in
  761. # /var/dspam/opt-in/user.dspam (or if you have homedirs configured, a .dspam
  762. # folder in their home directory). The default is opt-out, which means all
  763. # users will be filtered unless a .nodspam file is dropped in
  764. # /var/dspam/opt-out/user.nodspam
  765. #
  766. Opt out
  767.  
  768. #
  769. # TrackSources: specify which (if any) source addresses to track and report
  770. # them to syslog (mail.info). This is useful if you're running a firewall or
  771. # blacklist and would like to use this information. Spam reporting also drops
  772. # RABL blacklist files (see http://www.nuclearelephant.com/projects/rabl/).
  773. #
  774. #TrackSources spam nonspam virus
  775.  
  776. #
  777. # ParseToHeaders: In lieu of setting up individual aliases for each user,
  778. # DSPAM can be configured to automatically parse the To: address for spam and
  779. # false positive forwards. From there, it can be configured to either set the
  780. # DSPAM user based on the username specified in the header and/or change the
  781. # training class and source accordingly. The options below can be used to
  782. # customize most common types of header parsing behavior to avoid the need for
  783. # multiple aliases, or if using LMTP, aliases entirely..
  784. #
  785. # ParseToHeader: Parse the To: headers of an incoming message. This must be
  786. # set to 'on' to use either of the following features.
  787. #
  788. # ChangeModeOnParse: Automatically change the class (to spam or innocent)
  789. # depending on whether spam- or notspam- was specified, and change the source
  790. # to 'error'. This is convenient if you're not using aliases at all, but
  791. # are delivering via LMTP.
  792. #
  793. # ChangeUserOnParse: Automatically change the username to match that specified
  794. # in the To: header. For example, spam-bob@domain.tld will set the username
  795. # to bob, ignoring any --user passed in. This may not always be desirable if
  796. # you are using virtual email addresses as usernames. Options:
  797. # on or user take the portion before the @ sign only
  798. # full take everything after the initial {spam,notspam}-.
  799. #
  800. #ParseToHeaders on
  801. #ChangeModeOnParse on
  802. #ChangeUserOnParse on
  803.  
  804. #
  805. # Broken MTA Options: Some MTAs don't support the proper functionality
  806. # necessary. In these cases you can activate certain features in DSPAM to
  807. # compensate. 'returnCodes' causes DSPAM to return an exit code of 99 if
  808. # the message is spam, 0 if not, or a negative code if an error has occured.
  809. # Specifying 'case' causes DSPAM to force the input usernames to lowercase.
  810. # Specifying 'lineStripping' causes DSPAM to strip ^M's from messages passed
  811. # in.
  812. #
  813. #Broken returnCodes
  814. #Broken case
  815. #Broken lineStripping
  816.  
  817. #
  818. # MaxMessageSize: You may specify a maximum message size for DSPAM to process.
  819. # If the message is larger than the maximum size, it will be delivered
  820. # without processing. Value is in bytes.
  821. #
  822. #MaxMessageSize 4194304
  823.  
  824. # --- ClamAV ---
  825.  
  826. #
  827. # Virus Checking: If you are running clamd, DSPAM can perform stream-based
  828. # virus checking using TCP. Uncomment the values below to enable virus
  829. # checking.
  830. #
  831. # ClamAVResponse: reject (reject or drop the message with a permanent failure)
  832. # accept (accept the message and quietly drop the message)
  833. # spam (treat as spam and quarantine/tag/whatever)
  834. #
  835. ClamAVPort 3310
  836. ClamAVHost 127.0.0.1
  837. ClamAVResponse accept
  838.  
  839. # --- CLIENT / SERVER ---
  840.  
  841. #
  842. # Daemonized Server: If you are running DSPAM as a daemonized server using
  843. # --daemon, the following parameters will override the default. Use the
  844. # ServerPass option to set up accounts for each client machine. The DSPAM
  845. # server will process and deliver the message based on the parameters
  846. # specified. If you want the client machine to perform delivery, use
  847. # the --stdout option in conjunction with a local setup.
  848. #
  849. # ServerHost: Not enabling ServerHost will bind DSPAM server to all available
  850. # interfaces.
  851. #
  852. #ServerHost 127.0.0.1
  853. #ServerPort 24
  854. #ServerQueueSize 32
  855. #ServerPID /var/run/dspam.pid
  856.  
  857. #
  858. # ServerMode specifies the type of LMTP server to start. This can be one of:
  859. # dspam: DSPAM-proprietary DLMTP server, for communicating with dspamc
  860. # standard: Standard LMTP server, for communicating with Postfix or other MTA
  861. # auto: Speak both DLMTP and LMTP; auto-detect by ServerPass.IDENT
  862. #
  863. #ServerMode dspam
  864.  
  865. # If supporting DLMTP (dspam) mode, dspam clients will require authentication
  866. # as they will be passing in parameters. The idents below will be used to
  867. # determine which clients will be speaking DLMTP, so if you will be using
  868. # both LMTP and DLMTP from the same host, be sure to use something other
  869. # than the server's hostname below (which will be sent by the MTA during a
  870. # standard LMTP LHLO).
  871. #
  872. #ServerPass.Relay1 "secret"
  873. #ServerPass.Relay2 "password"
  874.  
  875. # If supporting standard LMTP mode, server parameters will need to be specified
  876. # here, as they will not be passed in by the mail server. The ServerIdent
  877. # specifies the 250 response code ident sent back to connecting clients and
  878. # should be set to the hostname of your server, or an alias.
  879. #
  880. # NOTE: If you specify --user in ServerParameters, the RCPT TO will be
  881. # used only for delivery, and not set as the active user for processing.
  882. #
  883. #ServerParameters "--deliver=innocent -d %u"
  884. #ServerIdent "localhost.localdomain"
  885.  
  886. # If you wish to use a local domain socket instead of a TCP socket, uncomment
  887. # the following. It is strongly recommended you use local domain sockets if
  888. # you are running the client and server on the same machine, as it eliminates
  889. # much of the bandwidth overhead.
  890. #
  891. ServerDomainSocketPath "/var/run/dspam/dspam.sock"
  892.  
  893. #
  894. # Client Mode: If you are running DSPAM in client/server mode, uncomment and
  895. # set these variables. A ClientHost beginning with a / will be treated as
  896. # a domain socket.
  897. #
  898. #ClientHost /var/run/dspam/dspam.sock
  899. #ClientIdent "secret@Relay1"
  900. #
  901. #ClientHost 127.0.0.1
  902. #ClientPort 24
  903. #ClientIdent "secret@Relay1"
  904.  
  905. # --- RABL ---
  906.  
  907. # RABLQueue: Touch files in the RABL queue
  908. # If you are a reporting streamlined blackhole list participant, you can
  909. # touch ip addresses within the directory the rabl_client process is watching.
  910. #
  911. #RABLQueue /var/spool/rabl
  912.  
  913. # --- ---
  914.  
  915. # DataSource: If you are using any type of data source that does not include
  916. # email-like headers (such as documents), uncomment the line below. This
  917. # will cause the entire input to be treated like a message "body"
  918. #
  919. #DataSource document
  920.  
  921. # ProcessorWordFrequency: By default, words are only counted once per message.
  922. # If you are classifying large documents, however, you may wish to count once
  923. # per occurrence instead.
  924. #
  925. #ProcessorWordFrequency occurrence
  926.  
  927. # ProcessorURLContext: By default, a URL context is generated for URLs, which
  928. # records their tokens as separate from words found in documents. To use
  929. # URL tokens in the same context as words, turn this feature off.
  930. #
  931. ProcessorURLContext on
  932.  
  933. # ProcessorBias: Bias causes the filter to lean more toward 'innocent', and
  934. # usually greatly reduces false positives. It is the default behavior of
  935. # most Bayesian filters (including dspam).
  936. #
  937. # NOTE: You probably DONT want this if you're using Markovian Weighting, unless
  938. # you are paranoid about false positives.
  939. #
  940. ProcessorBias on
  941.  
  942. # StripRcptDomain: Cut the domain (including the at sign) from recipients.
  943. # This is particularly useful if the recipient name is equal to real user
  944. # accounts as recipients with domains tend to cause permission issues with
  945. # dspam-web.
  946. #
  947. StripRcptDomain off
  948.  
  949. # --- Split Configuration File Support ---
  950.  
  951. # Include a directory with configuration items.
  952. #Include /etc/dspam/dspam.d/
  953.  
  954. # --- ---
  955. ServerHost 127.0.0.1
  956. ServerPort 10036
  957. ServerQueueSize 32
  958. ServerPID /var/run/dspam/dspam.pid
  959. ServerMode standard
  960. ServerParameters "--deliver=innocent,spam -d %u"
  961. ServerIdent "localhost.localdomain"
  962. ProcessorURLContext on
  963. ProcessorBias on
  964.  
  965. ## EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement