[rt-users] exim router and transport
Kirill Miazine
lists at krot.org
Tue Sep 17 06:07:11 EDT 2002
Hi list,
I'm posting my RT router and transport that handles RT tickets. Adding
two new aliases each time a new queue is created is not neccessary with
this configuration. I use a file to help Exim decide whether the queue
exists:
hostmaster: noc
noc: noc
support: general
info: general
helo: general
contact: general
The file does really contain a "local part -> queue" mapping. Mails to
hostmaster at example.com go to the "noc" queue and so do noc at example.com
mails. I the configuration can very easily be changed to check the RT
database to see if the queue exists.
Here're the relevant parts of the config:
<config>
# Main section
# RT
RT_QUEUES = /etc/exim/rt_queues
domainlist rt_domains = krot.org
# Router
rt_router:
driver = accept
domains = +rt_domains
local_parts = lsearch;RT_QUEUES
local_part_suffix = -comment
local_part_suffix_optional
transport = rt_transport
# Transport
rt_transport:
driver = pipe
command = /local/bin/rt-mailgate \
--queue "${lookup {$local_part} lsearch {RT_QUEUES}}" \
--action "${if eq {$local_part_suffix}{-comment} {comment} {correspond}}"
return_path_add
envelope_to_add
delivery_date_add
# transport_filter = /usr/bin/spamc
temp_errors = 1 : 73: 75 : 111
log_output
# log_fail_output
return_fail_output
message_prefix =
message_suffix =
user = nobody
group = rt
</config>
My rt_transport also lets SpamAssassin to check/tag the message. If the
message gets too high spam score, my modified rt-mailgate just ignores
the message. Just uncomment transport_filter to enable spam checking.
This config is for Exim 4.
--
Kirill
More information about the rt-users
mailing list