
You wrote:
You could put it in /home/maillistgen if you export PYTHONPATH='/home/maillistgen' before running mailman shell...
However, it looks as if mailman in its (venv) is stubborn against PYTHONPATH=/outside/opt-mailman-home
Look:
I managed to have my set_member_prefs.py in /opt/mailman (home dir of mailman) or below, for example in /opt/mailman/venv/lib , but mailman does not find it when I use a different location outside mm home (and yes, I set the ownership for it to mailman):
sudo su mailman (venv) /opt/mailman> PYTHONPATH=/home/maillistgen mailman withlist -r set_member_prefs ← does not work 4 -rw-r--r-- 1 mailman mailman 833 5. Aug 22:19 /home/maillistgen/set_member_prefs.py (i.e. present)
(venv) /opt/mailman> PYTHONPATH=/opt/mailman mailman withlist -r set_member_prefs ← works 4 -rw-r--r-- 1 mailman mailman 811 6. Aug 00:34 /opt/mailman/set_member_prefs.py (i.e. present)
Can you say something to my observation? Am I correct or wrong?