Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#354 closed setup (fixed)

qmail configuration example

Reported by: ttt@… Owned by: bas
Priority: major Milestone:
Component: email2trac Version: 2.8.4
Keywords: Cc:

Description

Hello!


I would like to contribute with a full working example of qmail setup
for a multi Trac environment, making use of the parentdir configuration
option of email2trac.

You can add it all or in parts to the instructions page if you like.

Note that I could get the --virtualenv option to work for me and I had
to explicitly run the script with the Python from the desired
VirtualEnv. Maybe there is some bug in the VirtualEnv setting in
email2trac or wrong usage by me, I did not have enough time to find the
root cause and I could work around the problem.

Thank you for your effort developing and supporting this valuable
integration point between email system and Trac.


Best regards.
Tiago



= qmail Configuration

This configuration was based on the following references:
 * man qmail-users
 * http://www.lifewithqmail.org/lwq.html#virtual-domains
 * http://www.lifewithqmail.org/lwq.html#dot-qmail-files
 * https://oss.trac.surfsara.nl/email2trac/wiki/Email2tracMta#QmailSetup

Configuration changes:

 * To accept emails for the new domain:
{{{
root@server:/etc/qmail# echo trac.server.net >> rcpthosts
}}}

 * To declare the new domain as a virtual domain, to ensure namespace
separation of local usernames:
{{{
root@server:/etc/qmail# echo trac.server.net:trac-server-net >>
virtualdomains
}}}

 * Add a rule to match all possible users of the new virtual domain to a
directory where per-user .qmail files determine further processing of
messages, running as www-data user:
{{{
root@server:/etc/qmail# sed -i
's|^\.$|+trac-server-net-:www-data:33:33:/servers/trac/email2trac:-::\n.|'
users/assign
}}}

 * Make changes take effect:
{{{
root@server:/etc/qmail# qmail-newu
root@server:/etc/qmail# /etc/init.d/qmail restart
}}}

 * Put per-user .qmail files in place, making messages go to the
email2trac script:
{{{
root@server:/servers/trac/email2trac# echo '|/usr/bin/preline
/servers/trac/virtualenv/bin/python
/servers/trac/email2trac/bin/email2trac --project=one' > .qmail-one
root@server:/servers/trac/email2trac# echo '|/usr/bin/preline
/servers/trac/virtualenv/bin/python
/servers/trac/email2trac/bin/email2trac --project=two' > .qmail-two
root@server:/servers/trac/email2trac# echo '|/usr/bin/preline
/servers/trac/virtualenv/bin/python
/servers/trac/email2trac/bin/email2trac --project=three' > .qmail-three
}}}

Attachments (0)

Change History (4)

comment:1 Changed 5 years ago by ttt@…

  • Priority changed from major to trivial
  • Type changed from defect to setup

comment:2 Changed 5 years ago by bas

  • Priority changed from trivial to major
  • Status changed from new to assigned

Dear Tiago,

Thanks for the example and you can add it to the wiki. Is is editable for anybody:

We use the virtualenv at our site and it works. Just fill in a bug report with some debug/verbose info.

regards

comment:3 Changed 5 years ago by ttt@…

  • Resolution set to fixed
  • Status changed from assigned to closed

Wiki updated, added new section: wiki:Email2tracMta#UsingSeparateVirtualDomain

comment:4 Changed 5 years ago by bas

thanks ;-)

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.