FedoraCore4InstallGuide

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 'FedoraCore4InstallGuide' 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.



This is a guide on how to install RT 3.x on a Fedora Core 4 server using [Exim http//www.exim.org] as a mail server. Note: Specifics may differ from system to system. The system by which this was produced is running:

  • RT 3.5.5
  • Fedora Core 4
  • Apache2
  • Mod_perl 2.0.1
  • Mysql 4.1.12
  • Perl 5.8.6
  • HTML::Mason 1.3101

First, portions of this document were kindly reproduced from the original ManualInstallation guide. Thanks to the author for writing such a thorough document.

1. OS Installation

Install Fedora Core 4 and select to install mysql (it's a recent version) and apache. Make sure httpd and mysql services are running:

service mysqld start
service httpd start

You may need to create files in /etc/init.d for this to work.

To make sure everything is up up-to-date, it may be prudent to do an update of all binaries using yum:

yum update

Note (2006-03-17): This will completely update everything that yum has to offer so if you have an operational system be careful that you don't upgrade services or applications that will destroy--or at least mess up--your exiting applications. You may want to update only the applications and services necessary, mysql, postgres, perl, etc.

Note (2006-05-07): To start the httpd and mysqld service automatically at startup (after reboot):

chkconfig httpd on

chkconfig mysqld on

2. Exim Installation

Having correctly setup the server to connect to the Internet, you can now go and fetch the latest Exim binary: Exim mirror site

Follow the installation instructions and set Exim up as per your organisations standard.

Create a service start file in /etc/init.d and then type:

service exim start

3. RT Installation

With the OS correctly installed and apache, mysql and Exim running, we can now proceed with the RT stuff.

As per the ManualInstallation instructions:

3.1. Download RT

Fetch the latest binary from the RT site:

wget http://download.bestpractical.com/pub/rt/devel/rt-3.5.5.tar.gz

3.2. Unpack

First, at a command line prompt, unpack the distribution (untar your .tar file). By default, Fedora Core 4 empties the /tmp directory periodically, so create a new directory:

mkdir /usr/src/build

Now you can un-tar your downloaded tar file:

tar xzvf rt.tar.gz -C /usr/src/build

or

cd /usr/src/build
gzip -dc rt.tar.gz | tar xvf -

3.3 Run the configure script

From within the directory you just created, run the "configure" script. You'll want to read this entire section, and decide on the option switches which you will want to specify to configure, before you actually run it. Having multiple console windows available during (this or any other) install is exceptionally helpful.

To see a list of configuration options, use the "help" flag, which will show you a list of options:

./configure --help

We've also listed the options here. Defaults are specified in brackets.

Configuration:
 -h, --help              display this help and exit
     --help=short        display options specific to this package
     --help=recursive    display the short help of all the included packages
 -V, --version           display version information and exit
 -q, --quiet, --silent   do not print `checking...' messages
     --cache-file=FILE   cache test results in FILE [disabled]
 -C, --config-cache      alias for `--cache-file=config.cache'
 -n, --no-create         do not create output files
     --srcdir=DIR        find the sources in DIR [configure dir or `..']

By default, `make install' will install all the files in `/opt/rt3/bin', `/opt/rt3/lib' etc. You can specify an installation prefix other than `/opt/rt3' using `--prefix', for instance `--prefix=$HOME'.

--prefix=PREFIX         install architecture-independent files in PREFIX
                     [/opt/rt3]
--exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                     [PREFIX]

3.3.1. Installation directory fine-tuning

Here are some more configure switches you can use to fine tune exactly where the install process should put it's files. If you don't know why or to where you might change these, just accept the default.

--bindir=DIR           user executables [EPREFIX/bin]
--sbindir=DIR          system admin executables [EPREFIX/sbin]
--libexecdir=DIR       program executables [EPREFIX/libexec]
--datadir=DIR          read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR    modifiable single-machine data [PREFIX/var]
--libdir=DIR           object code libraries [EPREFIX/lib]
--includedir=DIR       C header files [PREFIX/include]
--oldincludedir=DIR    C header files for non-gcc [/usr/include]
--infodir=DIR          info documentation [PREFIX/info]
--mandir=DIR           man documentation [PREFIX/man]

Optional Features:

--disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
--enable-layout=LAYOUT  Use a specific directory layout (Default: RT3) Optional Packages:
--with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
--without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
--with-rt-group=GROUP   group to own all files (default: rt)
--with-bin-owner=OWNER  user that will own rt executable files (default root)
--with-libs-owner=OWNER user that will own RT libraries (default root)
--with-libs-group=GROUP group that will own rt binaries (default bin)
--with-db-type=TYPE     sort of database RT will use (default: mysql; others are
                        Oracle, Informix, Pg, SQLite)
--with-db-host=HOSTNAME FQDN of database server (default: localhost)
--with-db-port=PORT     port on which the database listens on
--with-db-rt-host=HOSTNAME
                        FQDN of database server (default: localhost)
--with-db-dba=DBA       name of database administrator (default: root)
--with-db-database=DBNAME
                        name of the database to use (default: rt3)
--with-db-rt-user=DBUSER
                        name of database user (default: rt_user)
--with-db-rt-pass=PASSWORD
                        password for database user (default: rt_pass)
--with-web-user=USER    user the web server runs as (default: www)
--with-web-group=GROUP  group the web server runs as (default: www)

Some influential environment variables:

PERL        Perl interpreter command

Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with unusual names/locations.

Look at all the available flags and determine your RT install preferences, then

./configure (with the flags you want)

You might find it useful to put all your switches into a script in your build directory called build, so that if you need to run it more than once, or refer back to it, it's been saved somewhere. You can then do your build by merely typing

./build

3.4. Satisfying RT's Dependencies

First of all, setup cpan:

yum install ncftp

then

perl -MCPAN -e 'install Bundle::CPAN'

Now lets begin to sort out dependencies:

yum install gd-devel
perl -MCPAN -e shell
 install GD

Now lets see what RT thinks is missing, from the /usr/src/build directory:

make testdeps
make fixdeps

On our system at LoughboroughUniversity we needed to do the following. Note: This may not be the case for your installation!

perl -MCPAN -e shell
force install HTTP::Server::Simple::Mason
install Pod::Tests
install Carp::Assert
force install Test::WWW:Mechanize

Changed install Cap::Assert to install Carp::Assert spelling was incorrect.

Everything should now be there and working, to test:

make testdeps

Hopefully at the bottom, RT will say "Everything was found."

Note (11 November 2005 - Patrick Noffke): The above failed for me on two Fedora Core 4 systems, specifically, the attempt to install Test::WWW:Mechanize. A workaround is to use yum:

yum install perl-Test-WWW-Mechanize

A couple other dependencies were missing, so I stomped on these by doing:

yum install perl-*

(which installed 225 packages for me). You may wish to decide for yourself which of these packages you need, but for me this way was easiest.

Note (Nov 7, 2006): Fedora Core 5, RT version 3.6.1, I needed to add the following to the note immediately below:

yum install perl-GD perl-GDGraph perl-Calendar-Simple perl-Test-Expect perl-UNIVERSAL-require

Note (March 21, 2006): Fedora Core 5: (updated October 12, 2006 with new names):

yum install perl-Params-Validate perl-Cache-Cache perl-Exception-Class perl-HTML-Mason \
perl-MLDBM perl-FreezeThaw perl-Apache-Session perl-XML-RSS perl-HTTP-Server-Simple \
perl-HTTP-Server-Simple-Mason perl-Text-WikiFormat perl-HTML-Format \
perl-Test-Inline perl-Class-ReturnValue perl-DBIx-SearchBuilder \
perl-Text-Template perl-HTML-Scrubber perl-Log-Dispatch perl-Locale-Maketext-Lexicon \
perl-Locale-Maketext-Fuzzy perl-MIME-tools perl-MailTools perl-Text-Wrapper \
perl-Time-modules perl-Term-ReadKey perl-Text-Autoformat perl-Text-Quoted \
perl-Tree-Simple perl-Module-Versions-Report perl-Cache-Simple-TimedExpiry perl-XML-Simple \
perl-Regexp-Common perl-Test-Inline perl-WWW-Mechanize perl-Test-WWW-Mechanize perl-Module-Refresh

Note (16 November 2005): Running the following command satisfied all the perl dependencies for me:

yum install perl-Apache-Session perl-Cache-Cache perl-Cache-Simple-TimedExpiry \
perl-Class-ReturnValue perl-DBIx-SearchBuilder perl-Exception-Class perl-FreezeThaw \
perl-HTML-Format perl-HTML-Mason perl-HTML-Scrubber perl-HTML-Tree \
perl-HTTP-Server-Simple perl-HTTP-Server-Simple-Mason perl-Locale-Maketext-Fuzzy \
perl-Locale-Maketext-Lexicon perl-Log-Dispatch perl-MIME-tools perl-MLDBM perl-MailTools \
perl-Module-Refresh perl-Module-Versions-Report perl-Params-Validate perl-Regexp-Common \
perl-TermReadKey perl-Test-Inline perl-Test-WWW-Mechanize perl-Text-Autoformat \
perl-Text-Quoted perl-Text-Template perl-Text-WikiFormat perl-Text-Wrapper perl-Time-HiRes \
perl-Time-modules perl-Tree-Simple perl-WWW-Mechanize perl-XML-RSS perl-XML-Simple

3.5. Create the rt group

Create a new Unix group called 'rt' (or whatever you gave to the --with-rt-group option to the configure script):

groupadd rt

3.6. Initialize the database

As root and from within the rt build directory, type:

make install

Now you need to modify the installed [=etc/RT_SiteConfig.pm] to suit your needs and then type:

make initialize-database

For some database backends (MySQL at least) it is not able to create the database user. So you have to create that user beforehand and you have to give it rights for the database.

For MySQL with the default [=$DatabaseUser], [=$DatabaseName] and [=$DatabasePassword], do this SQL command (as root database user):

GRANT ALL PRIVILEGES ON rt3.* TO rt_user@localhost IDENTIFIED BY 'rt_pass';
flush privileges;

Replace the values 'rt3', 'rt_user', 'localhost' and 'rt_pass' by whatever is appropriate for you.

3.6.1. Drop DB if something goes wrong

If the make fails, type:

make dropdb

fix whatever's broken, and start over from step "init DB" step

3.6.2. if still failing...

If make install still fails, look in /etc/httpd/httpd.conf or /etc/httpd/conf/commonhttpd.conf (or wherever your httpd.conf is; this may vary by Unix distribution; locate httpd.conf may help) for a line that reads "Group <something>" and another that reads "User <somebody>"

Go to your RT source directory and type (without the brackets, substituting the right Group and User from the file you just looked at):

./configure --with-web-group=<something> --with-web-user=<somebody>

4. Configuration

Edit [=etc/RT_SiteConfig.pm] in your RT installation directory, by specifying any values you need to change from the defaults as defined in RT_Config.pm. It is easiest to do this by copying RT_Config.pm to RT_SiteConfig.pm, and then un-commenting and changing anything you need to set, though perhaps this isn't quite the best approach.

In many cases sensible defaults have been included. In others, you must supply a value. Some values (such as the RT log directory) will come from values you supplied in the Makefile. You'll find further explanation inline in the RT_SiteConfig.pm file. You should look at and consider changing the following entries:

$DatabasePassword = 'rt_pass'

which is the password the DatabaseUser should use to access the database.

NOTE: Some MySQL users have had trouble with passwords of longer than 8 characters; if you cannot connect, try a password of 8 characters or fewer.

$CanonicalizeEmailAddressMatch = 'subdomain.example.com$';
$CanonicalizeEmailAddressReplace = 'example.com';

The $CanonicalizeEmailAddress variables allow you to keep incoming messages consistent, such as when a site removes the subdomain from an email address. In the example presented by the defaults, if messages from your organization sometimes come from exchange.example.com and sometimes from example.com, you'd set $CanonicalizeEmailAddressMatch to exchange.example.com and $CanonicalizeEmailAddressReplace to example.com

$SenderMustExistInExternalDatabase = undef;

If $SenderMustExistInExternalDatabase is true, RT will refuse to create non-staff accounts for unknown users if you are using the "LookupSenderInExternalDatabase" option elsewhere in RT_SiteConfig.pm. Instead, an error message will be mailed and RT will forward the message to $RTOwner as defined in RT_SiteConfig.pm. If you are not using $LookupSenderInExternalDatabase, this option has no effect. If you define an AutoRejectRequest template, RT will use this template for the rejection message.

$CorrespondAddress = 'RT::CorrespondAddress.not.set';
$CommentAddress = 'RT::CommentAddress.not.set';

$CorrespondAddress and $CommentAddress are the default addresses that will be listed in From: and Reply-To: headers of reply and comment mail tracked by RT, unless overridden by a queue-specific address.

$MailCommand = 'sendmailpipe';

$MailCommand defines which method RT will use to try to send mail. We know sendmailpipe works fairly well. If sendmailpipe doesn't work well for you, try sendmail. Note that you should remove the '-t' from $SendmailArguments if you use sendmail rather than sendmailpipe. Also note that sendmailpipe and sendmail aren't the names of commands on your system, but instructions that tell RT what mail delivery subsystem to try.

$SendmailArguments = "-oi -t";

$SendmailArguments defines what flags to pass to $Sendmail, assuming you picked sendmail or sendmailpipe as the $MailCommand. If you picked sendmailpipe, then $SendmailArguments must include the "-t" flag. The default options are good for most sendmail wrappers and workalikes.

$SendmailPath = "/usr/sbin/sendmail";

If you selected sendmailpipe as $MailCommand, you must specify the path to your sendmail executable file in $SendmailPath. If you did not select sendmailpipe this has no effect.

$Timezone = 'US/Eastern';

$Timezone is used to convert times entered by users into GMT and back again. It should be set to a timezone recognized by your local Unix box

$UseFriendlyToLine = 0;

RT can set a "friendly", rather than blank, To: header when sending messages to Ccs or AdminCcs. This feature does not work with Sendmail(tm)-brand sendmail. If you are using sendmail, rather than postfix, qmail, exim, or some other program, you must disable this option (by setting it to 0 rather than 1).

$WebPath = "";

A variable used to help RT construct URLs that point back to RT. If you've put RT somewhere other than at the root of your webserver, you need to define a WebPath. RT uses this in the construction of relative URLs. $WebPath requires a leading / but no trailing /

Example: if your installation is at http://www.fsck.com/rt/, set this to "/rt".

$WebBaseURL = "http://not.configured:80";

A variable used to help RT construct URLs that point back to RT. $WebBaseURL is the base of the URL. it should usually include the scheme, the host, and the port if non-standard.

Exmaple: "https://fsck.com" or "http://fsck.com:88"

$WebBaseURL doesn't need a trailing /

$WebURL = $WebBaseURL . $WebPath . "/";

A variable used to help RT construct URLs that point back to RT. [=$WebURL] is the combination of [=$WebBaseURL] and [=$WebPath]. Generally, you shouldn't change it.

$WebImagesURL = $WebURL . "/NoAuth/images/";

[=$WebImagesURL] points to the base URL where RT can find its images. If you're running the FastCGI version of the RT web interface, you should make RT's [=WebRT/html/NoAuth/images] directory available on a static web server and supply that URL as [=$WebImagesUrl] -- alternately, you can tell Apache not to run it through FastCGI.

5. Configuring Apache

1) First, you'll need to add a few lines to your httpd.conf telling it to use RT's web interface. If you have mod_perl (you should, the Perl scripts will go quite a bit faster around with it), you can do something like this:

<VirtualHost your.ip.address>
   ServerName your.rt.server.hostname
   DocumentRoot /opt/rt3/share/html
   AddDefaultCharset UTF-8

   # this line applies to Apache2+mod_perl2 only
   PerlModule Apache2 Apache::compat

   PerlModule Apache::DBI
   PerlRequire /opt/rt3/bin/webmux.pl

   <Location />
       SetHandler perl-script
       PerlHandler RT::Mason
   </Location>
</VirtualHost>

NOTE: If you are running Apache 2, the recommended configuration directive is:

RedirectMatch permanent (.*)/$ http://fsck.com$1/index.html

in your VirtualHost section

NOTE: I couldn't get it to work without that statement (on apache2), so this looks like it's mandatory, rather than only recommended. YMMV.

NOTE: If "your.ip.address" above is the same as your webserver's IP and you're not planning to assign a unique IP address or alias (CNAME) for RT, you should realize that the above VirtualHost configuration works when RT is the only content provided at the root of the webserver. If your webserver has existing content or you plan to add content later, you'll probably want to place RT in a directory other than the root of the webserver. If you choose to use "http://fsck.com/rt/", you'll want to modify the VirtualHost configuration as follows:

Comment with '#' or remove the following line:

DocumentRoot /opt/rt3/share/html

and add in its place:

Alias /rt "/opt/rt3/share/html"

Lastly, change the Location path from:

<Location />

to

<Location /rt>

That gives a configuration similar to

Alias /rt "/opt/rt3/share/html"
PerlModule Apache::DBI
PerlRequire /opt/rt3/bin/webmux.pl
<Directory /opt/rt3/share/html>
  AllowOverride All
  Options ExecCGI FollowSymLinks
  <IfModule mod_access.c>
        Order allow,deny
      Allow from all
  </IfModule>
</Directory>

<Location /rt>
  RewriteEngine On
  RedirectMatch permanent (.*)/$ $1/index.html
  AddDefaultCharset UTF-8
  SetHandler perl-script
  PerlHandler RT::Mason
</Location>

You will also need to modify the $WebPath variable in etc/RT_SiteConfig.pm in your RT installation directory. For the above example you would use:

$WebPath = "/rt";

Remember that $WebPath requires a leading / but no trailing /.

2) Next, stop Apache. This will vary by system but might look something like this:

cd /etc/init.d
./httpd stop

3) Try to use a browser to go to your RT server's website. You shouldn't be able to do it.

4) Restart Apache

./httpd start

5) Now, you should be able to go to your RT URL and get the login screen.

Once this works, you may move on to setting up your email gateway.

Note: Read the entry in the FAQ http://wiki.bestpractical.com/index.cgi?FAQ about MaxRequestsPerChild.

An apparently too common failure is for Apache to fail the restart looking for Apache::DBI. If apache doesn't restart, check the error_log file in the logs directory (e.g. /usr/local/apache2/logs/error_log). If you see something like..

Can't locate Apache/DBI.pm in @INC

it is likely that Apache::DBI could not be installed. Try..

perl -MCPAN -e 'install Apache::DBI'

If this fails one of the tests it will report that the installation would have to be forced. Whether that is a good idea is up to you, but to do so (assuming you are installing as 'root')...

cd /root/.cpan/build/Apache-DBI-<version>
make install

Then restart apache.

Further UPDATE: By Oliver Shanahan. Another reason apache will fail to restart is if you have not configured or have selinux enabled and misconfigured. If you want an installation of standard security, disable it in /etc/selinux/config & restart apache, else see SELinux. The following is the error you will get in apache's error log with this issue, but messages or audit.log are better places to debug SELinux:

<snip - error.log> [Tue Oct 25 16:45:24 2005] error Could not create '/usr/local/rt3/var/mason_data/obj/.__obj_create_marker': Permission denied\nStack:\n [/usr/lib/perl5/site_perl/5.8.6/HTML/Mason/Interp.pm:185]\n [/usr/lib/perl5/site_perl/5.8.6/HTML/Mason/Interp.pm:155]\n [/usr/lib/perl5/site_perl/5.8.6/Class/Container.pm:329]\n [/usr/lib/perl5/site_perl/5.8.6/Class/Container.pm:53]\n [/usr/lib/perl5/site_perl/5.8.6/HTML/Mason/ApacheHandler.pm:624]\n [/usr/local/rt3/lib/RT/Interface/Web/Handler.pm:183]\n [/usr/local/rt3/lib/RT/Interface/Web/Handler.pm:147]\n [/usr/local/rt3/bin/webmux.pl:87]\nCompilation failed in require at (eval 2) line 1.\n [Tue Oct 25 16:45:24 2005] error Can't load Perl file: /usr/local/rt3/bin/webmux.pl for server rt:0, exiting... </snip>

SELinux can be disabled, temporarily, without a reboot, by running

setenforce 0

To re-enable it, just change the 0 to a 1.

Further UPDATE: By Andrew Chapman After applying the fixes above I was still getting error: [Mon Jul 24 19:57:42 2006] error Can't locate Apache2.pm in @INC (@INC contains: /opt/rt3/local/lib /opt/rt3/lib /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at (eval 195) line 3.\n

I resolved this by editing the Virtual Hosts section, removing 'PerlModule Apache2 Apache::compat' and replacing it with 'LoadModule perl_module libexec/apache2/mod_perl.so', thus:

<VirtualHost 10.100.100.101>

ServerName 10.100.100.101
 # DocumentRoot /opt/rt3/share/html
 Alias /rt "/opt/rt3/share/html"
 AddDefaultCharset UTF-8
 
 # this line applies to Apache2+mod_perl2 only
 LoadModule perl_module libexec/apache2/mod_perl.so
 #PerlModule Apache2 Apache::compat
 
 PerlModule Apache::DBI
 PerlRequire /opt/rt3/bin/webmux.pl
 
 <Location /rt>
     RedirectMatch permanent (.*)/$ $1/index.html
     SetHandler perl-script
     PerlHandler RT::Mason
 </Location>
 

</VirtualHost>

6. Setting up RT to talk to Exim

The mail gateway requires the web UI to be set up and functional. If you intend to use SSL to secure your mail gateway, you need to make sure that lib-www-perl, a.k.a LWP, is built with SSL support.

1) Documentation for setting up the mail gateway can be found by typing:

perldoc /<path to installed program>/rt-mailgate

The rt-mailgate program is installed in /opt/rt3/bin by default, so that command will probably be, more specifically:

perldoc /opt/rt3/bin/rt-mailgate

unless you've moved your install (not build) directory.

2) You need to tell your Mail Transfer Agent (ex sendmail, postfix, or qmail) how to forward messages to RT's mail gateway. To do this, create an aliases in your system's mail aliases file. Here's an example, which routes mail to the mailbox [=rt@example.com] (and [=rt-comment@example.com]) into new tickets in the RT queue named General. Note that the queue name is case-insensitive.

Add the following lines to /etc/aliases (or your local equivalent such as /etc/mail/aliases):

rt: "|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://localhost/"
rt-comment: "|/opt/rt3/bin/rt-mailgate --queue general --action comment --url http://localhost/"

NOTES: When you add the above it should be all one line; make sure you include the quotes. Replace general with the name of your queue and rt with the email address you wish people to send their messages to. You might, for example, have messages to support go into the service queue, and abuse go into the ops queue. You can have more than one set of aliases point to the same queue, if, for example, you wanted mail to both abuse and security both go to the ops queue.

The queue name may have spaces. rt-mailgate works as well with them, do not forget to escape these spaces by enclosing the queue name in single quote:

my-queue: "|/opt/rt3/bin/rt-mailgate --queue 'My Queue' --action correspond --url http://localhost/"

If you are using the default sendmail included in most redhat distro's you will need likely need to cp rt-mailgate to /etc/smrsh or create a symbolic link and change /opt/rt3/bin above to /etc/smrsh or sendmail will complain. These sendmail's will only execute programs as alias targets which have been blessed by placing them in a special directory.

You'll choose from "--action correspond" and "--action comment" depending on whether the mail should be resent to the requestor. If you want the requestor to see it, choose correspond; if you want to keep it from the requestor, choose comment. The URL will be the URL for RT's web interface, such as http://issues.bestpractical.com; whatever is the root of your RT install.

3) Stop and start your mail server, so it picks up your configuration changes.

4) Change the password. The default root password for the web interface is password, as installed. Changing this should be the first thing you do after installation.

Until you configure RT, RT will not be able to send or receive email, nor will it be more than marginally functional. This is not an optional step. RT has many configuration options, and you should read Chapter 4: Adminning RT for a broader view, but here's a quick guide to things you should probably look at.

7. Creating users

In its default configuration, RT uses an internal users database to keep track of who can access RT and who has which rights within the system. One of your first tasks should be to create users for anyone who will need to work with tickets within RT.

click Configuration -> click Users -> click New user

For more details, see 'Users: Creating a user' in ManualAdministration.

8. Granting User Rights

RT provides a rich access control system that allows rights to be granted to groups, individual users and users in specific roles.

To allow arbitrary remote users to submit tickets into a given queue by email, grant the system group Everyone the rights See Queue, Create Ticket, Reply To Ticket, and Comment On Ticket for that queue.

If you intend to let ticket requestors use the requestor-mode web interface, you should grant the role of Requestor the right Show Ticket.

To make sure your staff can work with tickets, you should grant them all the following additional rights:

For more details, see Users: Granting user rights in ManualAdministration.

9. Creating queues

By default, RT has one queue called 'general'. You might want to change the values for this.

click Configuration -> click Queues -> click general

To create a new queue:

click Configuration -> click Queues -> click New queue

For more details, see Queues in ManualAdministration.

10. Setting up scrips

The default global Scrips installed with RT 3 are:

  • On Create, Autoreply to Requestors with Global Template: Autoreply
  • On Create, Notify AdminCcs with Global Template: Transaction
  • On Correspond, Notify AdminCcs with Global Template: Admin Correspondence
  • On Correspond, Notify Requestors and Ccs with Global Template: Correspondence
  • On Correspond, Notify Other Recipients with Global Template: Correspondence
  • On Comment, Notify AdminCcs as Comment with Global Template: Admin Comment
  • On Comment, Notify Other Recipients as Comment with Global Template: Correspondence
  • On Resolve, Notify Requestors with Global Template: Resolved
  • On Correspond, Open Ticket with Global Template: Blank (this scrip replaces old built-in behavior that would automatically open tickets if privileged users replied to a new ticket or if anyone replied to a stalled or closed ticket.)

For more details, see Scrips in ManualAdministration and ManualScrips.