We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
connect to /tmp/podop.socket: Permission denied
Hi,
I build the docker images from Mailu/tests/build_arm.sh (commit 5d20f28).
Setting mailu.env log level to: `LOG_LEVEL=DEBUG`
I got this "Temporary lookup failure" when sending a test email to my domain.
Digging out the postfix's log is the best I can manage with my limited knowledge.
Any help please?
Thanks,
Tin.

`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: connect to /tmp/podop.socket: Permission denied`
`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: table socketmap:unix:/tmp/podop.socket:transport lookup error: Permission denied`
`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: socketmap:unix:/tmp/podop.socket:transport lookup error for "*"`
`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: connect to /tmp/podop.socket: Permission denied`
`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: table socketmap:unix:/tmp/podop.socket:transport lookup error: Permission denied`
`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: socketmap:unix:/tmp/podop.socket:transport lookup error for "*"`
`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: connect to /tmp/podop.socket: Permission denied`
`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: table socketmap:unix:/tmp/podop.socket:domain lookup error: Permission denied`
`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: virtual_mailbox_domains: socketmap:unix:/tmp/podop.socket:domain: table lookup problem`
`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: virtual_mailbox_domains lookup failure`
`smtp         | Dec 25 21:35:19 mail postfix/trivial-rewrite[276]: warning: connect to /tmp/podop.socket: Permission denied`
`smtp         | Dec 25 21:35:19 mail postfix/trivial-rewrite[276]: warning: table socketmap:unix:/tmp/podop.socket:domain lookup error: Permission denied`
`smtp         | Dec 25 21:35:19 mail postfix/trivial-rewrite[276]: warning: virtual_mailbox_domains: socketmap:unix:/tmp/podop.socket:domain: table lookup problem`
`smtp         | Dec 25 21:35:19 mail postfix/trivial-rewrite[276]: warning: virtual_mailbox_domains lookup failure`
`smtp         | Dec 25 21:35:19 mail postfix/smtpd[198]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.0 <tin@***obscured.com***>: Temporary lookup failure; from=<admin@***obscured.com***> to=<tin@***obscured.com***> proto=SMTP helo=<mail.***obscured.com***>`
`smtp         | Dec 25 21:35:24 mail postfix/smtpd[258]: connect from localhost[127.0.0.1]`
`smtp         | Dec 25 21:35:24 mail postfix/smtpd[258]: disconnect from localhost[127.0.0.1] quit=1 commands=1`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `core/postfix/start.py`
Content:
```
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 def is_valid_postconf_line(line):
31     return not line.startswith("#") \
32             and not line == ''
33 
34 # Actual startup script
35 os.environ["FRONT_ADDRESS"] = system.get_host_address_from_environment("FRONT", "front")
36 os.environ["ADMIN_ADDRESS"] = system.get_host_address_from_environment("ADMIN", "admin")
37 os.environ["ANTISPAM_MILTER_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM_MILTER", "antispam:11332")
38 os.environ["LMTP_ADDRESS"] = system.get_host_address_from_environment("LMTP", "imap:2525")
39 os.environ["OUTCLEAN"] = os.environ["HOSTNAMES"].split(",")[0]
40 try:
41     os.environ["OUTCLEAN_ADDRESS"] = system.resolve_hostname(os.environ["OUTCLEAN"])
42 except:
43     os.environ["OUTCLEAN_ADDRESS"] = "10.10.10.10"
44 
45 for postfix_file in glob.glob("/conf/*.cf"):
46     conf.jinja(postfix_file, os.environ, os.path.join("/etc/postfix", os.path.basename(postfix_file)))
47 
48 if os.path.exists("/overrides/postfix.cf"):
49     for line in open("/overrides/postfix.cf").read().strip().split("\n"):
50         if is_valid_postconf_line(line):
51             os.system('postconf -e "{}"'.format(line))
52 
53 if os.path.exists("/overrides/postfix.master"):
54     for line in open("/overrides/postfix.master").read().strip().split("\n"):
55         if is_valid_postconf_line(line):
56             os.system('postconf -Me "{}"'.format(line))
57 
58 for map_file in glob.glob("/overrides/*.map"):
59     destination = os.path.join("/etc/postfix", os.path.basename(map_file))
60     shutil.copyfile(map_file, destination)
61     os.system("postmap {}".format(destination))
62     os.remove(destination)
63 
64 if "RELAYUSER" in os.environ:
65     path = "/etc/postfix/sasl_passwd"
66     conf.jinja("/conf/sasl_passwd", os.environ, path)
67     os.system("postmap {}".format(path))
68 
69 # Run Podop and Postfix
70 multiprocessing.Process(target=start_podop).start()
71 os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing")
72 # Before starting postfix, we need to check permissions on /queue
73 # in the event that postfix,postdrop id have changed
74 os.system("postfix set-permissions")
75 os.system("postfix start-fg")
76
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/core/postfix/start.py b/core/postfix/start.py
--- a/core/postfix/start.py
+++ b/core/postfix/start.py
@@ -8,12 +8,13 @@
 import sys
 
 from podop   import run_server
+from pwd import getpwnam
 from socrate import system, conf
 
 log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING"))
 
 def start_podop():
-    os.setuid(100)
+    os.setuid(getpwnam('postfix').pw_uid)
     url = "http://" + os.environ["ADMIN_ADDRESS"] + "/internal/postfix/"
     # TODO: Remove verbosity setting from Podop?
     run_server(0, "postfix", "/tmp/podop.socket", [

{"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@@ -8,12 +8,13 @@\n import sys\n \n from podop   import run_server\n+from pwd import getpwnam\n from socrate import system, conf\n \n log.basicConfig(stream=sys.stderr, level=os.environ.get(\"LOG_LEVEL\", \"WARNING\"))\n \n def start_podop():\n-    os.setuid(100)\n+    os.setuid(getpwnam('postfix').pw_uid)\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", "issue": "connect to /tmp/podop.socket: Permission denied\nHi,\r\nI build the docker images from Mailu/tests/build_arm.sh (commit 5d20f28).\r\nSetting mailu.env log level to: `LOG_LEVEL=DEBUG`\r\nI got this \"Temporary lookup failure\" when sending a test email to my domain.\r\nDigging out the postfix's log is the best I can manage with my limited knowledge.\r\nAny help please?\r\nThanks,\r\nTin.\r\n\r\n`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: connect to /tmp/podop.socket: Permission denied`\r\n`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: table socketmap:unix:/tmp/podop.socket:transport lookup error: Permission denied`\r\n`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: socketmap:unix:/tmp/podop.socket:transport lookup error for \"*\"`\r\n`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: connect to /tmp/podop.socket: Permission denied`\r\n`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: table socketmap:unix:/tmp/podop.socket:transport lookup error: Permission denied`\r\n`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: socketmap:unix:/tmp/podop.socket:transport lookup error for \"*\"`\r\n`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: connect to /tmp/podop.socket: Permission denied`\r\n`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: table socketmap:unix:/tmp/podop.socket:domain lookup error: Permission denied`\r\n`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: virtual_mailbox_domains: socketmap:unix:/tmp/podop.socket:domain: table lookup problem`\r\n`smtp         | Dec 25 21:35:01 mail postfix/trivial-rewrite[276]: warning: virtual_mailbox_domains lookup failure`\r\n`smtp         | Dec 25 21:35:19 mail postfix/trivial-rewrite[276]: warning: connect to /tmp/podop.socket: Permission denied`\r\n`smtp         | Dec 25 21:35:19 mail postfix/trivial-rewrite[276]: warning: table socketmap:unix:/tmp/podop.socket:domain lookup error: Permission denied`\r\n`smtp         | Dec 25 21:35:19 mail postfix/trivial-rewrite[276]: warning: virtual_mailbox_domains: socketmap:unix:/tmp/podop.socket:domain: table lookup problem`\r\n`smtp         | Dec 25 21:35:19 mail postfix/trivial-rewrite[276]: warning: virtual_mailbox_domains lookup failure`\r\n`smtp         | Dec 25 21:35:19 mail postfix/smtpd[198]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.0 <tin@***obscured.com***>: Temporary lookup failure; from=<admin@***obscured.com***> to=<tin@***obscured.com***> proto=SMTP helo=<mail.***obscured.com***>`\r\n`smtp         | Dec 25 21:35:24 mail postfix/smtpd[258]: connect from localhost[127.0.0.1]`\r\n`smtp         | Dec 25 21:35:24 mail postfix/smtpd[258]: disconnect from localhost[127.0.0.1] quit=1 commands=1`\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\ndef is_valid_postconf_line(line):\n    return not line.startswith(\"#\") \\\n            and not line == ''\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\")\nos.environ[\"OUTCLEAN\"] = os.environ[\"HOSTNAMES\"].split(\",\")[0]\ntry:\n    os.environ[\"OUTCLEAN_ADDRESS\"] = system.resolve_hostname(os.environ[\"OUTCLEAN\"])\nexcept:\n    os.environ[\"OUTCLEAN_ADDRESS\"] = \"10.10.10.10\"\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        if is_valid_postconf_line(line):\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        if is_valid_postconf_line(line):\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\")\n# Before starting postfix, we need to check permissions on /queue\n# in the event that postfix,postdrop id have changed\nos.system(\"postfix set-permissions\")\nos.system(\"postfix start-fg\")\n", "path": "core/postfix/start.py"}], "after_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 pwd import getpwnam\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(getpwnam('postfix').pw_uid)\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\ndef is_valid_postconf_line(line):\n    return not line.startswith(\"#\") \\\n            and not line == ''\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\")\nos.environ[\"OUTCLEAN\"] = os.environ[\"HOSTNAMES\"].split(\",\")[0]\ntry:\n    os.environ[\"OUTCLEAN_ADDRESS\"] = system.resolve_hostname(os.environ[\"OUTCLEAN\"])\nexcept:\n    os.environ[\"OUTCLEAN_ADDRESS\"] = \"10.10.10.10\"\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        if is_valid_postconf_line(line):\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        if is_valid_postconf_line(line):\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\")\n# Before starting postfix, we need to check permissions on /queue\n# in the event that postfix,postdrop id have changed\nos.system(\"postfix set-permissions\")\nos.system(\"postfix start-fg\")\n", "path": "core/postfix/start.py"}]}