메일 서비스(사이트 대표·독립)·메일함·사용량·보안·전환·보존과 AriMail 도입 수정(KST 월 경계, 발신 키 오류, 도메인별 보장량, 100% 제한, 발송 큐·속도, 운영 상태, SSO) (§15~§18·§0.4)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
zzabisagent-lab
2026-10-26 11:47:45 +00:00
co-authored by Claude Fable 5.1
parent a014e3cd05
commit a1cde81332
26 changed files with 1610 additions and 37 deletions
+3 -1
View File
@@ -191,7 +191,9 @@ await t('0.8.25 오류 수정: 같은 DATA 를 받는 사람만 바꿔 따로
const c2 = client(await new Promise((res) => { const s = net.connect(port, '127.0.0.1', () => res(s)); }));
await c2.reply(); await c2.cmd('EHLO x'); await c2.cmd('AUTH PLAIN ' + Buffer.from('\0arihakdang\0admin-secret-12').toString('base64'));
await c2.cmd('MAIL FROM:<admin@arihakdang.com>'); await c2.cmd('RCPT TO:<alice@example.test>'); await c2.cmd('DATA'); c2.raw(data); await c2.reply(); await c2.cmd('QUIT');
const again = calls.filter((x) => x.path === '/emails' && x.method === 'POST'); eq(again[2].key, posts[0].key, '재전송은 같은 키');
// [Ariweb Suite 변경] 같은 키의 재전송은 발송 대기열(outbound_queue)이 "이미 보냄" 으로 알아 발송 모듈을 다시 부르지 않고 같은 발송 id 로 250 을 돌려줍니다(두 번 발송 없음).
const again = calls.filter((x) => x.path === '/emails' && x.method === 'POST'); eq(again.length, 2, '재전송은 발송 모듈을 다시 부르지 않음');
const q = (await env.DB.prepare("SELECT state, send_key FROM outbound_queue ORDER BY created_at").all()).results; eq(q.length, 2, '대기열 두 건'); ok(q.every((r) => r.state === 'sent'), '모두 sent');
} finally { smtp.close(); }
});