Do you use let's encrypt?





7100 votes ~ 23 comments

 

XML logo

Handling Request Tracker mail with Exim4
Posted by lee on Fri 13 Jan 2006 at 12:30
Tags: ,

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

 

Comments on this Entry

Re: Handling Request Tracker mail with Exim4
Posted by Anonymous (203.123.xx.xx) on Wed 13 May 2009 at 10:30
What is the syntax of the text file that stores the domains

[ Parent | Reply to this comment ]

Re: Handling Request Tracker mail with Exim4
Posted by Anonymous (213.60.xx.xx) on Wed 22 Jul 2009 at 10:06
Thank you for the guide, but I am still missing something cause I cannot send mails to RT:

# echo 'hello' | mail -vs "Test subject" rt

== |/opt/rt3/bin/rt-mailgate --queue Centralitas --action correspond --url http://localhost/rt <rt@monitor> R=system_aliases defer (-30): pipe_transport unset in system_aliases router


Any idea ?

Thanks.

[ Parent | Reply to this comment ]

Re: Handling Request Tracker mail with Exim4
Posted by lee (146.101.xx.xx) on Wed 22 Jul 2009 at 11:20
[ View Weblogs ]
This appears to be hitting a system_aliases router rather than a dedicated RT router. In the default system_aliases in Debian you need to have a custom config definition for SYSTEM_ALIASES_PIPE_TRANSPORT in order to use pipes.

[ Parent | Reply to this comment ]

Re: Handling Request Tracker mail with Exim4
Posted by Anonymous (85.140.xx.xx) on Tue 16 Mar 2010 at 18:01
yes, it's need to add:

.ifndef SYSTEM_ALIASES_PIPE_TRANSPORT
SYSTEM_ALIASES_PIPE_TRANSPORT = address_pipe
.endif

on the beginning of the some exime config file.

[ Parent | Reply to this comment ]