proposed addition to Roundup README.Debian (was Re: [Pkg-exim4-users] Re: pipe aliases and permissions)

Faheem Mitha faheem at email.unc.edu
Tue Dec 13 01:37:09 UTC 2005



On Sun, 11 Dec 2005, Marc Haber wrote:

> On Sat, Dec 10, 2005 at 08:09:49PM -0500, Faheem Mitha wrote:
>> Note I've made a few minor modifications. In particular, I've removed
>> current_directory and home_directory since they don't do anything and Exim
>> does not like them unset.
>
> I'd set them to some roundup-related directory just in case that the
> script or a program called from there dumps core.

It's a Python script, so I would not have thought core dumps would be an 
issue. But Ok.

Setting home_directory and current_directory to ROUNDUP_HOME.

>> *******************************************************************
>> As a mail alias pipe process
>>
>> Set up a mail alias called "issue_tracker" as (include the quote marks):
>> "|/usr/bin/python /usr/local/bin/roundup-mailgw <tracker_home>"
>> *******************************************************************
>>
>> However, this does not work out the box on Debian, using Debian Exim4.
>
> This suggests that Debian's exim packages are flawed. Your upstream
> author is not going to like this.

I'm not sure which upstream author you are referring to.

> I'd suggest something like "However, the Debian Exim4 packages don't
> allow pipes in alias files by default, and the maintainers have a
> point in suggesting a different way to accomplish delivery to
> roundup-mailgw".

Ok. Changed to something similar.

>> This configuration is largely due to Marc Haber, the Debian Exim
>> maintainer, and has been lightly edited by me.
>
> Actually Debian Exim4 is maintained by a Team, and I am only a member.

Ok, changed to say "one of the Debian Exim maintainers".

>> NB. The roundup_router needs to come before system_aliases, otherwise Exim
>> will complain that ' pipe_transport unset in system_aliases router', and
>> defer the message.
>
> That will only happen if the alias is still in place, which is not
> necessary any more. If you remove the alias, the system_aliases router
> will decline and anything will be fine.

Sorry. I've no idea what you mean. I got the behaviour described when I 
dropped the files described here into a vanilla Debian Exim4 config. There 
were no modifications to the system_aliases router still present at that 
point.

Can you be more explicit? What alias are you referring to?

>> ************************************************************************
>> /etc/exim4/conf.d/main/000_localmacros
>> ************************************************************************
>> # Home dir for your Roundup installation
>> ROUNDUP_HOME=/var/lib/roundup/trackers
>>
>> # User and group for Roundup.
>> ROUNDUP_USER=roundup
>> ROUNDUP_GROUP=roundup
>
> I'd call that 010_roundup_macros

Done.

>> ************************************************************************
>> /etc/exim4/conf.d/router/050_exim4-config_roundup
>> ************************************************************************
>
> I'd call that 050_roundup (exim4-config is the custom for a file
> belonging to the exim4-config package, which your file isn't)

Done.

>> roundup_router:
>>   driver = accept
>>   # The config file config.ini seems like a more natural choice, but the
>>   # file config.py was replaced by config.ini in 0.8, and schema.py needs
>>   # to be present too.
>>   require_files = /usr/bin/roundup-mailgw:ROUNDUP_HOME/$local_part/schema.py
>>   transport = roundup_transport
>> ************************************************************************
>> /etc/exim4/conf.d/transport/050_exim4-config_roundup
>> ************************************************************************
>
> Same thing here.

Done.

>> roundup_transport:
>>   driver = pipe
>>   command = /usr/bin/python /usr/bin/roundup-mailgw
>>   ROUNDUP_HOME/$local_part/
>>   user = ROUNDUP_USER
>>   group = ROUNDUP_GROUP
>> ************************************************************************
>>
>> If you have followup questions, I suggest you talk to (in addition to
>> myself), the people on pkg-exim4-users at lists.alioth.debian.org, who
>> certainly know much more about all this stuff than I do.
>>
>> Thanks.                                                          Faheem.
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> The list is only open to subscribers, so a link to the subscribe web
> page would be a good idea.

Done.

Modified message follows.

###############################################################################
Hi,

