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:


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 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:

if [ -f "$parentdir/$EXTENSION/conf/trac.ini" ]; then
  exec /usr/local/bin/run_email2trac --project="$EXTENSION"
exit 67 # Unknown user

I'm attaching my patch to this ticket.

Attachments (1)

parentdir.diff (2.0 KB) - added by sto@… 14 years ago.
parentdir patch

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by sto@…

parentdir patch

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

comment:2 Changed 13 years ago by bas

(In [485]) added parentdir functionality, see #217

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

Add Comment

Modify Ticket

Change Properties
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.