Opened 14 years ago
Closed 13 years ago
#217 closed enhancement (fixed)
Additional config option (`parentdir`) to avoid the need of sections for each project
Reported by: | sto@… | Owned by: | bas |
---|---|---|---|
Priority: | minor | Milestone: | release 2.0.0 |
Component: | email2trac | Version: | trunk |
Keywords: | Cc: |
Description
I've patched email2trac to support an additional configuration option (parentdir) to avoid the need to edit the email2trac.conf for each project when using the ENV_PARENT_DIR option with tracd.
When parentdir is defined on the DEFAULT section the variable is used to build the project PATH when there is no section for the named project.
I'm using it to have email2trac configured for each new project without changing the mail system.
To avoid touching the postfix alias database I'm using addresses of the form trac+PROJECT@mail.domain (I have recipient_delimiter = + on the postfix main.cf file) and the alias file has an entry like the following:
trac: /usr/local/sbin/email2trac-alias
Where /usr/local/sbin/email2trac-alias is a script that does more or less the following:
#!/bin/sh parentdir="/srv/trac" if [ -f "$parentdir/$EXTENSION/conf/trac.ini" ]; then exec /usr/local/bin/run_email2trac --project="$EXTENSION" fi exit 67 # Unknown user
I'm attaching my patch to this ticket.
Attachments (1)
Change History (5)
Changed 14 years ago by sto@…
comment:1 Changed 14 years ago by bas
- Status changed from new to assigned
- Version changed from 1.6.0 to trunk
Thanks for the patch. It is a good solution for multi projects setup and have only one config. Maybe we change it to allow a project to have different settings:
- When parent_dir is set
- check if we have an section with this name
- if yes use the settings
- if no use the defaults
- check if we have an section with this name
comment:2 Changed 13 years ago by bas
comment:3 Changed 13 years ago by bas
If you have time can you test this new feature
comment:4 Changed 13 years ago by bas
- Milestone set to release 1.7.0
- Resolution set to fixed
- Status changed from assigned to closed
parentdir patch