Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

rspamc.1.md 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. % RSPAMC(1) Rspamd User Manual
  2. # NAME
  3. `rspamc` - rspamd command line client
  4. # SYNOPSIS
  5. rspamc [*options*] [*command*] [*input-file*]...
  6. rspamc --help
  7. # DESCRIPTION
  8. `rspamc` is a simple rspamd client, primarily for classifying or learning messages.
  9. `rspamc` supports the following commands:
  10. * Scan commands:
  11. * `symbols`: scan message and show symbols (default command)
  12. * Control commands
  13. * `learn_spam`: learn message as spam
  14. * `learn_ham`: learn message as ham
  15. * `fuzzy_add`: add message to fuzzy storage (check `-f` and `-w` options for this command)
  16. * `fuzzy_del`: delete message from fuzzy storage (check `-f` option for this command)
  17. * `stat`: show rspamd statistics
  18. * `stat_reset`: show and reset rspamd statistics (useful for graphs)
  19. * `counters`: display rspamd symbols statistics
  20. * `uptime`: show rspamd uptime
  21. * `add_symbol`: add or modify symbol settings in rspamd
  22. * `add_action`: add or modify action settings
  23. Control commands that modify rspamd state are considered privileged and require a password to be specified with the `-P` option (see **OPTIONS**, below, for details).
  24. This depends on a controller's settings and is discussed in the `rspamd-workers` page (see **SEE ALSO**, below, for details).
  25. `Input files` may be either regular file(s) or a directory to scan. If no files are specified `rspamc` reads
  26. from the standard input. Controller commands usually do not accept any input, however learn* and fuzzy* commands
  27. requires input.
  28. # OPTIONS
  29. -h *host[:port]*, \--connect=*host[:port]*
  30. : Specify host and port
  31. -P *password*, \--password=*password*
  32. : Specify control password
  33. -c *name*, \--classifier=*name*
  34. : Classifier to learn spam or ham (bayes is used by default)
  35. -w *weight*, \--weight=*weight*
  36. : Weight for fuzzy operations
  37. -f *number*, \--flag=*number*
  38. : Flag for fuzzy operations
  39. -p, \--pass
  40. : Pass all filters
  41. -v, \--verbose
  42. : More verbose output
  43. -i *ip address*, \--ip=*ip address*
  44. : Emulate that message was received from specified ip address
  45. -u *username*, \--user=*username*
  46. : Emulate that message was received from specified authenticated user
  47. -d *user@domain*, \--deliver=*user@domain*
  48. : Emulate that message was delivered to specified user (for LDA/statistics)
  49. -F *user@domain*, \--from=*user@domain*
  50. : Emulate that message has specified SMTP FROM address
  51. -r *user@domain*, \--rcpt=*user@domain*
  52. : Emulate that message has specified SMTP RCPT address
  53. \--helo=*helo_string*
  54. : Imitate SMTP HELO passing from MTA
  55. \--hostname=*hostname*
  56. : Imitate hostname passing from MTA (rspamd assumes that it is verified by MTA)
  57. -t *seconds*, \--timeout=*seconds*
  58. : Timeout for waiting for a reply (can be floating point number, e.g. 0.1)
  59. -b *host:port*, \--bind=*host:port*
  60. : Bind to specified ip address
  61. -R, \--human
  62. : Output human readable report. The first line of the output contains the message score and three threshold scores, in this format:
  63. : score/greylist/addheader/reject,action=N:ACTION,spam=0|1,skipped=0|1
  64. -j, \--json
  65. : Output formatted JSON
  66. \--ucl
  67. : Output UCL
  68. \--raw
  69. : Output raw data received from rspamd (compacted JSON)
  70. \--headers
  71. : Output HTTP headers from a reply
  72. \--extended-urls
  73. : Output URLs in an extended format, showing full URL, host and the part of host that was used by surbl module (if enabled).
  74. -n *parallel_count*, \--max-requests=*parallel_count*
  75. : Maximum number of requests to rspamd executed in parallel (8 by default)
  76. -e *command*, \--execute=*command*
  77. : Execute the specified command with either mime output (if `mime` option is also specified) or formatted rspamd output
  78. \--mime
  79. : Output the full mime message instead of scanning results only
  80. \--header=*header*
  81. : Add custom HTTP header for a request. You may specify header in format `name=value` or just `name` for an empty header. This option can be repeated multiple times.
  82. \--sort=*type*
  83. : Sort output according to a specific field. For `counters` command the allowed values for this key are `name`, `weight`, `frequency` and `hits`. Appending `:asc` to any of these types inverts sorting order.
  84. \--commands
  85. : List available commands
  86. # RETURN VALUE
  87. On exit `rspamc` returns `0` if operation was successful and an error code otherwise.
  88. # EXAMPLES
  89. Check stdin:
  90. rspamc < some_file
  91. Check files:
  92. rspamc symbols file1 file2 file3
  93. Learn files:
  94. rspamc -P pass learn_spam file1 file2 file3
  95. Add fuzzy hash to set 2:
  96. rspamc -P pass -f 2 -w 10 fuzzy_add file1 file2
  97. Delete fuzzy hash from other server:
  98. rspamc -P pass -h hostname:11334 -f 2 fuzzy_del file1 file2
  99. Get statistics:
  100. rspamc stat
  101. Get uptime:
  102. rspamc uptime
  103. Add custom rule's weight:
  104. rspamc add_symbol test 1.5
  105. Add custom action's weight:
  106. rspamc add_action reject 7.1
  107. # SEE ALSO
  108. Rspamd documentation and source code may be downloaded from
  109. <https://rspamd.com/>.
  110. [rspamd-workers]: https://rspamd.com/doc/workers/