prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Letsencrypt Force Renewal
  Is there a limit on the Subject Alt Name entries?
  
  I have updated my /mailu/mailu.env "HOSTNAMES" variable, but when I restart Mailu it doesn't update the Subject Alt Names on the mailu cert.
  
  Previously it has worked, so I am guessing that I need to force Letsencrypt to refresh as it isnt within the renewal window. But there is no guidance for the new letsencrypt certbot.
  
  I am using the latest Mailu version (1.7) and this is the command I am using to restart mailu '/mailu/docker-compose -p mailu up -d'
  
  </issue>
  <code>
  [start of core/nginx/letsencrypt.py]
  1 #!/usr/bin/python3
  2 
  3 import os
  4 import time
  5 import subprocess
  6 
  7 
  8 command = [
  9     "certbot",
  10     "-n", "--agree-tos", # non-interactive
  11     "-d", os.environ["HOSTNAMES"],
  12     "-m", "{}@{}".format(os.environ["POSTMASTER"], os.environ["DOMAIN"]),
  13     "certonly", "--standalone",
  14     "--cert-name", "mailu",
  15     "--preferred-challenges", "http", "--http-01-port", "8008",
  16     "--keep-until-expiring",
  17     "--rsa-key-size", "4096",
  18     "--config-dir", "/certs/letsencrypt",
  19     "--post-hook", "/config.py"
  20 ]
  21 
  22 # Wait for nginx to start
  23 time.sleep(5)
  24 
  25 # Run certbot every hour
  26 while True:
  27     subprocess.call(command)
  28     time.sleep(3600)
  29 
  30
  [end of core/nginx/letsencrypt.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/core/nginx/letsencrypt.py b/core/nginx/letsencrypt.py
  --- a/core/nginx/letsencrypt.py
  +++ b/core/nginx/letsencrypt.py
  @@ -14,8 +14,8 @@
       "--cert-name", "mailu",
       "--preferred-challenges", "http", "--http-01-port", "8008",
       "--keep-until-expiring",
  -    "--rsa-key-size", "4096",
       "--config-dir", "/certs/letsencrypt",
  +    "--renew-with-new-domains",
       "--post-hook", "/config.py"
   ]
  
verification_info: {"golden_diff": "diff --git a/core/nginx/letsencrypt.py b/core/nginx/letsencrypt.py\n--- a/core/nginx/letsencrypt.py\n+++ b/core/nginx/letsencrypt.py\n@@ -14,8 +14,8 @@\n     \"--cert-name\", \"mailu\",\n     \"--preferred-challenges\", \"http\", \"--http-01-port\", \"8008\",\n     \"--keep-until-expiring\",\n-    \"--rsa-key-size\", \"4096\",\n     \"--config-dir\", \"/certs/letsencrypt\",\n+    \"--renew-with-new-domains\",\n     \"--post-hook\", \"/config.py\"\n ]\n", "issue": "Letsencrypt Force Renewal\nIs there a limit on the Subject Alt Name entries?\r\n\r\nI have updated my /mailu/mailu.env \"HOSTNAMES\" variable, but when I restart Mailu it doesn't update the Subject Alt Names on the mailu cert.\r\n\r\nPreviously it has worked, so I am guessing that I need to force Letsencrypt to refresh as it isnt within the renewal window. But there is no guidance for the new letsencrypt certbot.\r\n\r\nI am using the latest Mailu version (1.7) and this is the command I am using to restart mailu '/mailu/docker-compose -p mailu up -d'\n", "before_files": [{"content": "#!/usr/bin/python3\n\nimport os\nimport time\nimport subprocess\n\n\ncommand = [\n    \"certbot\",\n    \"-n\", \"--agree-tos\", # non-interactive\n    \"-d\", os.environ[\"HOSTNAMES\"],\n    \"-m\", \"{}@{}\".format(os.environ[\"POSTMASTER\"], os.environ[\"DOMAIN\"]),\n    \"certonly\", \"--standalone\",\n    \"--cert-name\", \"mailu\",\n    \"--preferred-challenges\", \"http\", \"--http-01-port\", \"8008\",\n    \"--keep-until-expiring\",\n    \"--rsa-key-size\", \"4096\",\n    \"--config-dir\", \"/certs/letsencrypt\",\n    \"--post-hook\", \"/config.py\"\n]\n\n# Wait for nginx to start\ntime.sleep(5)\n\n# Run certbot every hour\nwhile True:\n    subprocess.call(command)\n    time.sleep(3600)\n\n", "path": "core/nginx/letsencrypt.py"}]}