[rt-users] Installed on debian sarge ok - but need to get basic email sending working with postfix

Kevin Bailey kbailey at freewayprojects.com
Tue Jan 18 10:03:33 EST 2005


hi,

request-Tracker3 has been installed and is looking great.

i have installed this on a debian sarge machine and will paste my notes
to the bottom of this posting.  when i have got postfix to work i will
update/tidy up the notes and put them up for the wiki.

but...

first...

i just need to get basic email sending to work.  i have changed from
exim to postfix, the 'mail' command works from the command line.

but when i add users to the cc line in RT nothing gets sent out - the
local email server logs show nothing.

could someone paste in some conf file settings which enable RT to send
mail using postfix.

thanks

kev bailey










Setting up Request-Tracker3
Edited the /etc/Request_tracker3/RT_SiteConfig.pm file.:

        # RT_SiteConfig.pm
        #
        # These are the bits you absolutely *must* edit.
        #
        # To find out how, please read
        #   /usr/share/doc/request-tracker3/INSTALL.Debian

        # THE BASICS:
        # 04/01/2004 - kbailey
        Set($rtname, 'freewayprojects.com');
        Set($Organization, 'freewayprojects.com');
        # 04/01/2004 - kbailey
        Set($CorrespondAddress , 'RT_CorrespondAddressNotSet');
        Set($CommentAddress , 'RT_CommentAddressNotSet');

        Set($Timezone , 'Europe/London'); # obviously choose what suits you

        # THE DATABASE:

        Set($DatabaseType, 'Pg'); # e.g. Pg or mysql

        # These are the settings we used above when creating the RT database,
        # you MUST set these to what you chose in the section above.
        # 04/01/2004 - kbailey
        Set($DatabaseUser , 'rtuser');
        Set($DatabasePassword , 'password');
        Set($DatabaseName , 'rtdb');

        # THE WEBSERVER:

        Set($WebPath , "/rt");
        # 04/01/2004 - kbailey
        Set($WebBaseURL , "http://rt.freewayprojects.com");

        1;

Created users and a DB on the new database.

First of all created a superuser on the DB called dba.:

        tinkerfour:~# su - postgres
        postgres at tinkerfour:~$ createuser -a -d -P dba
        Enter password for new user:
        Enter it again:
        CREATE USER
        postgres at tinkerfour:~$

Now create the user which RT will use to connect to the DB.:

        postgres at tinkerfour:~$ createuser -d -P rtuser
        Enter password for new user:
        Enter it again:
        Shall the new user be allowed to create more new users? (y/n) n
        CREATE USER
        postgres at tinkerfour:~$

Updated the /etc/postgresql/pg_hba.conf:

        # TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
        # Database administrative login by UNIX sockets
        local   all         postgres                                        ident sameuser

        # 04/01/2004 - kbailey
        host    template1   rtuser    127.0.0.1    255.255.255.255   password
        local   template1   rtuser                                   password
        host    rtdb        rtuser    127.0.0.1    255.255.255.255   password
        local   rtdb        rtuser                                   password

And then restarted the PG database.

Then checked that the user could connect.:

        kbailey at tinkerfour:~$ psql -d template1 -U rtuser -W
        Password:
        Welcome to psql 7.4.6, the PostgreSQL interactive terminal.

        Type:  \copyright for distribution terms
               \h for help with SQL commands
               \? for help on internal slash commands
               \g or terminate with semicolon to execute query
               \q to quit

        template1=>
        template1=>
        template1=> \q
        kbailey at tinkerfour:~$

NB NB NB NB
These notes are from when i copied a DB across from an original install.

Next should copy the DB across from the old machine.

First of all we create a fresh DB from the supplied script.:

        tinkerfour:~# /usr/sbin/rt-setup-database --action init --dba rtuser --prompt-for-dba-password

Lets copy the DB in one go.

To prepare for this we are need to ensure that all local connections to
the DB authenticate using a password - either if from sockets or local
IP address (127.0.0.1)

Then we will store passwords into the ~/.pgpass file so that the command
to backup (and restore) the DB will run from a script.

Ensure /etc/postgresql/pg_hba.conf contains:

        # All other connections by UNIX sockets
        # 02/12/2004 - kbailey
        #local   all         all                                    ident sameuser
        local   all     all     password
        #
        # All IPv4 connections from localhost
        # 02/12/2004 - kbailey
        #host    all         all         127.0.0.1         255.255.255.255   ident sameuser
        host    all         all         127.0.0.1         255.255.255.255   password

The format of the .pgpass file is:

        tinkerthree:~# cat .pgpass
        localhost:5432:*:dba:password

Also, needed to allow tinkerfour to send backup to tinkerthree - so line
was added to allow password authentication on tinkerhtree.:

            host    all         all         127.0.0.1         255.255.255.255   password

Command used to move DB over:

        pg_dump -c -U dba -h tinkerthree rtdb | psql -U dba rtdb

Now we needed to set up apache - so we edited /etc/apache/httpd.conf:

        # 28/12/2004 - kbailey
        NameVirtualHost 192.168.1.18

        <VirtualHost 192.168.1.18>
        #    ServerAdmin webmaster at host.some_domain.com
            DocumentRoot /var/www
            ServerName rt.freewayprojects.com
        #    ErrorLog logs/host.some_domain.com-error.log
        #    CustomLog logs/host.some_domain.com-access.log common

            Include "/etc/request-tracker3/apache-modperl.conf"

        </VirtualHost>

Restart the apache server.

We can now access the RT application at http://rt.freewayprojects.com/rt





More information about the rt-users mailing list