On Sat, Jul 25, 2020, at 2:17 PM, Mark Sapiro wrote:
On 7/25/20 12:54 PM, Odhiambo Washington wrote:
Finally, I have adapted your init script to get some rudimentary one that I could use on FreeBSD. I have to change /opt/mailman to be owned by mailman3:mailman3 (because I have "live" MLs on this server, using mailman-2.1.34. I am not sure if they can co-exist. I suppose they could, but what might be the security implication, if any??
I manage more than one server that supports both Mailman 2.1 and Mailman 3 running as user
mailman
. I'm not aware of any security issues.This is what the init script looks like (rudimentary!!): (venv) [root@gw /usr/local/etc/rc.d]# less mailman3 ### BEGIN INIT INFO # Provides: GNU Mailman # Short-Description: Mailman3 Service # Description: service control for Mailman3 ### END INIT INFO
PATH=/opt/mailman/mm/bin:/opt/mailman/mm/venv/bin:/usr/sbin:/usr/bin:/bin:/sbin: DESC="GNU Mailman service" DAEMON=/opt/mailman/mm/bin/mailman NAME=mailman USER=mailman3 GROUP=mailman3
# Needed by click export LANG=en_US.UTF-8
# Exit if the package is not installed [ -x "$DAEMON" ] || exit 0
# Load the VERBOSE setting and other rcS variables #. /lib/init/vars.sh
# Define LSB log_* functions. # Depend on lsb-base (>= 3.2-14) to ensure that this file is present # and status_of_proc is working. #. /lib/lsb/init-functions
case "$1" in start) [ "$VERBOSE" != no ] && echo "Starting $DESC" "$NAME" # use --force to remove a stale lock. /usr/local/bin/sudo -u $USER $DAEMON start --force
T don't recommend using --force in init scripts. It *shouldn't* matter because even with --force the master shouldn't break the lock if the pip that set it still exists, but I prefer not to use it.
;;
stop) [ "$VERBOSE" != no ] && echo "Stopping $DESC" "$NAME" /usr/local/bin/sudo -u $USER $DAEMON stop ;; status) /usr/local/bin/sudo -u $USER $DAEMON status ;; reopen) /usr/local/bin/sudo -u $USER $DAEMON reopen ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" /usr/local/bin/sudo -u $USER $DAEMON restart ;; *) echo "Usage: $SCRIPTNAME {start|stop|status|reopen|restart}" >&2 exit 3 ;; esac
It does start mailman3 for sure, but also complains after a few seconds with the message:
(venv) [root@gw /usr/local/etc/rc.d]# */opt/mailman/mm/venv/lib/python3.7/site-packages/mailman-3.3.2b1-py3.7.egg/mailman/rest/wsgiapp.py:180: DeprecatedWarning: Call to deprecated function __init__(...). API class may be removed in a future release, use falcon.App instead.*
- **kws)*
Hmm... strange, My various MM 3 installs are running falcon 1.4.0, 2.0.0 and 3.0.0a1 and I don't see this warning, but it is only a deprecation warning. It doesn't mean it won't work.
I have seen this during development and there is an issue open for this1.
But:
(venv) [root@gw /usr/local/etc/rc.d]# ps ax | grep mailman ...
It seems Mailman core and the rest runner and its workers are all running.
Assuming that I am using mod_wsgi with Apache, and that I have configured apache right using https://wiki.list.org/DOC/Mailman%203%20installation%20experience?action=AttachFile&do=view&target=mpo_wsgi.txt .. should I be able to access the MM3 web UI??
Yes, I think so.
At that point, I am feeling somewhat confused as to what to try next.
(venv) [root@gw /opt/mailman/mm/var/logs]# less mailman.log Jul 25 22:53:16 2020 (40670) Master started Jul 25 22:53:18 2020 (42036) bounces runner started. Jul 25 22:53:18 2020 (45205) out runner started. Jul 25 22:53:19 2020 (41191) archive runner started. Jul 25 22:53:19 2020 (46670) retry runner started. Jul 25 22:53:19 2020 (44567) nntp runner started. Jul 25 22:53:19 2020 (43069) in runner started. Jul 25 22:53:19 2020 (46960) virgin runner started. Jul 25 22:53:20 2020 (45720) pipeline runner started. Jul 25 22:53:20 2020 (47326) digest runner started. Jul 25 22:53:20 2020 (43755) lmtp runner started. Jul 25 22:53:20 2020 (45922) rest runner started. [2020-07-25 22:53:20 +0300] [45922] [INFO] Starting gunicorn 20.0.4 [2020-07-25 22:53:20 +0300] [45922] [INFO] Listening at: http://127.0.0.1:8001 (45922) [2020-07-25 22:53:20 +0300] [45922] [INFO] Using worker: sync [2020-07-25 22:53:20 +0300] [54732] [INFO] Booting worker with pid: 54732 [2020-07-25 22:53:20 +0300] [55467] [INFO] Booting worker with pid: 55467 Jul 25 22:53:21 2020 (42743) command runner started.
The above is all fine, but it is just Mailman core.
How do I access the web UI for MM3 now?
The Apache config points to /opt/mailman/mm/wsgi.py, a sampole of which is at <https://wiki.list.org/DOC/Mailman%203%20installation%20experience?action=AttachFile&do=view&target=wsgi.py>. Do you have that?
If you installed the Apache config literally, the location for Mailman 3 is defined by <https://wiki.list.org/DOC/Mailman%203%20installation%20experience?action=AttachFile&do=view&target=mpo_wsgi.txt#CA-29567efd6c2bbc2b7bb6c84828f419edb0e127f8_19> and the URL would be http(s)://your.server/mm3 - have you tried that?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)