Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DNS provider for Mail-in-a-Box #2110

Merged
merged 2 commits into from
Feb 24, 2024
Merged

Conversation

ldez
Copy link
Member

@ldez ldez commented Feb 12, 2024

  • adds a description to your PR
  • have a homogeneous design with the other providers
  • add tests (units)
  • add tests ("live")
  • add a provider descriptor
  • generate CLI help, documentation, and readme.
  • be able to do: (and put the output of this command to a comment)
    make build
    rm -rf .lego
    
    MAILINABOX_EMAIL=user@example.com \
    MAILINABOX_PASSWORD=yyyy \
    MAILINABOX_BASE_URL=https://box.example.com \
    ./dist/lego -m your@email.com --dns mailinabox -d *.example.com -d example.com -s https://acme-staging-v02.api.letsencrypt.org/directory run
    Note the wildcard domain is important.
  • pass the linter
  • do go mod tidy

Ping @espressoelf, can you run the command (with your domain, email, and credentials)?

Closes #1459

@ldez
Copy link
Member Author

ldez commented Feb 12, 2024

@kbudde I saw your project after I created this PR, maybe this PR can interest you.
If you have some time to test it, that would be great ❤️.

@ldez
Copy link
Member Author

ldez commented Feb 23, 2024

@kbudde do you have some time to test the PR?
Or maybe you know a Mail-in-a-Box user who can test it?

I create a PR only based on API doc, I need a user to test it because I know that documentation is not always accurate.

@kbudde
Copy link

kbudde commented Feb 23, 2024

I see, I will test it at the weekend 😀

@kbudde
Copy link

kbudde commented Feb 23, 2024

@ldez had suddenly some free minutes and tested some combinations. Works like a charm.

2024/02/23 20:09:05 [INFO] [*.bar.budd.ee, foo.budd.ee] acme: Obtaining bundled SAN certificate
2024/02/23 20:09:06 [INFO] [*.bar.budd.ee] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/11329328053
2024/02/23 20:09:06 [INFO] [foo.budd.ee] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/11329328063
2024/02/23 20:09:06 [INFO] [*.bar.budd.ee] acme: use dns-01 solver
2024/02/23 20:09:06 [INFO] [foo.budd.ee] acme: Could not find solver for: tls-alpn-01
2024/02/23 20:09:06 [INFO] [foo.budd.ee] acme: Could not find solver for: http-01
2024/02/23 20:09:06 [INFO] [foo.budd.ee] acme: use dns-01 solver
2024/02/23 20:09:06 [INFO] [*.bar.budd.ee] acme: Preparing to solve DNS-01
2024/02/23 20:09:08 [INFO] [foo.budd.ee] acme: Preparing to solve DNS-01
2024/02/23 20:09:11 [INFO] [*.bar.budd.ee] acme: Trying to solve DNS-01
2024/02/23 20:09:11 [INFO] [*.bar.budd.ee] acme: Checking DNS record propagation. [nameservers=127.0.0.53:53]
2024/02/23 20:09:15 [INFO] Wait for propagation [timeout: 2m0s, interval: 4s]
2024/02/23 20:09:21 [INFO] [*.bar.budd.ee] The server validated our request
2024/02/23 20:09:21 [INFO] [foo.budd.ee] acme: Trying to solve DNS-01
2024/02/23 20:09:21 [INFO] [foo.budd.ee] acme: Checking DNS record propagation. [nameservers=127.0.0.53:53]
2024/02/23 20:09:25 [INFO] Wait for propagation [timeout: 2m0s, interval: 4s]
2024/02/23 20:09:28 [INFO] [foo.budd.ee] The server validated our request
2024/02/23 20:09:28 [INFO] [*.bar.budd.ee] acme: Cleaning DNS-01 challenge
2024/02/23 20:09:31 [INFO] [foo.budd.ee] acme: Cleaning DNS-01 challenge
2024/02/23 20:09:33 [INFO] [*.bar.budd.ee, foo.budd.ee] acme: Validations succeeded; requesting certificates
2024/02/23 20:09:33 [INFO] Wait for certificate [timeout: 30s, interval: 500ms]
2024/02/23 20:09:35 [INFO] [*.bar.budd.ee] Server responded with a certificate.```

It's even possible to use a apikey instead of a password.
https://mailinabox.email/api-docs.html#tag/User

@ldez ldez removed state/need-user-tests Need users to test functionality contrib/waiting-for-feedback labels Feb 23, 2024
@ldez ldez added this to the v4.16 milestone Feb 23, 2024
@ldez ldez marked this pull request as ready for review February 23, 2024 19:36
@ldez ldez requested a review from dmke February 23, 2024 19:36
@ldez
Copy link
Member Author

ldez commented Feb 23, 2024

thank you ❤️

Copy link
Member

@dmke dmke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldez ldez merged commit fac4019 into go-acme:master Feb 24, 2024
7 checks passed
@ldez ldez deleted the feat/mailinabox branch February 24, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Support for provider: Mail-in-a-Box (MIAB) API
3 participants