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
commit9abee12c8429141c80cf4ab9e428d3e361fc9bb3 (patch)
tree0551ae2b33929b10b2d293232c5490abf6f77a5f /deno/mail-relay/aws/app.ts
parent0824de3bae3550674a9ea029b03c5cb8a35cd8e1 (diff)
downloadcrupest-9abee12c8429141c80cf4ab9e428d3e361fc9bb3.tar.gz
crupest-9abee12c8429141c80cf4ab9e428d3e361fc9bb3.tar.bz2
crupest-9abee12c8429141c80cf4ab9e428d3e361fc9bb3.zip
mail: simplify mail parsing, improve logging.mail
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(),