This commit is contained in:
Brad Arant committed 2022-06-29 13:34:49 -07:00
1 parent 37b5a5bf4e
commit 6c844983d9
27 files changed
+230 -272

No files matched your search

+12 -12
View File
@@ -45,25 +45,25 @@ namespace mail {
std::string mailPath;
SMTPSession * getSocketAccept(core::EPoll &ePoll) override {
return new SMTPSession(ePoll, *this);
return new SMTPSession(ePoll, *this);
}
void sessionErrorHandler(std::string errorString, std::stringstream &out) {
out << "252 " << errorString << CRLF;
out << "252 " << errorString << CRLF;
}
protected:
void inCreate(std::string name) {
int pos = name.find(".") + 10;
std::string mail = name.substr(0, pos);
std::string recipient = name.substr(pos);
if(recipient != "") {
std::string fileName = mailPath + "/.queue/" + name;
std::string path = mailFileSystem.getMailBoxPath(recipient) + "/Inbox/" + mail;
int rc = link(fileName.c_str(), path.c_str());
rc = unlink(fileName.c_str());
coreutils::Log(coreutils::LOG_INFO) << "Message " << mail << " delivered to " << recipient << ".";
}
int pos = name.find(".") + 10;
std::string mail = name.substr(0, pos);
std::string recipient = name.substr(pos);
if(recipient != "") {
std::string fileName = mailPath + "/.queue/" + name;
std::string path = mailFileSystem.getMailBoxPath(recipient) + "/Inbox/" + mail;
int rc = link(fileName.c_str(), path.c_str());
rc = unlink(fileName.c_str());
coreutils::Log(coreutils::LOG_INFO) << "Message " << mail << " delivered to " << recipient << ".";
}
}
private: