about summary refs log tree commit homepage
path: root/examples/public-inbox-imapd.socket
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-08-11 20:13:09 +0000
committerEric Wong <e@80x24.org>2022-08-11 21:58:06 +0000
commitb2c0df4da9317c1dbfaacdfb1b2af2f0d08afaef (patch)
tree3afb57c2d366a5d4934542b4f11b9af43b56fd43 /examples/public-inbox-imapd.socket
parent21dd4cc5672ae3ead8a513d3be926722ddb80879 (diff)
downloadpublic-inbox-b2c0df4da9317c1dbfaacdfb1b2af2f0d08afaef.tar.gz
systemd.socket(5) files can actually contain multiple listen
sockets, so shave down inode overhead and simplify config
file management by consolidating all applicable ports into
a single file for each daemon.
Diffstat (limited to 'examples/public-inbox-imapd.socket')
-rw-r--r--examples/public-inbox-imapd.socket14
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/public-inbox-imapd.socket b/examples/public-inbox-imapd.socket
index fcd924fd..c3c55ea1 100644
--- a/examples/public-inbox-imapd.socket
+++ b/examples/public-inbox-imapd.socket
@@ -1,11 +1,23 @@
 # ==> /etc/systemd/system/public-inbox-imapd.socket <==
+# This contains 5 sockets for an public-inbox-imapd instance.
+# The TCP ports are well-known ports registered in /etc/services.
+# The /run/imapd.onion.sock entry is meant for the Tor hidden service
+# enabled by the following line in the torrc(5) file:
+#   HiddenServicePort 143 unix:/run/imapd.onion.sock
 [Unit]
-Description = public-inbox-imapd socket
+Description = public-inbox-imapd sockets
 
 [Socket]
 ListenStream = 0.0.0.0:143
+ListenStream = 0.0.0.0:993
+ListenStream = /run/imapd.onion.sock
+
+# Separating IPv4 from IPv6 listeners makes for nicer output
+# of IPv4 addresses in various reporting/monitoring tools
 BindIPv6Only = ipv6-only
 ListenStream = [::]:143
+ListenStream = [::]:993
+
 Service = public-inbox-imapd@1.service
 
 [Install]