prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Postconf overrides should ignore comments
  Comment lines in overrides/postfix.cf are sent to postconf in core/postfix/start.py:37. This results in error messages.
  
  Comment lines should be ignored by core/postfix/start.py.
  
  </issue>
  <code>
  [start of core/postfix/start.py]
  1 #!/usr/bin/python3
  2 
  3 import os
  4 import glob
  5 import shutil
  6 import multiprocessing
  7 import logging as log
  8 import sys
  9 
  10 from podop   import run_server
  11 from socrate import system, conf
  12 
  13 log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING"))
  14 
  15 def start_podop():
  16     os.setuid(100)
  17     url = "http://" + os.environ["ADMIN_ADDRESS"] + "/internal/postfix/"
  18     # TODO: Remove verbosity setting from Podop?
  19     run_server(0, "postfix", "/tmp/podop.socket", [
  20 		("transport", "url", url + "transport/§"),
  21 		("alias", "url", url + "alias/§"),
  22 		("domain", "url", url + "domain/§"),
  23         ("mailbox", "url", url + "mailbox/§"),
  24         ("recipientmap", "url", url + "recipient/map/§"),
  25         ("sendermap", "url", url + "sender/map/§"),
  26         ("senderaccess", "url", url + "sender/access/§"),
  27         ("senderlogin", "url", url + "sender/login/§")
  28     ])
  29 
  30 # Actual startup script
  31 os.environ["FRONT_ADDRESS"] = system.get_host_address_from_environment("FRONT", "front")
  32 os.environ["ADMIN_ADDRESS"] = system.get_host_address_from_environment("ADMIN", "admin")
  33 os.environ["ANTISPAM_MILTER_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM_MILTER", "antispam:11332")
  34 os.environ["LMTP_ADDRESS"] = system.get_host_address_from_environment("LMTP", "imap:2525")
  35 
  36 for postfix_file in glob.glob("/conf/*.cf"):
  37     conf.jinja(postfix_file, os.environ, os.path.join("/etc/postfix", os.path.basename(postfix_file)))
  38 
  39 if os.path.exists("/overrides/postfix.cf"):
  40     for line in open("/overrides/postfix.cf").read().strip().split("\n"):
  41         os.system('postconf -e "{}"'.format(line))
  42 
  43 if os.path.exists("/overrides/postfix.master"):
  44     for line in open("/overrides/postfix.master").read().strip().split("\n"):
  45         os.system('postconf -Me "{}"'.format(line))
  46 
  47 for map_file in glob.glob("/overrides/*.map"):
  48     destination = os.path.join("/etc/postfix", os.path.basename(map_file))
  49     shutil.copyfile(map_file, destination)
  50     os.system("postmap {}".format(destination))
  51     os.remove(destination)
  52 
  53 if "RELAYUSER" in os.environ:
  54     path = "/etc/postfix/sasl_passwd"
  55     conf.jinja("/conf/sasl_passwd", os.environ, path)
  56     os.system("postmap {}".format(path))
  57 
  58 # Run Podop and Postfix
  59 multiprocessing.Process(target=start_podop).start()
  60 os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing")
  61 os.system("postfix start-fg")
  62
  [end of core/postfix/start.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/postfix/start.py b/core/postfix/start.py
  --- a/core/postfix/start.py
  +++ b/core/postfix/start.py
  @@ -27,6 +27,10 @@
           ("senderlogin", "url", url + "sender/login/§")
       ])
   
  +def is_valid_postconf_line(line):
  +    return not line.startswith("#") \
  +            and not line == ''
  +
   # Actual startup script
   os.environ["FRONT_ADDRESS"] = system.get_host_address_from_environment("FRONT", "front")
   os.environ["ADMIN_ADDRESS"] = system.get_host_address_from_environment("ADMIN", "admin")
  @@ -38,11 +42,13 @@
   
   if os.path.exists("/overrides/postfix.cf"):
       for line in open("/overrides/postfix.cf").read().strip().split("\n"):
  -        os.system('postconf -e "{}"'.format(line))
  +        if is_valid_postconf_line(line):
  +            os.system('postconf -e "{}"'.format(line))
   
   if os.path.exists("/overrides/postfix.master"):
       for line in open("/overrides/postfix.master").read().strip().split("\n"):
  -        os.system('postconf -Me "{}"'.format(line))
  +        if is_valid_postconf_line(line):
  +            os.system('postconf -Me "{}"'.format(line))
   
   for map_file in glob.glob("/overrides/*.map"):
       destination = os.path.join("/etc/postfix", os.path.basename(map_file))
  
