|
|
@ -4,10 +4,16 @@ import os
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
import subprocess
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hostnames = list(set(os.environ['HOSTNAMES'].split(',')))
|
|
|
|
|
|
|
|
for hostname in hostnames:
|
|
|
|
|
|
|
|
if not hostname.startswith('autoconfig.'):
|
|
|
|
|
|
|
|
hostnames.append(f'autoconfig.{hostname}')
|
|
|
|
|
|
|
|
hostnames = ','.join(set(hostnames))
|
|
|
|
|
|
|
|
|
|
|
|
command = [
|
|
|
|
command = [
|
|
|
|
"certbot",
|
|
|
|
"certbot",
|
|
|
|
"-n", "--agree-tos", # non-interactive
|
|
|
|
"-n", "--agree-tos", # non-interactive
|
|
|
|
"-d", os.environ["HOSTNAMES"],
|
|
|
|
"-d", hostnames, "--expand", "--allow-subset-of-names",
|
|
|
|
"-m", "{}@{}".format(os.environ["POSTMASTER"], os.environ["DOMAIN"]),
|
|
|
|
"-m", "{}@{}".format(os.environ["POSTMASTER"], os.environ["DOMAIN"]),
|
|
|
|
"certonly", "--standalone",
|
|
|
|
"certonly", "--standalone",
|
|
|
|
"--cert-name", "mailu",
|
|
|
|
"--cert-name", "mailu",
|
|
|
@ -20,7 +26,7 @@ command = [
|
|
|
|
command2 = [
|
|
|
|
command2 = [
|
|
|
|
"certbot",
|
|
|
|
"certbot",
|
|
|
|
"-n", "--agree-tos", # non-interactive
|
|
|
|
"-n", "--agree-tos", # non-interactive
|
|
|
|
"-d", os.environ["HOSTNAMES"],
|
|
|
|
"-d", hostnames, "--expand", "--allow-subset-of-names",
|
|
|
|
"-m", "{}@{}".format(os.environ["POSTMASTER"], os.environ["DOMAIN"]),
|
|
|
|
"-m", "{}@{}".format(os.environ["POSTMASTER"], os.environ["DOMAIN"]),
|
|
|
|
"certonly", "--standalone",
|
|
|
|
"certonly", "--standalone",
|
|
|
|
"--cert-name", "mailu-ecdsa",
|
|
|
|
"--cert-name", "mailu-ecdsa",
|
|
|
|