From Request Tracker Wiki
Jump to navigation Jump to search

We would like to be able to redirect a message directly from our inbox to an RT ticket, in the form ticketnumber@rthost and have it recorded on the specified ticket as a comment.


  1. MTA is postfix.  Configuration is in /etc/postfix , rt-mailgate is in /usr/bin .
  2. RT is running on a virtual host, e.g.
  3. RT's virtual host hostname is pointed to the postfix server with proper A/MX records.


1.  create or edit the file: /etc/postfix/canonical.pcre with contents:

    /^(\d+)         ticket+${1}

2.  ensure the file /etc/postfix/ contains:

recipient_delimiter = +
canonical_maps = pcre:/etc/postfix/canonical.pcre

3.  add to your /etc/aliases file:

ticket:                       "|/usr/sbin/rt-mailgate --extension ticket --action comment --url"

4.  Now just take care of the required postfix maintenance commands:

# postmap /etc/postfix/canonical.pcre
# newaliases
# postfix reload

From here, you can simply redirect correspondence that should have gone on a ticket by redirecting the message to e.g. 1234@helpdesk .