verification_info: {"golden_diff": "diff --git a/core/postfix/start.py b/core/postfix/start.py\n--- a/core/postfix/start.py\n+++ b/core/postfix/start.py\n@@ -27,6 +27,10 @@\n         (\"senderlogin\", \"url\", url + \"sender/login/\u00a7\")\n     ])\n \n+def is_valid_postconf_line(line):\n+    return not line.startswith(\"#\") \\\n+            and not line == ''\n+\n # Actual startup script\n os.environ[\"FRONT_ADDRESS\"] = system.get_host_address_from_environment(\"FRONT\", \"front\")\n os.environ[\"ADMIN_ADDRESS\"] = system.get_host_address_from_environment(\"ADMIN\", \"admin\")\n@@ -38,11 +42,13 @@\n \n if os.path.exists(\"/overrides/postfix.cf\"):\n     for line in open(\"/overrides/postfix.cf\").read().strip().split(\"\\n\"):\n-        os.system('postconf -e \"{}\"'.format(line))\n+        if is_valid_postconf_line(line):\n+            os.system('postconf -e \"{}\"'.format(line))\n \n if os.path.exists(\"/overrides/postfix.master\"):\n     for line in open(\"/overrides/postfix.master\").read().strip().split(\"\\n\"):\n-        os.system('postconf -Me \"{}\"'.format(line))\n+        if is_valid_postconf_line(line):\n+            os.system('postconf -Me \"{}\"'.format(line))\n \n for map_file in glob.glob(\"/overrides/*.map\"):\n     destination = os.path.join(\"/etc/postfix\", os.path.basename(map_file))\n", "issue": "Postconf overrides should ignore comments\nComment lines in overrides/postfix.cf are sent to postconf in core/postfix/start.py:37. This results in error messages.\r\n\r\nComment lines should be ignored by core/postfix/start.py.\n", "before_files": [{"content": "#!/usr/bin/python3\n\nimport os\nimport glob\nimport shutil\nimport multiprocessing\nimport logging as log\nimport sys\n\nfrom podop   import run_server\nfrom socrate import system, conf\n\nlog.basicConfig(stream=sys.stderr, level=os.environ.get(\"LOG_LEVEL\", \"WARNING\"))\n\ndef start_podop():\n    os.setuid(100)\n    url = \"http://\" + os.environ[\"ADMIN_ADDRESS\"] + \"/internal/postfix/\"\n    # TODO: Remove verbosity setting from Podop?\n    run_server(0, \"postfix\", \"/tmp/podop.socket\", [\n\t\t(\"transport\", \"url\", url + \"transport/\u00a7\"),\n\t\t(\"alias\", \"url\", url + \"alias/\u00a7\"),\n\t\t(\"domain\", \"url\", url + \"domain/\u00a7\"),\n        (\"mailbox\", \"url\", url + \"mailbox/\u00a7\"),\n        (\"recipientmap\", \"url\", url + \"recipient/map/\u00a7\"),\n        (\"sendermap\", \"url\", url + \"sender/map/\u00a7\"),\n        (\"senderaccess\", \"url\", url + \"sender/access/\u00a7\"),\n        (\"senderlogin\", \"url\", url + \"sender/login/\u00a7\")\n    ])\n\n# Actual startup script\nos.environ[\"FRONT_ADDRESS\"] = system.get_host_address_from_environment(\"FRONT\", \"front\")\nos.environ[\"ADMIN_ADDRESS\"] = system.get_host_address_from_environment(\"ADMIN\", \"admin\")\nos.environ[\"ANTISPAM_MILTER_ADDRESS\"] = system.get_host_address_from_environment(\"ANTISPAM_MILTER\", \"antispam:11332\")\nos.environ[\"LMTP_ADDRESS\"] = system.get_host_address_from_environment(\"LMTP\", \"imap:2525\")\n\nfor postfix_file in glob.glob(\"/conf/*.cf\"):\n    conf.jinja(postfix_file, os.environ, os.path.join(\"/etc/postfix\", os.path.basename(postfix_file)))\n\nif os.path.exists(\"/overrides/postfix.cf\"):\n    for line in open(\"/overrides/postfix.cf\").read().strip().split(\"\\n\"):\n        os.system('postconf -e \"{}\"'.format(line))\n\nif os.path.exists(\"/overrides/postfix.master\"):\n    for line in open(\"/overrides/postfix.master\").read().strip().split(\"\\n\"):\n        os.system('postconf -Me \"{}\"'.format(line))\n\nfor map_file in glob.glob(\"/overrides/*.map\"):\n    destination = os.path.join(\"/etc/postfix\", os.path.basename(map_file))\n    shutil.copyfile(map_file, destination)\n    os.system(\"postmap {}\".format(destination))\n    os.remove(destination)\n\nif \"RELAYUSER\" in os.environ:\n    path = \"/etc/postfix/sasl_passwd\"\n    conf.jinja(\"/conf/sasl_passwd\", os.environ, path)\n    os.system(\"postmap {}\".format(path))\n\n# Run Podop and Postfix\nmultiprocessing.Process(target=start_podop).start()\nos.system(\"/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing\")\nos.system(\"postfix start-fg\")\n", "path": "core/postfix/start.py"}]}