From 79a7cb3c1bcd22e12fc564f619fc8ee62cb445e3 Mon Sep 17 00:00:00 2001 From: James Renken Date: Wed, 9 Jul 2025 10:33:46 -0700 Subject: [PATCH] bad-key-revoker, cmd: Remove unused mailer & SMTPConfig stanzas (#8302) Part of #8199 --- cmd/bad-key-revoker/main.go | 10 ---------- cmd/config.go | 9 --------- core/objects.go | 6 +++--- test/config/bad-key-revoker.json | 10 ---------- 4 files changed, 3 insertions(+), 32 deletions(-) diff --git a/cmd/bad-key-revoker/main.go b/cmd/bad-key-revoker/main.go index 8e6cfac85..2ed34ff96 100644 --- a/cmd/bad-key-revoker/main.go +++ b/cmd/bad-key-revoker/main.go @@ -288,16 +288,6 @@ type Config struct { // algorithm will wait before retrying in the event of error // or no work to do. BackoffIntervalMax config.Duration `validate:"-"` - - // Deprecated: the bad-key-revoker no longer sends emails; we use ARI. - // TODO(#8199): Remove this config stanza entirely. - Mailer struct { - cmd.SMTPConfig `validate:"-"` - SMTPTrustedRootFile string - From string - EmailSubject string - EmailTemplate string - } } Syslog cmd.SyslogConfig diff --git a/cmd/config.go b/cmd/config.go index 13842fdf9..29649639f 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -89,15 +89,6 @@ func (d *DBConfig) URL() (string, error) { return strings.TrimSpace(string(url)), err } -// SMTPConfig is deprecated. -// TODO(#8199): Delete this when it is removed from bad-key-revoker's config. -type SMTPConfig struct { - PasswordConfig - Server string `validate:"required"` - Port string `validate:"required,numeric,min=1,max=65535"` - Username string `validate:"required"` -} - // PAConfig specifies how a policy authority should connect to its // database, what policies it should enforce, and what challenges // it should offer. diff --git a/core/objects.go b/core/objects.go index 474d0bcba..ae423f7c0 100644 --- a/core/objects.go +++ b/core/objects.go @@ -415,9 +415,9 @@ type CertificateStatus struct { LastExpirationNagSent time.Time `db:"lastExpirationNagSent"` // NotAfter and IsExpired are convenience columns which allow expensive - // queries to quickly filter out certificates that we don't need to care about - // anymore. These are particularly useful for the expiration mailer and CRL - // updater. See https://github.com/letsencrypt/boulder/issues/1864. + // queries to quickly filter out certificates that we don't need to care + // about anymore. These are particularly useful for the CRL updater. See + // https://github.com/letsencrypt/boulder/issues/1864. NotAfter time.Time `db:"notAfter"` IsExpired bool `db:"isExpired"` diff --git a/test/config/bad-key-revoker.json b/test/config/bad-key-revoker.json index d70aadc5f..7cce4c37a 100644 --- a/test/config/bad-key-revoker.json +++ b/test/config/bad-key-revoker.json @@ -20,16 +20,6 @@ "noWaitForReady": true, "timeout": "15s" }, - "mailer": { - "server": "localhost", - "port": "9380", - "username": "cert-manager@example.com", - "from": "bad key revoker ", - "passwordFile": "test/secrets/smtp_password", - "SMTPTrustedRootFile": "test/certs/ipki/minica.pem", - "emailSubject": "Certificates you've issued have been revoked due to key compromise", - "emailTemplate": "test/example-bad-key-revoker-template" - }, "maximumRevocations": 15, "findCertificatesBatchSize": 10, "interval": "50ms",