aboutsummaryrefslogtreecommitdiff
path: root/deno/mail-relay/aws/app.ts
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-06-17 19:04:16 +0800
committerYuqian Yang <crupest@crupest.life>2025-06-18 16:24:32 +0800
commitfd8ccbae956dd6cdba8d8a34692f65ad3663d7ac (patch)
treed4c032c965cb031fb98525cd0bfde76186902490 /deno/mail-relay/aws/app.ts
parentbf5d95731f38dd25aea8bca44beeb9335bbcd6b5 (diff)
downloadcrupest-fd8ccbae956dd6cdba8d8a34692f65ad3663d7ac.tar.gz
crupest-fd8ccbae956dd6cdba8d8a34692f65ad3663d7ac.tar.bz2
crupest-fd8ccbae956dd6cdba8d8a34692f65ad3663d7ac.zip
mail: simplify mail parsing, improve logging.
Diffstat (limited to 'deno/mail-relay/aws/app.ts')
-rw-r--r--deno/mail-relay/aws/app.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/deno/mail-relay/aws/app.ts b/deno/mail-relay/aws/app.ts
index a8a9895..c8a90c8 100644
--- a/deno/mail-relay/aws/app.ts
+++ b/deno/mail-relay/aws/app.ts
@@ -110,7 +110,7 @@ function createOutbound(
new AwsMailMessageIdSaveHook(
async (original, aws, context) => {
await db.addMessageIdMap({ message_id: original, aws_message_id: aws });
- void local?.saveNewSent(context.mail, original);
+ void local?.saveNewSent(context.logTag, context.mail, original);
},
),
);
@@ -213,11 +213,14 @@ function createServerServices() {
const smtp = createSmtp(outbound);
const hono = createHono(outbound, inbound);
+
+ let counter = 1;
setupAwsHono(hono, {
path: config.get("awsInboundPath"),
auth: config.get("awsInboundKey"),
callback: (s3Key, recipients) => {
return fetcher.consumeS3Mail(
+ `[inbound ${counter++}]`,
s3Key,
(rawMail, _) =>
inbound.deliver({ mail: new Mail(rawMail), recipients }).then(),