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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /*
  22. * Just check if the passed message is spam or not and reply as
  23. * described below
  24. */
  25. #define MSG_CMD_CHECK "check"
  26. /*
  27. * Modern check version
  28. */
  29. #define MSG_CMD_CHECK_V2 "checkv2"
  30. #define MSG_CMD_SCAN "scan"
  31. /*
  32. * Check if message is spam or not, and return score plus list
  33. * of symbols hit
  34. */
  35. #define MSG_CMD_SYMBOLS "symbols"
  36. /*
  37. * Check if message is spam or not, and return score plus report
  38. */
  39. #define MSG_CMD_REPORT "report"
  40. /*
  41. * Check if message is spam or not, and return score plus report
  42. * if the message is spam
  43. */
  44. #define MSG_CMD_REPORT_IFSPAM "report_ifspam"
  45. /*
  46. * Ignore this message -- client opened connection then changed
  47. */
  48. #define MSG_CMD_SKIP "skip"
  49. /*
  50. * Return a confirmation that spamd is alive
  51. */
  52. #define MSG_CMD_PING "ping"
  53. /*
  54. * Process this message as described above and return modified message
  55. */
  56. #define MSG_CMD_PROCESS "process"
  57. /*
  58. * Headers
  59. */
  60. #define HELO_HEADER "Helo"
  61. #define FROM_HEADER "From"
  62. #define IP_ADDR_HEADER "IP"
  63. #define RCPT_HEADER "Rcpt"
  64. #define SUBJECT_HEADER "Subject"
  65. #define SETTINGS_ID_HEADER "Settings-ID"
  66. #define SETTINGS_HEADER "Settings"
  67. #define QUEUE_ID_HEADER "Queue-ID"
  68. #define USER_HEADER "User"
  69. #define URLS_HEADER "URL-Format"
  70. #define PASS_HEADER "Pass"
  71. #define HOSTNAME_HEADER "Hostname"
  72. #define DELIVER_TO_HEADER "Deliver-To"
  73. #define NO_LOG_HEADER "Log"
  74. #define MLEN_HEADER "Message-Length"
  75. #define USER_AGENT_HEADER "User-Agent"
  76. #define MTA_TAG_HEADER "MTA-Tag"
  77. #define PROFILE_HEADER "Profile"
  78. #define TLS_CIPHER_HEADER "TLS-Cipher"
  79. #define TLS_VERSION_HEADER "TLS-Version"
  80. #define MTA_NAME_HEADER "MTA-Name"
  81. #define MILTER_HEADER "Milter"
  82. #define FILENAME_HEADER "Filename"
  83. #define FLAGS_HEADER "Flags"
  84. #define CERT_ISSUER_HEADER "TLS-Cert-Issuer"
  85. #define MAILER_HEADER "Mailer"
  86. #define RAW_DATA_HEADER "Raw"
  87. #define COMPRESSION_HEADER "Compression"
  88. #define MESSAGE_OFFSET_HEADER "Message-Offset"
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92. #endif//RSPAMD_PROTOCOL_INTERNAL_H