#3188·lego

Support multiple contact emails for ACME accounts

Author: miichoowCreated Jul 1, 2026Updated Jul 6, 2026
Labelsenhancementno-decision

Welcome

  • Yes, I'm using a binary release or the library within the two latest releases.
  • Yes, I've searched for similar issues on GitHub and didn't find any.

Detailed Description

RFC 8555 defines the account contact field as an array of URLs (section 7.1.2), so multiple mailto: contacts are valid per spec. Right now lego only lets you register one email per account.

What I'd propose:

  • Make --email/-m repeatable, accepting either multiple --email flags or a comma-separated list. LEGO_EMAIL and existing single-email usage keep working exactly as they do now.
  • Add an optional interface on the library side, something like UserWithEmails with GetEmails() []string, so nothing breaks for existing implementers of registration.User.
  • Let the account config file's accounts: section take an emails: list alongside the existing email: field.
  • Leave the on-disk account folder naming as-is: it still keys off --account-id (or the primary email, same as today). Extra emails just become contact metadata inside account.json, not part of the path.

I already have a working implementation of this on a branch. It builds, tests pass, and lint is clean. If this approach sounds reasonable to the maintainers, I'll open the PR.

Effective version of lego

v5.2.2

How do you use lego?

Binary

In which context are you using lego?

Personal and professional use

Supporting the Maintainers

  • Yes, I find this project useful, and I appreciate the work done by the maintainers.
  • Yes, I have starred this repository to help others find it.
  • Yes, I have sponsored this project to keep the project stable and maintained.

Confirmation

  • Yes, I've included all the information above (version, usage, etc.).