Continued development...
This commit is contained in:
1 parent
db3e82a18e
commit
967a03563a
15 files changed
+102
-71
No files matched your search
+15
-7
@@ -1,18 +1,26 @@
|
||||
#ifndef __IMAPSession_h__
|
||||
#define __IMAPSession_h__
|
||||
# define __IMAPSession_h__
|
||||
|
||||
# define CRLF "\r\n"
|
||||
|
||||
namespace mail {
|
||||
|
||||
|
||||
class IMAPSession : public core::TCPSession {
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
IMAPSession(core::EPoll &ePoll, core::TCPServer &server)
|
||||
: TCPSession(ePoll, server, "IMAP Client Session") {}
|
||||
|
||||
enum State { NOT_AUTHENTICATED, AUTHENTICATED, SELECTED };
|
||||
|
||||
std::string clientDomainName;
|
||||
std::string userName;
|
||||
std::string password;
|
||||
AuthState authstate = USER_UNKNOWN;
|
||||
bool relay = false;
|
||||
|
||||
State state = NOT_AUTHENTICATED;
|
||||
|
||||
void onConnected() override {
|
||||
out << "* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready." << CRLF;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user