diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-06-17 15:14:48 +0800 | 
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-06-17 21:37:43 +0800 | 
| commit | 1cea9d856f4904f0d62b568d9c0d31871d0fcd8a (patch) | |
| tree | 6e7b30da64b18a42421831be7ede238815c9cf1e /deno/mail-relay/aws | |
| parent | f160809fabe9241867c7e3831351201f3df6c768 (diff) | |
| download | crupest-1cea9d856f4904f0d62b568d9c0d31871d0fcd8a.tar.gz crupest-1cea9d856f4904f0d62b568d9c0d31871d0fcd8a.tar.bz2 crupest-1cea9d856f4904f0d62b568d9c0d31871d0fcd8a.zip | |
mail: skip saving if cc myself, mark sent as read.
Diffstat (limited to 'deno/mail-relay/aws')
| -rw-r--r-- | deno/mail-relay/aws/app.ts | 12 | 
1 files changed, 4 insertions, 8 deletions
| diff --git a/deno/mail-relay/aws/app.ts b/deno/mail-relay/aws/app.ts index 86f7c6b..a8a9895 100644 --- a/deno/mail-relay/aws/app.ts +++ b/deno/mail-relay/aws/app.ts @@ -6,7 +6,6 @@ import { FetchHttpHandler } from "@smithy/fetch-http-handler";  // @ts-types="npm:@types/yargs"  import yargs from "yargs"; -import { LogFileProvider } from "@crupest/base/log";  import { ConfigDefinition, ConfigProvider } from "@crupest/base/config";  import { CronTask } from "@crupest/base/cron"; @@ -111,7 +110,7 @@ function createOutbound(      new AwsMailMessageIdSaveHook(        async (original, aws, context) => {          await db.addMessageIdMap({ message_id: original, aws_message_id: aws }); -        void local?.saveNewSent(original, context.mail); +        void local?.saveNewSent(context.mail, original);        },      ),    ); @@ -164,10 +163,7 @@ function createCron(fetcher: AwsMailFetcher, consumer: AwsS3MailConsumer) {  function createBaseServices() {    const config = new ConfigProvider(PREFIX, CONFIG_DEFINITIONS);    Deno.mkdirSync(config.get("dataPath"), { recursive: true }); -  const logFileProvider = new LogFileProvider( -    join(config.get("dataPath"), "log"), -  ); -  return { config, logFileProvider }; +  return { config };  }  function createAwsFetchOnlyServices() { @@ -186,9 +182,9 @@ function createAwsFetchOnlyServices() {  function createAwsRecycleOnlyServices() {    const services = createAwsFetchOnlyServices(); -  const { config, logFileProvider } = services; +  const { config } = services; -  const inbound = createInbound(logFileProvider, { +  const inbound = createInbound({      fallback: config.getList("inboundFallback"),      ldaPath: config.get("ldaPath"),      doveadmPath: config.get("doveadmPath"), | 
