dotnet-core_mail-server/MailServer/SMTPServer/MTACommands.cs

116 lines
2.6 KiB
C#
Raw Permalink Normal View History

2016-11-26 11:11:27 +00:00
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
2016-11-27 17:38:47 +00:00
namespace MailServer.SMTPServer
2016-11-26 11:11:27 +00:00
{
public class MTACommandsDict : Dictionary<MTACommands, String>
{
public MTACommandsDict()
{
Add(MTACommands.HELO, "HELO");
Add(MTACommands.DATA, "DATA");
Add(MTACommands.EXPN, "EXPN");
Add(MTACommands.HELP, "HELP");
Add(MTACommands.MAIL_FROM, "MAIL FROM");
Add(MTACommands.NOOP, "NOOP");
Add(MTACommands.QUIT, "QUIT");
Add(MTACommands.RCPT_TO, "RCPT TO");
Add(MTACommands.RSET, "RSET");
Add(MTACommands.SAML_FROM, "SAML FROM");
Add(MTACommands.SEND_FROM, "SEND FROM");
Add(MTACommands.SOML_FROM, "SOML FROM");
Add(MTACommands.TURN, "TURN");
Add(MTACommands.VERB, "VERB");
Add(MTACommands.VRFY, "VRFY");
Add(MTACommands.ATRN, "ATRN");
Add(MTACommands.AUTH, "AUTH");
Add(MTACommands.BDAT, "BDAT");
Add(MTACommands.EHLO, "EHLO");
Add(MTACommands.ETRN, "ETRN");
Add(MTACommands.RCPT, "RCPT");
Add(MTACommands.SAML, "SAML");
Add(MTACommands.SEND, "SEND");
Add(MTACommands.SOML, "SOML");
Add(MTACommands.STARTTL, "STARTTLs");
Add(MTACommands.AUTH_LOGIN, "AUTH LOGIN");
}
}
public enum MTACommands
{
HELO,
MAIL_FROM,
RCPT_TO,
DATA,
RSET,
QUIT,
HELP,
VRFY,
EXPN,
VERB,
NOOP,
TURN,
SEND_FROM,
SOML_FROM,
SAML_FROM,
ATRN,
AUTH,
BDAT,
EHLO,
ETRN,
RCPT,
SAML,
SEND,
SOML,
STARTTL,
AUTH_LOGIN
}
2016-11-30 20:09:45 +00:00
public enum Extensions
{
PIPELINING,
SIZE,
STARTTLS,
}
2016-11-26 11:11:27 +00:00
public enum ResponseCodes
{
C211 = 211,
C214 = 214,
C220 = 220,
C221 = 221,
C250 = 250,
C251 = 251,
C252 = 252,
C253 = 253,
C334 = 334,
C354 = 354,
C355 = 355,
C421 = 421,
C432 = 432,
C450 = 450,
C451 = 451,
C452 = 452,
C453 = 453,
C454 = 454,
C458 = 458,
C459 = 459,
C500 = 500,
C501 = 501,
C502 = 502,
C503 = 503,
C504 = 504,
C521 = 521,
C530 = 530,
C534 = 534,
C538 = 538,
C550 = 550,
C551 = 551,
C552 = 552,
C553 = 553,
C554 = 554
}
}