WithEmailFacility

From Request Tracker Wiki
Jump to navigation Jump to search


Unofficial Installation Guide

This is an unofficial installation guide. It may be outdated or apply only to very specific configurations and versions. The official and maintained installation steps for RT are in the README and UPGRADING documents included in the official .tar.gz packages.




This page 'WithEmailFacility' is tagged as OUTDATED
This page contains out of date and possibly misleading information or instructions such as installation methods or configuration examples that no longer apply. Please consider this warning when reading the page below.
If you have checked or updated this page and found the content to be suitable, please remove this notice by editing the page and remove the Outdated template tag.



The following demonstrates how to install RequestTracker 3.8.7 with email facility on Ubuntu server 10.04.

RequestTracker really shines when it works with email as it can notify the end user at key stages of a ticket progress. It will even log the thread of a conversation between RT & the end user.

Before you start, please create a pop3 email account on your mail server. I suggest IT-Support@yourdomain.

Install Ubuntu 10.04 & RT related packages

Boot from the Ubuntu 10.04 CD & follow the installation steps. When presented with the Software Selection screen, select the following:

Lamp Server

Mail Server

OpenSSH Server

Set the MYSQL root password when prompted (twice).

Set postfix to "Internet site With Smarthost" when prompted.

Set Email to your smtp server when prompted.

Reboot when install finished & login as the username you created.

I suggest logging in remotely via ssh or Putty from now on to make it easy for you to copy & paste in the following commands.

Run the following command to gain root access:

sudo su -

Run the following command to install packa ges:

apt-get update; apt-get install rt3.8-apache2 rt3.8-clients rt3.8-db-mysql request-tracker3.8 fetchmail

Change "rt.tickets" to "tickets" when prompted.

Respond "Yes" to RT_SiteConfig.pm permissions when prompted.

Respond "Yes" to Configure RT with dbconfig-common when prompted.

Enter the MYSQL root password you used earlier in order to set up the new RT database when prompted.

Set the RT database access password (this password is for RT to connect to MYSQL & is stored in RT_SiteConfig.pm).

Request Tracker config file settings

Run the following command to back-up the RT config file:

cp /etc/request-tracker3.8/RT_SiteConfig.pm /etc/request-tracker3.8/RT_SiteConfig.pm.old

Run the following command to edit the RT config:

nano /etc/request-tracker3.8/RT_SiteConfig.pm

Comment out the following two lines with a # as shown below:

Set($CorrespondAddress , 'rt@tickets');

Set($CommentAddress , 'rt-comment@tickets');

Paste in the following two lines:

Set($MaxAttachmentSize , 10000000);

Set($FriendlyFromLineFormat, "\"%s\" <%s>");

Save the file.

Outbound Email config

Run the command:

nano /etc/postfix/main.cf

Find the line containing "relayhost" & add your smtp mail server

Save the file.

Run the command:

service postfix restart

Test Outbound mail (Postfix) by emailing a file – (This example sends /etc/fstab).

mailx -s "Postfix Test" YourOwnMailbox@domain < /etc/fstab

Use your own email address in the above command

Check your e-mail client to see if this is working.

Apache2 config

Run the command:

nano /etc/apache2/apache2.conf

Append the following at the bottom of the file on a new line:

ServerName tickets

Save the file & run the command:

nano /etc/apache2/sites-available/default

Find the last line "</VirtualHost>" and paste in the following two lines just above it:

Include /etc/request-tracker3.8/apache2-modperl2.conf

RedirectMatch ^/$ /rt

Save the file.

Apache fails to start once configured tor request-tracker, the error in the Apache logs is:

Can't locate Apache/DBI.pm


Cause: This error occurs because of the missing Apache::DBI Perl module.Workaround: Installing libapache-dbi-perl solves the problem.

Type: sudo apt-get install libapache-dbi-perl


now continue...


Now run the command:

a2enmod rewrite; service apache2 restart

Configure RT from your web browser login

Log in to RT - Open your web browser, enter your RT IP address use default root login:

root:password

Navigate to: Configuration > Global > Group Rights

Find "Everyone" in "System Groups" and grant the following rights:

CommentOnTicket CreateTicket ReplyToTicket

Navigate to: Configuration > Queues > General

Set the "Reply Address" & "Comment Address" to IT-Support@yourdomain

Change “Description” to “IT-Support”

Use a valid email address for your domain.

Inbound e-mail config

Run the command:

nano /etc/default/fetchmail

Modify the last line to read:

START_DAEMON=yes

Run the command to open the editor & create a new blank file:

nano /etc/fetchmailrc

Paste in the following six lines:

set daemon 60
set invisible
set no bouncemail
set no syslog
set logfile /var/log/fetchmail.log
poll YOURMAILSERVER protocol pop3 username "IT-Support" password "secret" mda "/usr/bin/rt-mailgate --queue general --action correspond --url http://localhost/rt/" no keep

Note: the last line is long & may have wrapped in your display.

Run the command:

touch /var/log/fetchmail.log; chown fetchmail /var/log/fetchmail.log

Reboot.

To watch inbound email status, run the following command:

tail –f /var/log/fetchmail.log

Send an email to the account: IT-Support@yourdomain

Fetchmail should pick up this email within 60 seconds & forward it into RT. RT will then reply to you. You should see the ticket in the web console.

Note: Once you are happy that inbound email is working, comment out the set logfile line in /etc/fetchmailrc with a # & reboot.

Optional: install phpmyadmin to export/import the RTDB database to maintain backups.

Cheers,

ChrisM.