How to install RequestTracker with email facility on Ubuntu 10.04 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 record the thread of a conversation between the RT user & the ticket requester.
Before you start, please create a pop3 email account on your mail server. In this example example IT-Support@yourdomain
Install Ubuntu 10.04 & RT related packages
Boot from the Ubuntu Server 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" 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 -i
Run the following command to install packages:
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
Request Tracker in Ubuntu uses /etc/request-tracker3.8/RT_SiteConfig.d for local changes. /etc/request-tracker3.8/RT_SiteConfig.pm gets automatically generated from the files in that directory.
Create your own file /etc/request-tracker3.8/RT_SiteConfig.d/90-local and put the following there:
Set($MaxAttachmentSize , 10000000); Set($FriendlyFromLineFormat, "\"%s\" <%s>");
Save the file and run
sudo update-rt-siteconfig
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 & 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:
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 (beginning poll) 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 with 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.'