From 65e7350e06ea6cf20107842dd3c02580b18118cd Mon Sep 17 00:00:00 2001 From: Felix Lampe Date: Thu, 21 Sep 2023 19:24:57 +0200 Subject: [PATCH 1/2] Allow multiple mail addresses to be configured using -m '1st@mail.com 2nd@xyz.net' --- acme.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acme.sh b/acme.sh index 54dfa9a5..dd687fc2 100755 --- a/acme.sh +++ b/acme.sh @@ -3766,7 +3766,7 @@ _regAccount() { _debug3 externalBinding "$externalBinding" fi if [ "$_email" ]; then - email_sg="\"contact\": [\"mailto:$_email\"], " + email_sg="\"contact\": ['$(for E in $_email; do echo -n '"mailto:'$E'",' ; done | sed -r 's/,$//')'], " fi regjson="{$email_sg\"termsOfServiceAgreed\": true$externalBinding}" @@ -3845,7 +3845,7 @@ updateaccount() { _email="$(_getAccountEmail)" if [ "$_email" ]; then - updjson='{"contact": ["mailto:'$_email'"]}' + updjson='{"contact": ['$(for E in $_email; do echo -n '"mailto:'$E'",' ; done | sed -r 's/,$//')']}' else updjson='{"contact": []}' fi From cf3b10b48324286915e3b863d4ce262c12c44e02 Mon Sep 17 00:00:00 2001 From: Felix Lampe Date: Thu, 21 Sep 2023 19:49:54 +0200 Subject: [PATCH 2/2] Document multiple mail addresses in help text --- acme.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/acme.sh b/acme.sh index dd687fc2..219df96c 100755 --- a/acme.sh +++ b/acme.sh @@ -6939,7 +6939,8 @@ Parameters: --cert-home Specifies the home dir to save all the certs, only valid for '--install' command. --config-home Specifies the home dir to save all the configurations. --useragent Specifies the user agent string. it will be saved for future use too. - -m, --email Specifies the account email, only valid for the '--install' and '--update-account' command. + -m, --email Specifies the account email address(es), only valid for the '--install' and '--update-account' command. + To configure multiple addresses, pass them in quotes separated by space: '--email \"1st@mail.com 2nd@xyz.net\"' --accountkey Specifies the account key path, only valid for the '--install' command. --days Specifies the days to renew the cert when using '--issue' command. The default value is $DEFAULT_RENEW days. --httpport Specifies the standalone listening port. Only valid if the server is behind a reverse proxy or load balancer.