Continued development...

This commit is contained in:
barant committed 2020-04-13 09:44:31 -07:00
1 parent db3e82a18e
commit 967a03563a
15 files changed
+102 -71

No files matched your search

+11 -8
View File
@@ -5,9 +5,10 @@
#include "File.h"
#include "Log.h"
#include "IPAddress.h"
#include "MailFileSystem.h"
#include "SMTPServer.h"
#include "POP3Service.h"
#include "IMAPService.h"
#include "POP3Server.h"
#include "IMAPServer.h"
int main(int argc, char **argv) {
@@ -19,14 +20,16 @@ int main(int argc, char **argv) {
std::string hostName = "localhost";
std::string ipAddress = "0.0.0.0";
std::string mailPath = "/var/mail";
mail::MailFileSystem mailFileSystem(mailPath);
core::EPoll ePoll;
mail::SMTPServer smtpServer(ePoll, hostName, mailPath, core::IPAddress(ipAddress, 25));
mail::POP3Service pop3Service(ePoll, hostName, mailPath, core::IPAddress(ipAddress, 110));
mail::IMAPService imapService(ePoll, hostName, mailPath, core::IPAddress(ipAddress, 143));
core::ConsoleServer consoleService(ePoll, core::IPAddress(ipAddress, 1027));
consoleService.commands.add(consoleService.commands, "help");
ePoll.start(2, 1000);
mail::SMTPServer smtpServer(ePoll, hostName, mailFileSystem, core::IPAddress(ipAddress, 25));
mail::POP3Server pop3Server(ePoll, hostName, mailFileSystem, core::IPAddress(ipAddress, 110));
mail::IMAPServer imapServer(ePoll, hostName, mailFileSystem, core::IPAddress(ipAddress, 143));
core::ConsoleServer consoleServer(ePoll, core::IPAddress(ipAddress, 1027));
consoleServer.commands.add(consoleServer.commands, "help");
ePoll.start(1, 1000);
while(true)
sleep(300);