diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-06-17 19:04:16 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-06-18 16:24:32 +0800 |
commit | fd8ccbae956dd6cdba8d8a34692f65ad3663d7ac (patch) | |
tree | d4c032c965cb031fb98525cd0bfde76186902490 /deno/mail-relay/aws/app.ts | |
parent | bf5d95731f38dd25aea8bca44beeb9335bbcd6b5 (diff) | |
download | crupest-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.ts | 5 |
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(), |