Press "Enter" to skip to content

Request Tracker (RT) and Google Apps

Last updated on February 19, 2011

If you are trying to setup Best Practical’s Request Tracker (RT) system (originally written by Jesse Vincent, but I more associate Dave Rolsky with it), to work with a Google Apps hosted domain (so you have Google Mail/Gmail for your domain), you may find the following useful.

  1. First of all, install “rt” on your Linux box and install “fetchmail” using your package manager if it isn’t already installed
  2. Setup an email account something like “support@” or “rt@” (I’ll use “rt@” in these examples) in Google Apps. Make a note of the password you set
  3. In /opt/rt3/etc/RT_SiteConfig.pm (if you used the default install location), you’ll need to set the following:
    Set( $RTAddressRegexp,'^rt(\+[a-z]+)?\@example\.com$');
  4. Do the basic configuration of “rt” and make your queues – I made the following queues:
    Queue name Reply address Comment address
    Backend rt+backend@example.com rt+backendcomments@example.com
    Frontend rt+frontend@example.com rt+frontendcomments@example.com
    Billing rt+billing@example.com rt+billingcomments@example.com
    General rt@example.com rt+comments@example.com
  5. Log into your new Google Apps Gmail account with the details you created and agree to the terms of service etc
  6. Click on “Settings” and “Filters” and create a series of filters such as:
    • To: rt+backend@example.com [Next step]
    • Skip the Inbox (Archive it)
    • Apply the label: backend
    • Never send it to Spam [Create filter]
    • To: rt+backendcomments@example.com [Next step]
    • Skip the Inbox (Archive it)
    • Apply the label: backend-comments
    • Never send it to Spam [Create filter]
  7. For the “general” queue’s “Reply” address (rt@example.com), do not setup a filter
  8. Once done, on your Linux server where you have installed the Request Tracker, edit /etc/fetchmailrc to read similar to:

    set daemon 60
    set invisible
    set no bouncemail
    set no syslog
    set logfile /var/log/fetchmail
    poll imap.gmail.com
    proto IMAP service 993 user rt@example.com pass PA55W0RD
    folder Inbox ssl
    mda "/opt/rt3/bin/rt-mailgate --url http://rt.example.com/ --queue General --action correspond"
    poll imap.gmail.com
    proto IMAP service 993 user rt@example.com pass PA55W0RD
    folder general-comments ssl
    mda "/opt/rt3/bin/rt-mailgate --url http://rt.example.com/ --queue General --action comments"

    poll imap.gmail.com
    proto IMAP service 993 user rt@example.com pass PA55W0RD
    folder backend ssl
    mda "/opt/rt3/bin/rt-mailgate --url http://rt.example.com/ --queue Backend --action correspond"
    poll imap.gmail.com
    proto IMAP service 993 user rt@example.com pass PA55W0RD
    folder backend-comments ssl
    mda "/opt/rt3/bin/rt-mailgate --url http://rt.example.com/ --queue Backend --action comments"

    Of course changing rt@example.com to the email account you created, PA55W0RD to the password set for that email account, http://rt.example.com to the location of your Request Tracker installation (it has to be accessible from the server you are creating this file on), the “folder” name to correspond with the label you set for that queue and comments, etc and repeating for as many queues as you have.

  9. Save the file and start fetchmail using /sbin/service fetchmail start or your Linux distribution’s service starter
  10. Watch the log file using tail -f /var/log/fetchmail

    And that should be RT up and running with Google Apps for you!

2 Comments

  1. Anton Anton

    i have error like this

    fetchmail: sleeping at Mon Feb 14 11:04:22 2011 for 60 seconds
    fetchmail: awakened at Mon Feb 14 11:05:22 2011
    fetchmail: mailbox selection failed
    fetchmail: client/server synchronization error while fetching from rt@xxx.xx@imap.gmail.com
    fetchmail: Query status=7 (ERROR)

    Can you say what is wrong?

    • Have you enabled IMAP fetching in your Gmail account?

      Try setting it up as a normal IMAP email account in Thunderbird/Outlook account initially to make sure it is configured correctly at Google’s end.

Comments are closed.