Nigel Metheringham edited this page Nov 25, 2012 · 1 revision
Clone this wiki locally

Configuration of Exim for Request Tracker

The following will allow exim to query the request tracker database for information whether a queue exists in request tracker. It is thus not necessary to have dedicated aliases for a queue in the exim configuration. Exim will pick up the configuration automatically.

This has been developed in the Debian project by Marc Haber with help from Odhiambo Washington, but is not yet part of the Debian packages.

main configuration

                  SELECT Name FROM Queues WHERE \
                  CorrespondAddress = '${quote_mysql:$local_part}@${quote_mysql:$domain}' \
                  AND Disabled = '0'

hide mysql_servers = $DBHOST/$DBNAME/$DBUSER/$DBPASSWORD

domainlist rt3_domains = $DOMAINLIST


  debug_print = "T: request_tracker3_pipe for $local_part@$domain"
  driver = pipe
  allow_commands = /usr/bin/rt-mailgate


  debug_print = "R: request_tracker3 for \
                    $local_part$local_part_suffix@$domain \
                    (calling ${substr_1:${if eq{$local_part_suffix}{}\
                                       {$local_part_suffix} }})"
  driver = redirect
  domains = +rt3_domains
  local_parts = mysql; QUEUENAME_QUERY
  local_part_suffix = -comment
  pipe_transport = request_tracker3_pipe
  data = "|/usr/bin/rt-mailgate \
           --queue \"${lookup mysql{QUEUENAME_QUERY}}\" \
           --action ${substr_1:${if eq{$local_part_suffix}{}\
                                        {$local_part_suffix} }} \
           --url RT3_URL"
  user = www-data


I don't particularly like the idea of running the mailgate process as www-data, but since the bulk of rt runs as www-data anyway, there is probably not a way to get around this.

If there are more suffixes supported/needed than -comment, these could be added to the local_part_suffix list, colon separated.

This configuration has been tested by Odhiambo Washington on a non-Debian system. I am currently not in a position do to any tests on my own.