On 1/29/20 12:01 AM, Shashikanth Komandoor wrote:
I observed that the "notify" subcommand can be run only while I am in the /var/lib/mailman/mailman directory where my mailman core is installed (through GITHUB).
I think you mean GitLab, but in any case, the reason for this is you have to be in that directory for the mailman command to find your mailman.cfg file.
I deal with this by creating a separate bin/ directory for these commends, in my case /opt/mailman/mm/bin because Mailman is installed in /opt/mailman/mm/, and my /opt/mailman/mm/bin/mailman file contains
#!/bin/bash
exec /opt/mailman/mm/venv/bin/mailman
-C "/opt/mailman/mm/mailman.cfg"
$@
And moreover I installed all the components of the mailman using the root user only and so there is no mailman user on my machine.
And hence I wrote the below entry in the crontab directly and found it is working fine.
00 08 * * * cd /var/lib/mailman/mailman; /var/lib/mailman/venv3/bin/python /var/lib/mailman/venv3/bin/mailman notify
The /var/lib/mailman/venv3/bin/python is probably not needed as /var/lib/mailman/venv3/bin/mailman should contain the shebang line
#!/var/lib/mailman/venv3/bin/python
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan