foxcpp / maddy

✉️ Composable all-in-one mail server.
https://maddy.email
GNU General Public License v3.0
4.95k stars 239 forks source link

unknown config block: local_tls #577

Open stanislavprokopov opened 1 year ago

stanislavprokopov commented 1 year ago

Describe the bug

Cannot run maddy with tls.loader.acme in config, getting "unknown config block: local_tls" error on start.

Steps to reproduce

tls.loader.acme local_tls {
    email put-your-email-here@example.org
    agreed # indicate your agreement with Let's Encrypt ToS
    challenge dns-01
}

tls &local_tls

this is taken from https://maddy.email/reference/tls-acme/

Log files

unknown config block: local_tls

Configuration file

see above in steps

Environment information

onny commented 1 year ago

Also having this issue :( Is there a working example configuration someone is using with acme?

stanislavprokopov commented 1 year ago

I was able to get it working with following config.

tls {
    loader acme {
        hostname $(hostname)
        email email@somehost.com
        agreed # indicate your agreement with Let's Encrypt ToS
        challenge dns-01

        dns digitalocean {
            api_token "api-key"
        }
    }
}
onny commented 1 year ago

Is this a global tls configuration? So no tls &local_tls is required?

stanislavprokopov commented 1 year ago

yes

cuu508 commented 1 year ago

Can confirm the example in the documentation gives unknown config block: local_tls error but the snippet in https://github.com/foxcpp/maddy/issues/577#issuecomment-1544471940 works. I guess the fix would be to update the example in the documentation.

gareththered commented 1 year ago

I used a similar example to the documentation, but called named it acme_tls instead of local_tls throughout the config file and it worked.