based on reworked servercore.

This commit is contained in:
barant committed 2020-02-29 19:25:13 -08:00
1 parent 50eb707f10
commit db3e82a18e
1698 files changed
+41157 -797

No files matched your search

+15 -32
View File
@@ -1,38 +1,21 @@
#ifndef ____SMTP_MAIL_h__
#define ____SMTP_MAIL_h__
# define ____SMTP_MAIL_h__
#include "Command.h"
# include "SMTPCommand.h"
# include "SMTPSession.h"
namespace mail {
class __SMTP_MAIL : public core::Command {
class SMTPServer;
class __SMTP_MAIL : public SMTPCommand {
int processCommand(std::string request, Session *session, std::stringstream &data);
public:
int processCommand(coreutils::PString request, SMTPSession &session, SMTPServer &server, std::stringstream &data);
};
}
data << "" << std::endl;
//---------------------------------------------------------------------------
// MAIL command request handling.
//---------------------------------------------------------------------------
else if(command(input) == "MAIL") {
sender = cleanEMail(input.substr(5));
//-------------------------------------------------------------
// Verify that the senders domain name resolves to an address
// with an MX record. If not and there is a bounce then we
// will not be able to return the bounce message so it is
// probably a spammer anyway.
//-------------------------------------------------------------
if(verifyDomainMX(domainOnly(sender))) {
cout << "250 OK" << CRLF;
log.message("Response: 250 OK.");
recipientList = "";
state = "MAIL";
}
}
#endif