Add per-domain DKIM signing, admin console TLS, log rotation, and resolver timeout scoping
- DKIM signing was hardcoded to one domain; now keyed per-domain off the sending address, fixing mail for every domain but the original. - Admin console (port 1027) is now TLS-wrapped instead of plaintext. - barantmail.log now rotates by size (config-driven) instead of growing unbounded (previously hit 23GB). - ResolverThreadScope.h: a <setenv> scoping fix for name resolution inside a <try> block that previously did not survive its own container. - IMAPArgs.cpp: fixed "UID STORE 1:*" wrongly requiring UID 1 to exist, which silently made empty-folder operations delete nothing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5f3e6ed2e6
commit
407cc2e915
11 files changed
+284
-81
No files matched your search
+3
-3
@@ -9,8 +9,8 @@ namespace mail {
|
||||
|
||||
SMTPServer::SMTPServer(core::EPoll &ePoll, std::string hostName, MailFileSystem &mailFileSystem,
|
||||
core::IPAddress ipAddress, core::TLSInfo *tlsInfo, bool watchQueue,
|
||||
DKIMSigner *dkimSigner)
|
||||
: core::TCPServer(ePoll, ipAddress, tlsInfo, " ", 1, "SMTP Server"), core::INotify(ePoll), ePoll(ePoll), hostName(hostName), mailFileSystem(mailFileSystem), dkimSigner(dkimSigner) {
|
||||
std::map<std::string, DKIMSigner*> *dkimSigners)
|
||||
: core::TCPServer(ePoll, ipAddress, tlsInfo, " ", 1, "SMTP Server"), core::INotify(ePoll), ePoll(ePoll), hostName(hostName), mailFileSystem(mailFileSystem), dkimSigners(dkimSigners) {
|
||||
commands.add(_smtp_auth, "AUTH");
|
||||
commands.add(_smtp_data, "DATA");
|
||||
commands.add(_smtp_ehlo, "EHLO");
|
||||
@@ -114,7 +114,7 @@ namespace mail {
|
||||
queuedFile.read();
|
||||
coreutils::MString mailData(queuedFile.asString());
|
||||
SendMail *outbound = new SendMail(hostName, mailFileSystem.getSendLogPath().str(),
|
||||
name[0].str(), sender, recipient, mailData, dkimSigner);
|
||||
name[0].str(), sender, recipient, mailData, dkimSigners);
|
||||
// The queue file's content is already fully read into
|
||||
// mailData above, so it's safe to unlink it now rather
|
||||
// than after the detached thread finishes (which may be
|
||||
|
||||
Reference in new issue
Block a user