From 6ef839d2bfed29dd3808dce09c23285a0ccfb706 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 31 Oct 2025 14:37:16 -0500 Subject: [PATCH] remove email stuff from main branch --- main.go | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/main.go b/main.go index 32e00b2..5721f7c 100644 --- a/main.go +++ b/main.go @@ -31,15 +31,6 @@ type Config struct { DeprecateAfterBatches int `json:"deprecate_after_batches"` ScryptCPUAndMemoryCost int `json:"scrypt_cpu_and_memory_cost"` AdminAPIToken string `json:"admin_api_token"` - - EmailAddress string `json:"email_address"` - // port 993 (IMAPS) - // port 143 (STARTTLS) [deprecated!] - ImapHost string `json:"imap_host"` - ImapPort int `json:"imap_port"` - ImapEncryption string `json:"imap_encryption"` - ImapUsername string `json:"imap_username"` - ImapPassword string `json:"imap_password"` } // https://en.wikipedia.org/wiki/Scrypt @@ -506,27 +497,6 @@ func readConfiguration() string { errors = append(errors, "the POW_BOT_DETERRENT_ADMIN_API_TOKEN environment variable is required") } - if config.EmailAddress != "" { - if config.ImapHost == "" { - config.ImapHost = "localhost" - } - if config.ImapPort == 0 { - config.ImapPort = 993 - } - if config.ImapEncryption == "" { - config.ImapEncryption = "SMTPS" - } - if config.ImapEncryption != "STARTTLS" && config.ImapEncryption != "IMAPS" && config.ImapEncryption != "NONE" { - errors = append(errors, fmt.Sprintf("ImapEncryption '%s' must be IMAPS, STARTTLS or NONE", config.ImapEncryption)) - } - if config.ImapUsername == "" { - errors = append(errors, "ImapUsername is required") - } - if config.ImapPassword == "" { - errors = append(errors, "ImapPassword is required") - } - } - if len(errors) > 0 { log.Fatalln("💥 PoW Bot Deterrent can't start because there are configuration issues:") log.Fatalln(strings.Join(errors, "\n"))