Installation of RT 4.2 with incoming and outgoing email support on Ubuntu 12.04

From Request Tracker Wiki
Jump to navigation Jump to search

Installing request tracker 4 with email support on Ubuntu 12.04 Server

  • ·      Install mysql

sudo apt-get install mysql-server

type mysql root user password when prompted

  • ·         Install Request Tracker

sudo apt-get install rt4-apache2  rt4-clients  rt4-db-mysql request-tracker4  libapache2-mod-fastcgi  libfcgi-perl

 

When prompted give a name to the RT instance – put your organization name

Once the installation is complete you need to make a few changes you need to make in order to access RT via the apache

 

cd /etc/apache2/conf.d

sudo ln -s /etc/request-tracker4/apache2-fastcgi.conf .

sudo a2enmod fastcgi

sudo service apache2 reload

To login to the RT server go to http://yourRTserverIP/rt

Configure outbound email via smarthost (your mail server)

·         Install postfix

 sudo apt-get install postfix

Select “Internet with smarthost” when prompted for type of mail configuration

Type your domain name when prompted for system name

Type the FQDN or IP Address of the mail server (smarthost) when prompted for SMTP relay host.

·         Create SMTP credentials file

Now you need to provide your SMTP server credentials in order to send mails via the smart host

·         Create the credential file

sudo nano /etc/postfix/smtp_credentials

·         Add  your credentials in the following format

SMTPSERVERFQDNORIP  yourusername:yourpassword

Eg smtp.mydomain.com requesttracker:Lye#gh@

·         To protect the file 'change file ownership to root

sudo chown root:root etc/postfix/smtp_credentials

·         change the file 'permissions

sudo chmod 600 etc/postfix/smtp_credentials

·         to protect your password file create a hash for the file

sudo postmap etc/postfix/smtp_credentials

·         Configure postfix to use the credentials file

open postfix configuration file

sudo nano /etc/postfix/main.cf

Edit postfix configuration file and the map the credentials file by adding the following text

smtp_sasl_password_maps = hash:/etc/postfix/smtp_credentials

smtp_sasl_auth_enable = yes

smtp_sasl_security_options = noanonymous

Restart Postfix   

sudo /etc/init.d/postfix restart

To configure RT to accept incoming emails

For RT to accept receive incoming emails we use fetchmail which is a remote-mail retrieval and forwarding utility

·         Install fetchmail

sudo apt-get install fetchmail

open fetchmail config file

sudo  nano  /etc/default/fetchmail

 edit the last line to appear like below this will make fetchmail  daemon start on machine start up

 START_DAEMON=yes

Create a file named fetchmailrc

 sudo nano /etc/fetchmailrc

 Add the following text

 set daemon 60

set invisible

set no bouncemail

set no syslog

set logfile /var/log/fetchmail.log

poll YOUREMAILSERVER protocol pop3 username "YOURUSERNAME" password "YOURPASSWORD" mda "/usr/bin/rt-mailgate --queue general --action correspond --url http://localhost/rt/" no keep

 Create a log file to view fetchmail logs

sudo touch /var/log/fetchmail.log

change the file ownership to fetchmail

chown fetchmail /var/log/fetchmail.log

restart fetchmail

sudo service fetchmail restart