mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-13 14:37:26 +00:00
chore(agentmail): modern bbs defaults (mail host, 465 implicit TLS) (#130)
resolveMailuConfig now defaults to the real bbs mail stack: address domain bbs.profullstack.com, mail host mail.profullstack.com, SMTP 465 implicit TLS (bbs refuses 587), IMAPS 993. Also fixes a latent mismatch where the address domain (bbs) and the transport's from-domain check (mail) diverged with no env set. Verified live end-to-end with only AGENTMAIL_USER/PASS supplied. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
12a1d7f479
commit
647f204f1d
1 changed files with 10 additions and 7 deletions
|
|
@ -40,22 +40,25 @@ export interface CreateMailuTransportOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* resolveMailuConfig builds a MailuConfig from the environment, defaulting to
|
* resolveMailuConfig builds a MailuConfig from the environment, defaulting to
|
||||||
* the production hosts (mail.profullstack.com over IMAPS:993, smtp.profullstack.com
|
* the production bbs mail stack: member addresses on bbs.profullstack.com, served
|
||||||
* over submission:587/STARTTLS). The caller supplies the member's credentials.
|
* by mail.profullstack.com over IMAPS:993 and modern implicit-TLS submission:465.
|
||||||
|
* (The bbs Mailu front does not listen on 587 — it refuses the connection.) The
|
||||||
|
* caller supplies the member's credentials.
|
||||||
*/
|
*/
|
||||||
export function resolveMailuConfig(auth: { user: string; pass: string }, env: Record<string, string | undefined> = process.env): MailuConfig {
|
export function resolveMailuConfig(auth: { user: string; pass: string }, env: Record<string, string | undefined> = process.env): MailuConfig {
|
||||||
const domain = env.AGENTMAIL_DOMAIN ?? "mail.profullstack.com";
|
const domain = env.AGENTMAIL_DOMAIN ?? "bbs.profullstack.com";
|
||||||
|
const mailHost = "mail.profullstack.com";
|
||||||
return {
|
return {
|
||||||
domain,
|
domain,
|
||||||
imap: {
|
imap: {
|
||||||
host: env.AGENTMAIL_IMAP_HOST ?? domain,
|
host: env.AGENTMAIL_IMAP_HOST ?? mailHost,
|
||||||
port: Number(env.AGENTMAIL_IMAP_PORT ?? 993),
|
port: Number(env.AGENTMAIL_IMAP_PORT ?? 993),
|
||||||
secure: (env.AGENTMAIL_IMAP_SECURE ?? "true") !== "false"
|
secure: (env.AGENTMAIL_IMAP_SECURE ?? "true") !== "false"
|
||||||
},
|
},
|
||||||
smtp: {
|
smtp: {
|
||||||
host: env.AGENTMAIL_SMTP_HOST ?? "smtp.profullstack.com",
|
host: env.AGENTMAIL_SMTP_HOST ?? mailHost,
|
||||||
port: Number(env.AGENTMAIL_SMTP_PORT ?? 587),
|
port: Number(env.AGENTMAIL_SMTP_PORT ?? 465),
|
||||||
secure: (env.AGENTMAIL_SMTP_SECURE ?? "false") === "true"
|
secure: (env.AGENTMAIL_SMTP_SECURE ?? "true") !== "false"
|
||||||
},
|
},
|
||||||
auth
|
auth
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue