Weblog entry #7 for lee
I'll soon be migrating an old installation of RT to a new server and one of the things I've been looking at is the email interface.
Previously, setting up RT under exim consisted of hand crufting giant, ugly, alias files. But searching, I've found something more elegant.
The information in Bug#229052 provides some useful configuration information. I've customised it (the local site uses prefixes rather than suffixes, and I decided that, rather than do SQL queries in the router, I'd just list the queue names, which fortunately match the address local parts, in a text file.) /etc/exim4/conf.d/main/10_local_request-tracker3
RT3_URL = http://rt.example.com/ RT3_QUEUENAMES = LOCAL_CONFDIR/rt3-queues domainlist rt3_domains = example.com/etc/exim4/conf.d/router/155_local_request-tracker3
request_tracker3:
debug_print = "R: request_tracker3 for \
$local_part_prefix$local_part@$domain \
(calling ${substr_-1:${if eq{$local_part_prefix}{}\
{correspondX}\
{$local_part_prefix}}})"
driver = redirect
domains = +rt3_domains
local_parts = lsearch;RT3_QUEUENAMES
local_part_prefix = comment-
local_part_prefix_optional
pipe_transport = request_tracker3_pipe
data = "|/usr/bin/rt-mailgate \
--queue \"${local_part}\" \
--action ${substr_-1:${if eq{$local_part_prefix}{}\
{correspondX}\
{$local_part_prefix}}} \
--url RT3_URL"
user = www-data
/etc/exim4/conf.d/transport/50_local_request-tracker3
request_tracker3_pipe:
debug_print = "T: request_tracker3_pipe for $local_part@$domain"
driver = pipe
return_fail_output
allow_commands = /usr/bin/rt-mailgate
Update: And it's probably a good idea to rewrite the mail envelope on outgoing tickets - so add something like this into /etc/exim4/conf.d/rewrite/40_local_request-tracker3
www-data@web.server "${if match {$h_Managed-by:}{RT} {rt-admin@example.com}fail}" Fs