Relative paths in 'mailman start -C' are broken

Bug #982551 reported by Bernhard Schmidt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
High
Barry Warsaw

Bug Description

GNU Mailman 3.0.0b1+ (current bzr head).

http://packages.python.org/mailman/src/mailman/docs/START.html#running-mailman-3 talks about ./mailman.cfg being used as configuration (among others). This seems to be only partially true.

I put this mailman.cfg into /usr/local/mailman

---
[database]
class: mailman.database.postgresql.PostgreSQLDatabase
url: postgres://mailman:mailman@xxx/mailman

[shell]
use_ipython: yes

[mta]
incoming: mailman.mta.postfix.LMTP
outgoing: mailman.mta.deliver.deliver
lmtp_host: mailout.xxx
lmtp_port: 8024
smtp_host: mailout.xxx
smtp_port: 25

[runner.nntp]
start: no
---

and started bin/mailman start. The PostgreSQL database was initialized, bin/mailman status showed the correct configuration location. I could create lists and they were added in the SQL database. It would use ipython as shell. But it would still try to send mail through localhost, and it would still start the nntp runner. And LMTP would reject mails to the existing lists with "mailbox unavailable". So it seems the configuration was only used by the main process, but not by the runners.

Moving the configuration to a non-relative location fixed it.

Tags: mailman3
Revision history for this message
Barry Warsaw (barry) wrote :

Are you sure you restarted the runners after modifying the mailman.cfg file? None of the processes will re-read changes to the configuration file without being restarted.

tags: added: mailman3
Changed in mailman:
status: New → Incomplete
Revision history for this message
Bernhard Schmidt (berni) wrote :

Yes I'm sure, I ran bin/mailman stop and verified that no processes were running.

Barry Warsaw (barry)
Changed in mailman:
status: Incomplete → Triaged
Revision history for this message
Barry Warsaw (barry) wrote :

The problem is that if you do 'bin/mailman -C some/relative/path' these paths will not get passed to the runner subprocesses correctly. I think the fix is to make them absolute paths in cli_control.py and pass only absolute paths to the runners command lines.

Changed in mailman:
status: Triaged → Confirmed
importance: Undecided → High
assignee: nobody → Barry Warsaw (barry)
milestone: none → 3.0.0b3
summary: - ./mailman.cfg only used partially
+ Relative paths in 'mailman start -C' are broken
Revision history for this message
Barry Warsaw (barry) wrote :

Oops, cli_control does a chdir to the $VAR_DIR which is probably how it's really broken. So the rel->abs pathing must happen before the chdir(). It still better to pass the absolute path down to the runners.

Changed in mailman:
status: Confirmed → In Progress
Barry Warsaw (barry)
Changed in mailman:
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.