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
+9
-6
@@ -3,6 +3,7 @@
|
||||
|
||||
# include <string>
|
||||
# include <vector>
|
||||
# include <map>
|
||||
# include <filesystem>
|
||||
# include "EPoll.h"
|
||||
# include "TCPServer.h"
|
||||
@@ -38,18 +39,20 @@ namespace mail {
|
||||
// each SMTPServer's own INotify watch is independent, so two
|
||||
// watchers on the same directory would each fire inCreate() for
|
||||
// every queued message, delivering it twice.
|
||||
// dkimSigner is optional (nullptr = outbound mail goes out
|
||||
// unsigned) and not owned - passed straight through to every
|
||||
// SendMail this instance's inCreate() constructs for outbound
|
||||
// relay.
|
||||
// dkimSigners is optional (nullptr = outbound mail goes out
|
||||
// unsigned for every domain) and not owned - passed straight
|
||||
// through to every SendMail this instance's inCreate() constructs
|
||||
// for outbound relay, which picks the entry matching each
|
||||
// individual message's own sender domain (see SendMail's own doc
|
||||
// comment).
|
||||
SMTPServer(core::EPoll &ePoll, std::string hostName, MailFileSystem &mailFileSystem,
|
||||
core::IPAddress ipAddress, core::TLSInfo *tlsInfo, bool watchQueue = true,
|
||||
DKIMSigner *dkimSigner = nullptr);
|
||||
std::map<std::string, DKIMSigner*> *dkimSigners = nullptr);
|
||||
|
||||
MailFileSystem &mailFileSystem;
|
||||
std::string hostName;
|
||||
core::EPoll &ePoll;
|
||||
DKIMSigner *dkimSigner;
|
||||
std::map<std::string, DKIMSigner*> *dkimSigners;
|
||||
|
||||
// Advertised via EHLO's "250-SIZE <n>" and enforced by __SMTP_DATA
|
||||
// while accumulating a message body - RFC 1870. 25MB, matching
|
||||
|
||||
Reference in new issue
Block a user