@@ -522,6 +522,98 @@ To test the mail gateway on unix systems, try::
522522
523523 echo test |mail -s '[issue] test' support@YOUR_DOMAIN_HERE
524524
525+ As a custom router transport using a pipe process (Exim4 specific)
526+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
527+
528+ The following configuration snippets for Exim4 configuration
529+ implement a custom router & transport to accomplish mail delivery to
530+ roundup-mailgw. A configuration for Exim3 is similar but not
531+ included, since Exim3 is considered obsolete.
532+
533+ This configuration is similar to the previous section, in that it uses
534+ a pipe process. However, there are advantages to using a custom
535+ router/transport process, if you are using Exim.
536+
537+ * This avoids privilege escalation, since otherwise the pipe process
538+ will run as the mail user, typically mail. The transport can be
539+ configured to run as the user appropriate for the task at hand. In the
540+ transport described in this section, Exim4 runs as the unprivileged
541+ user ``roundup``.
542+
543+ * Separate configuration is not required for each tracker
544+ instance. When a email arrives at the server, Exim passes it through
545+ the defined routers. The roundup_router looks for a match with one of
546+ the roundup directories, and if there is one it is passed to the
547+ roundup_transport, which uses the pipe process described in the
548+ previous section (`As a mail alias pipe process`_).
549+
550+ The matching is done in the line::
551+
552+ require_files = /usr/bin/roundup-mailgw:ROUNDUP_HOME/$local_part/schema.py
553+
554+ The following configuration has been tested on Debian Sarge with
555+ Exim4.
556+
557+ .. note::
558+ Note that the Debian Exim4 packages don't allow pipes in alias files
559+ by default, so the method described in the section `As a mail alias
560+ pipe process`_ will not work with the default configuration. However,
561+ the method described in this section does. See the discussion in
562+ ``/usr/share/doc/exim4-config/README.system_aliases`` on any Debian
563+ system with Exim4 installed.
564+
565+ For more Debian-specific information, see suggested addition to
566+ README.Debian in
567+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343283, which will
568+ hopefully be merged into the Debian package eventually.
569+
570+ This config makes a few assumptions:
571+
572+ * That the mail address corresponding to the tracker instance has the
573+ same name as the directory of the tracker instance, i.e. the mail
574+ interface address corresponding to a Roundup instance called
575+ ``/var/lib/roundup/trackers/mytracker`` is ``
[email protected] ``.
576+
577+ * That (at least) all the db subdirectories of all the tracker
578+ instances (ie. ``/var/lib/roundup/trackers/*/db``) are owned by the same
579+ user, in this case, 'roundup'.
580+
581+ * That if the ``schema.py`` file exists, then the tracker is ready for
582+ use. Another option is to use the ``config.ini`` file, but this recently
583+ changed (in 0.8) from ``config.py``.
584+
585+ Macros for Roundup router/transport. Should be placed in the macros
586+ section of the Exim4 config::
587+
588+ # Home dir for your Roundup installation
589+ ROUNDUP_HOME=/var/lib/roundup/trackers
590+
591+ # User and group for Roundup.
592+ ROUNDUP_USER=roundup
593+ ROUNDUP_GROUP=roundup
594+
595+ Custom router for Roundup. This will (probably) work if placed at the
596+ beginning of the router section of the Exim4 config::
597+
598+ roundup_router:
599+ driver = accept
600+ # The config file config.ini seems like a more natural choice, but the
601+ # file config.py was replaced by config.ini in 0.8, and schema.py needs
602+ # to be present too.
603+ require_files = /usr/bin/roundup-mailgw:ROUNDUP_HOME/$local_part/schema.py
604+ transport = roundup_transport
605+
606+ Custom transport for Roundup. This will (probably) work if placed at
607+ the beginning of the router section of the Exim4 config::
608+
609+ roundup_transport:
610+ driver = pipe
611+ command = /usr/bin/python /usr/bin/roundup-mailgw ROUNDUP_HOME/$local_part/
612+ current_directory = ROUNDUP_HOME
613+ home_directory = ROUNDUP_HOME
614+ user = ROUNDUP_USER
615+ group = ROUNDUP_GROUP
616+
525617As a regular job using a mailbox source
526618~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
527619
0 commit comments