2011-11-14 15:57:52 +01:00
|
|
|
/*
|
|
|
|
* smtpcodes.h, SJ
|
|
|
|
*/
|
|
|
|
|
|
|
|
// SMTP states
|
|
|
|
|
|
|
|
#define SMTP_STATE_INIT 0
|
|
|
|
#define SMTP_STATE_HELO 1
|
|
|
|
#define SMTP_STATE_MAIL_FROM 2
|
|
|
|
#define SMTP_STATE_RCPT_TO 3
|
|
|
|
#define SMTP_STATE_DATA 4
|
|
|
|
#define SMTP_STATE_PERIOD 5
|
|
|
|
#define SMTP_STATE_QUIT 6
|
|
|
|
#define SMTP_STATE_FINISHED 7
|
2016-08-19 22:33:47 +02:00
|
|
|
#define SMTP_STATE_BDAT 8
|
2011-11-14 15:57:52 +01:00
|
|
|
|
|
|
|
// SMTP commands
|
|
|
|
|
|
|
|
#define SMTP_CMD_HELO "HELO"
|
|
|
|
#define SMTP_CMD_EHLO "EHLO"
|
|
|
|
#define SMTP_CMD_MAIL_FROM "MAIL FROM:"
|
|
|
|
#define SMTP_CMD_RCPT_TO "RCPT TO:"
|
|
|
|
#define SMTP_CMD_DATA "DATA"
|
2016-08-19 22:33:47 +02:00
|
|
|
#define SMTP_CMD_BDAT "BDAT"
|
2011-11-14 15:57:52 +01:00
|
|
|
#define SMTP_CMD_PERIOD "\x0d\x0a\x2e\x0d\x0a"
|
|
|
|
#define SMTP_CMD_QUIT "QUIT"
|
|
|
|
#define SMTP_CMD_RESET "RSET"
|
|
|
|
#define SMTP_CMD_NOOP "NOOP"
|
|
|
|
#define SMTP_CMD_XFORWARD "XFORWARD"
|
|
|
|
#define SMTP_CMD_XCLIENT "XCLIENT"
|
2012-10-28 20:36:46 +01:00
|
|
|
#define SMTP_CMD_STARTTLS "STARTTLS"
|
2011-11-14 15:57:52 +01:00
|
|
|
|
|
|
|
// SMTP responses
|
|
|
|
|
|
|
|
#define SMTP_RESP_220_BANNER "220 %s ESMTP\r\n"
|
2012-10-28 20:36:46 +01:00
|
|
|
#define SMTP_RESP_220_READY_TO_START_TLS "220 Ready to start TLS\r\n"
|
2011-11-14 15:57:52 +01:00
|
|
|
#define SMTP_RESP_221_GOODBYE "221 %s Goodbye\r\n"
|
|
|
|
#define SMTP_RESP_250_OK "250 Ok\r\n"
|
2012-10-28 20:36:46 +01:00
|
|
|
#define SMTP_RESP_250_EXTENSIONS "250-%s\r\n250-PIPELINING\r\n%s250-SIZE\r\n250 8BITMIME\r\n"
|
2011-11-14 15:57:52 +01:00
|
|
|
|
2016-08-17 21:47:19 +02:00
|
|
|
#define SMTP_EXTENSION_STARTTLS "250-STARTTLS\r\n"
|
|
|
|
#define SMTP_EXTENSION_CHUNKING "250-CHUNKING\r\n"
|
|
|
|
|
2016-08-21 21:15:48 +02:00
|
|
|
#define SMTP_RESP_250_BDAT "250 octets received\r\n"
|
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
#define SMTP_RESP_354_DATA_OK "354 Send mail data; end it with <CRLF>.<CRLF>\r\n"
|
|
|
|
|
|
|
|
#define SMTP_RESP_421_ERR "421 %s Error: timed out\r\n"
|
|
|
|
#define SMTP_RESP_421_ERR_TMP "421 %s service not available\r\n"
|
|
|
|
#define SMTP_RESP_421_ERR_WRITE_FAILED "421 writing queue file failed\r\n"
|
2016-10-23 22:04:55 +02:00
|
|
|
#define SMTP_RESP_421_ERR_ALL_PORTS_ARE_BUSY "421 All server ports are busy\r\n"
|
2011-11-14 15:57:52 +01:00
|
|
|
#define SMTP_RESP_451_ERR "451 Error in processing, try again later\r\n"
|
2012-10-28 20:36:46 +01:00
|
|
|
#define SMTP_RESP_454_ERR_TLS_TEMP_ERROR "454 TLS not available currently\r\n"
|
2011-11-14 15:57:52 +01:00
|
|
|
|
|
|
|
#define SMTP_RESP_502_ERR "502 Command not implemented\r\n"
|
|
|
|
#define SMTP_RESP_503_ERR "503 Bad command sequence\r\n"
|
2012-10-29 10:22:31 +01:00
|
|
|
#define SMTP_RESP_550_ERR_YOU_ARE_BANNED_BY_LOCAL_POLICY "550 You are banned by local policy\r\n"
|
2011-11-14 15:57:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
// LMTP commands
|
|
|
|
|
|
|
|
#define LMTP_CMD_LHLO "LHLO"
|
|
|
|
|
|
|
|
// LMTP responses
|
|
|
|
|
|
|
|
#define LMTP_RESP_220_BANNER "220 %s LMTP\r\n"
|
|
|
|
|