You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

protocol_internal.h 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*-
  2. * Copyright 2017 Vsevolod Stakhov
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef RSPAMD_PROTOCOL_INTERNAL_H
  17. #define RSPAMD_PROTOCOL_INTERNAL_H
  18. /*
  19. * Just check if the passed message is spam or not and reply as
  20. * described below
  21. */
  22. #define MSG_CMD_CHECK "check"
  23. /*
  24. * Modern check version
  25. */
  26. #define MSG_CMD_CHECK_V2 "checkv2"
  27. #define MSG_CMD_SCAN "scan"
  28. /*
  29. * Check if message is spam or not, and return score plus list
  30. * of symbols hit
  31. */
  32. #define MSG_CMD_SYMBOLS "symbols"
  33. /*
  34. * Check if message is spam or not, and return score plus report
  35. */
  36. #define MSG_CMD_REPORT "report"
  37. /*
  38. * Check if message is spam or not, and return score plus report
  39. * if the message is spam
  40. */
  41. #define MSG_CMD_REPORT_IFSPAM "report_ifspam"
  42. /*
  43. * Ignore this message -- client opened connection then changed
  44. */
  45. #define MSG_CMD_SKIP "skip"
  46. /*
  47. * Return a confirmation that spamd is alive
  48. */
  49. #define MSG_CMD_PING "ping"
  50. /*
  51. * Process this message as described above and return modified message
  52. */
  53. #define MSG_CMD_PROCESS "process"
  54. /*
  55. * Headers
  56. */
  57. #define HELO_HEADER "Helo"
  58. #define FROM_HEADER "From"
  59. #define IP_ADDR_HEADER "IP"
  60. #define RCPT_HEADER "Rcpt"
  61. #define SUBJECT_HEADER "Subject"
  62. #define SETTINGS_ID_HEADER "Settings-ID"
  63. #define QUEUE_ID_HEADER "Queue-ID"
  64. #define USER_HEADER "User"
  65. #define URLS_HEADER "URL-Format"
  66. #define PASS_HEADER "Pass"
  67. #define JSON_HEADER "Json"
  68. #define HOSTNAME_HEADER "Hostname"
  69. #define DELIVER_TO_HEADER "Deliver-To"
  70. #define NO_LOG_HEADER "Log"
  71. #define MLEN_HEADER "Message-Length"
  72. #define USER_AGENT_HEADER "User-Agent"
  73. #define MTA_TAG_HEADER "MTA-Tag"
  74. #define PROFILE_HEADER "Profile"
  75. #define TLS_CIPHER_HEADER "TLS-Cipher"
  76. #define TLS_VERSION_HEADER "TLS-Version"
  77. #define MTA_NAME_HEADER "MTA-Name"
  78. #define MILTER_HEADER "Milter"
  79. #define FILENAME_HEADER "Filename"
  80. #define CERT_ISSUER_HEADER "TLS-Cert-Issuer"
  81. #define MAILER_HEADER "Mailer"
  82. #define RAW_DATA_HEADER "Raw"
  83. #endif //RSPAMD_PROTOCOL_INTERNAL_H