wm: doc

Download patch

ref: cd046a80e1fbdf58ce4afc433de12e794aa7122d
parent: 04b60e1861eb0dbead962a3e49b581c4424428bf
author: jrmu <jrmu@cloud9p.org>
date: Wed Oct 2 02:10:59 EDT 2024

Provide instructions to run upas/smtpd as user upas for port 587

--- a/smtpd.ms
+++ b/smtpd.ms
@@ -90,16 +90,27 @@
 
 If your email address is simply $user, you may be able to omit the upasname variable provided the domain is correctly configured elsewhere.
 
-To offer SMTP over TLS (submission port):
+To offer SMTP over TLS (submission port), we can no longer use /bin/service files, since
+by default, it starts the process as user none.
 
-First, create a file /rc/bin/service/tcp587:
+Instead, we will start upas/smtpd from cpustart, and call aux/listen with -t.
 
+cpu% mkdir /cfg/$sysname/service.upas
+cpu% cp /bin/service/!tcp587 /cfg/$sysname/service.upas/tcp587
+
+Then, we edit tcp587:
+
+cpu% cat tcp587
 #!/bin/rc
 
 user=`{cat /dev/user}
 
-exec upas/smtpd -a -c /sys/lib/tls/acmed/example.com.crt -e -f -s -n $3
+exec upas/smtpd -a -d -c /sys/lib/tls/acmed/example.com.crt -e -s -n $3
 
-Next, set the file to executable:
+A line such as below must be added to /cfg/$sysname/cpustart to call service.upas:
 
-cpu% chmod +x tcp587
+auth/as upas aux/listen -p 128 -t /cfg/$sysname/service.upas
+
+Make sure to set the file as executable:
+
+cpu% chmod +x /cfg/$sysname/service.upas/tcp587