diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-28 11:42:33 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-28 11:42:33 +0100 |
commit | e22f707210848a1c41658ce3df00348a1a5073a0 (patch) | |
tree | 8ca75bcbeeff29fcfccb98a1380e00340ce96732 /src/libserver/milter_internal.h | |
parent | 7d0cad988cf39294f629045a9b72928df1ecad79 (diff) | |
download | rspamd-e22f707210848a1c41658ce3df00348a1a5073a0.tar.gz rspamd-e22f707210848a1c41658ce3df00348a1a5073a0.zip |
[Minor] Add basic milter commands support
Diffstat (limited to 'src/libserver/milter_internal.h')
-rw-r--r-- | src/libserver/milter_internal.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/libserver/milter_internal.h b/src/libserver/milter_internal.h index fed2e6f11..933044772 100644 --- a/src/libserver/milter_internal.h +++ b/src/libserver/milter_internal.h @@ -21,11 +21,11 @@ #include <event.h> enum rspamd_milter_state { - st_read_cmd, - st_len_1, + st_len_1 = 0, st_len_2, st_len_3, st_len_4, + st_read_cmd, st_read_data }; @@ -64,4 +64,22 @@ struct rspamd_milter_private { int fd; }; +enum rspamd_milter_io_cmd { + RSPAMD_MILTER_CMD_ABORT = 'A', /* Abort */ + RSPAMD_MILTER_CMD_BODY = 'B', /* Body chunk */ + RSPAMD_MILTER_CMD_CONNECT = 'C', /* Connection information */ + RSPAMD_MILTER_CMD_MACRO = 'D', /* Define macro */ + RSPAMD_MILTER_CMD_BODYEOB = 'E', /* final body chunk (end of message) */ + RSPAMD_MILTER_CMD_HELO = 'H', /* HELO/EHLO */ + RSPAMD_MILTER_CMD_QUIT_NC = 'K', /* QUIT but new connection follows */ + RSPAMD_MILTER_CMD_HEADER = 'L', /* Header */ + RSPAMD_MILTER_CMD_MAIL = 'M', /* MAIL from */ + RSPAMD_MILTER_CMD_EOH = 'N', /* EOH */ + RSPAMD_MILTER_CMD_OPTNEG = 'O', /* Option negotiation */ + RSPAMD_MILTER_CMD_QUIT = 'Q', /* QUIT */ + RSPAMD_MILTER_CMD_RCPT = 'R', /* RCPT to */ + RSPAMD_MILTER_CMD_DATA = 'T', /* DATA */ + RSPAMD_MILTER_CMD_UNKNOWN = 'U' /* Any unknown command */ +}; + #endif |