Email support in RT

Hi Forum,
I have RT installed a VPS and my email server is on another VPS. I want to integrate email with RT but the process of doing that is very vague and I can’t seem to get it working. Does anyone have any pointers?

We’d probably need a few more details such as:

  • what have you set up so far (ie have you followed step 10 in the README file?),
  • do you see any errors in the mail server logs,
  • what do you see in RT’s logs (either in the webserver or with debugging turned on)?
  • what sort of mail server are you using

We typically have aliases on the mail server that redirect various email addresses to the RT server.

You can use fetchmail to pull in email and send it to RT’s mailgate. Following is my .fetchmailrc (passwords redacted, of course) that pulls email from an Exchange server:

set logfile /opt/rt4/var/fetchmail.log
set pidfile /opt/rt4/var/
poll via a.b.c.d with proto IMAP
        auth password
        user "DOMAIN\\user" password "NiceTryH4x0rs" mda "/opt/rt4/bin/rt-mailgate --queue Support --action correspond --url"
        options folder Inbox ssl

Use crontab to make sure it stays running. It won’t run again if it’s already going, so the following will do the job without excessive CPU overhead:

* * * * * fetchmail -d 60

Oh, and for sending email, I use the following wrapper for msmtp:


cat > /tmp/last_msmtp_input.$$
/usr/local/bin/msmtp -t -C /opt/rt4/etc/msmtp_wrapper.conf < /tmp/last_msmtp_input.$$
/usr/bin/logger -t RTmailer -p -- CALL /usr/local/bin/msmtp -nt "$@" from $PWD RETURNED $?

… with the following config file:

#logfile /opt/rt4/var/log/msmtp.log
syslog on
account default
port 587
tls on
tls_certcheck off
auth on
user JHE/
password ***REDACTED***
#auto_from on

Hope this helps