In the Roundup installation documentation
(http://roundup.sourceforge.net/doc-0.8/installation.html#configure-an-email-interface),
it says

*******************************************************************
As a mail alias pipe process

Set up a mail alias called "issue_tracker" as (include the quote marks): 
"|/usr/bin/python /usr/local/bin/roundup-mailgw <tracker_home>"
*******************************************************************

However, the Debian Exim4 packages don't allow pipes in alias files by
default, and I propose using a custom router & transport to accomplish
delivery to roundup-mailgw as per the recommendations of the Debian
Exim maintainers.

Please consider appending this information to README.Debian, along
with the other Debian-specific configuration information.

@@@@@@@@@@@@@@@@ BEGIN PROPOSED ADDITION TO README.DEBIAN @@@@@@@@@@@@

The following configuration files for Exim 4 implement a custom router
& transport to accomplish delivery to roundup-mailgw as per the
recommendations of the Debian Exim maintainers.

This configuration replaces the instructions in the Roundup
installation documentation
(http://roundup.sourceforge.net/doc-0.8/installation.html#configure-an-email-interface),
for configuring the mail gateway, which says

*******************************************************************
As a mail alias pipe process

Set up a mail alias called "issue_tracker" as (include the quote marks): 
"|/usr/bin/python /usr/local/bin/roundup-mailgw <tracker_home>"
*******************************************************************

The following configuration has been tested on Debian Sarge with Exim4.

The following three config files, when dropped into
/etc/exim4/conf.d/, should do what it necessary. Note that as per
directions in the Debian Exim README.Debian, the monolithic file
(unsplit configuration) /etc/exim4/exim4.conf.template can be rebuilt
from the conf.d files by running 'update-exim4.conf.template -r'.

This configuration is largely due to Marc Haber, one of the Debian
Exim maintainers, but has been modified by me.

This config makes a few assumptions:

1) That the mail address corresponding to the tracker instance has the
same name as the directory of the tracker instance, ie. the mail
address corresponding to a Roundup instance called
/var/lib/roundup/trackers/mytracker is mytracker at ...

2) That (at least) all the db subdirectories of all the tracker
instances (ie. /var/lib/roundup/trackers/*/db) are owned by the same
user, in this case, 'roundup'.

3) That if the schema.py file exists, then the tracker is 'ready to
go'. I'm not sure if it would be better to use the config.ini file.

However, it has the advantage that modulo these assumptions no further 
configuration will need to be made when new tracker instances are added.

NB. The roundup_router needs to come before system_aliases, otherwise Exim 
will complain that 'pipe_transport unset in system_aliases router', and 
defer the message. Using 050 ensures that it is included before 
system_aliases, which is 
/etc/exim4/conf.d/router/400_exim4-config_system_aliases.

************************************************************************
/etc/exim4/conf.d/main/010_roundup_macros
************************************************************************
# Home dir for your Roundup installation
ROUNDUP_HOME=/var/lib/roundup/trackers

# User and group for Roundup.
ROUNDUP_USER=roundup
ROUNDUP_GROUP=roundup
************************************************************************
/etc/exim4/conf.d/router/050_roundup
************************************************************************
roundup_router:
    driver = accept
    # The config file config.ini seems like a more natural choice, but the
    # file config.py was replaced by config.ini in 0.8, and schema.py needs
    # to be present too.
    require_files = /usr/bin/roundup-mailgw:ROUNDUP_HOME/$local_part/schema.py
    transport = roundup_transport
************************************************************************
/etc/exim4/conf.d/transport/050_roundup
************************************************************************
roundup_transport:
    driver = pipe
    command = /usr/bin/python /usr/bin/roundup-mailgw ROUNDUP_HOME/$local_part/
    current_directory = ROUNDUP_HOME
    home_directory = ROUNDUP_HOME
    user = ROUNDUP_USER
    group = ROUNDUP_GROUP
************************************************************************

@@@@@@@@@@@@@@@@ END PROPOSED ADDITION TO README.DEBIAN @@@@@@@@@@@@@@@@@@@@

If you have followup questions, I suggest you talk to (in addition to
myself), the people on
http://lists.alioth.debian.org/mailman/listinfo/pkg-exim4-users, who
certainly know much more about all this stuff than I do.

Thanks.                                                          Faheem.



More information about the Pkg-exim4-users mailing list