Request Tracker: Difference between revisions

From Alpine Linux
m (more)
(rewrite parts)
Line 28: Line 28:
* Tools -> Configuration -> Queues -> Create... Give it a name like 'support', which you'll use in the next sections (including the email address)
* Tools -> Configuration -> Queues -> Create... Give it a name like 'support', which you'll use in the next sections (including the email address)
* Add to ''/etc/postfix/main.cf'':
* Add to ''/etc/postfix/main.cf'':
virtual_alias_maps = regexp:/etc/postfix/rt4-aliases
  transport_maps = regexp:/etc/postfix/rt4-transport
  transport_maps = regexp:/etc/postfix/rt4-transport
* Create /etc/postfix/rt4-aliases (replacing example.com):
/^(.*)@example.com$/  $1
* Create /etc/postfix/rt4-transport:
* Create /etc/postfix/rt4-transport:
  /^support$/             rt4-support:
support@x.example.com        rt4:support
  /^(support-list).*$/               mlmmj:support-list
* Add to /etc/postfix/master.cf:
* Add to /etc/postfix/master.cf:
rt4-support  unix   -      n      n      -      -      pipe   flags=DORhu     user=postgres    argv=/usr/bin/rt-mailgate --queue support --action correspond --url http://ip.addr.of.interface/
rt4   unix -      n      n      -      -      pipe flags=DORhu user=lighttpd argv=/usr/bin/rt-mailgate --queue $nexthop --action correspond --url http://fqdn.in.example.com/
mlmmj  unix  -      n      n      -      -      pipe flags=DORhu user=mlmmj argv=/usr/bin/mlmmj-recieve -F -L /var/spool/mlmmj/$nexthop
 
* Allow users to create tickets by email by checking all General Rights for group Everyone in Tools -> Configuration -> Global -> Group Rights
* Allow users to create tickets by email by checking all General Rights for group Everyone in Tools -> Configuration -> Global -> Group Rights
* Setup outbound emails:
* Setup outbound emails:
Line 43: Line 43:
{{Warning|Instructions below this warning haven't yet been tested}}
{{Warning|Instructions below this warning haven't yet been tested}}
* Stop rt-server
* Stop rt-server
* /etc/lightttpd/lighttpd.conf:
include "rt4.conf"
* /etc/lighttpd/rt4.conf:
server.modules += ("mod_fastcgi")
$HTTP["host"] == "fqdn.in.example.com" {
        server.document-root = "/usr/share/rt4/html"
        index.file-names = ( "index.html" )
        fastcgi.server = ( "/" =>
              ((
                "bin-path"      => "/usr/sbin/rt-server.fcgi",
                "socket"        => "/var/run/lighttpd/rt4.socket",
                "check-local"  => "disable",
                "fix-root-scriptname" => "enable"
              )),
          )
}
* {{Cmd|/etc/init.d/lighttpd start}}
* {{Cmd|/etc/init.d/lighttpd start}}
* /etc/lighttpd/lighttpd.conf (add to the end):
fastcgi.server = ( "/rt" =>
        ( "localhost" =>
                  (
                            "port" => 80,
                            "bin-path" => "/usr/sbin/rt-server.fcgi",
                            "check-local" => "disable"
                  )
        )
)
== Optional: Mlmmj support ==
{{Warning|This section hasn't yet been tested}}
* apk add mlmmj
* apk add mlmmj
* adduser mlmmj
* adduser mlmmj
* mkdir /var/spool/mlmmj
* mkdir /var/spool/mlmmj
* mlmmj-make-ml.sh -L support
* mlmmj-make-ml.sh -L support
* /etc/postfix/main.cf:
 
virtual_alias_maps = regexp:/etc/postfix/rt4-aliases,
 
  regexp:/etc/postfix/mlmmj-lists
TO BE CONTINUED
transport_maps = regexp:/etc/postfix/rt4-transport,
  regexp:/etc/postfix/mlmmj-transport
* /etc/postfix/mlmmj-lists:
/^(support1.*)@example.com/  $1
* /etc/postfix/mlmmj-transport:
/^(support1).*$/            mlmmj-support:
* /etc/postfix/master.cf:
mlmmj-support              unix    -      n      n      -      -      pipe    flags=DORhu    user=mlmmj      argv=/usr/bin/mlmmj-recieve -F -L /var/spool/mlmmj/support/
* set outbound default email for tickets to be support1@example.com
Tools -> Configuration -> Queues -> Select -> Support
Change "reply address" and "comment address" to support1@example.com (replacing support@example.com)

Revision as of 19:05, 22 June 2011

Note: This document has been tested on Alpine Linux 2.2.2, but contains some packages which are currently in the [edge/testing repository].
Note: Use a computer with at least 512MB of RAM.

RT with basic email support

This guide will get a basic rt4 setup working that will allow inbound emails to create/update issues, and assumes that you have a working postfix setup already.

  • add edge/main and edge/testing repos to /etc/apk/repositories

printf "http://nl.alpinelinux.org/alpine/edge/main\nhttp://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories apk update

  • apk add lighttpd fcgi postgresql rt4 php php-cli postfix postfix-pcre msmtp

  • Edit /etc/lighttpd/lighttpd.conf and enable fastcgi
  • /etc/init.d/postgresql setup

  • /etc/init.d/postgresql start

  • su - postgres -c "createuser -P"

Enter name of role to add: rt_user
Enter password for new role: rtpass
Enter it again: rtpass
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) y
  • cp /etc/rt4/RT_Config.pm /etc/rt4/RT_SiteConfig.pm

  • chmod 644 /etc/rt4/RT_SiteConfig.pm

  • /etc/rt4/RT_SiteConfig.pm change to use Pg instead of mysql and change DatabasePassword to correspond to the password created for rt_user in postgresql.
  • /usr/sbin/rt-setup-database --action init

  • rt-server

  • Test and make sure that you can access rt using the built-in webserver first.
  • Tools -> Configuration -> Queues -> Create... Give it a name like 'support', which you'll use in the next sections (including the email address)
  • Add to /etc/postfix/main.cf:
transport_maps = regexp:/etc/postfix/rt4-transport
  • Create /etc/postfix/rt4-transport:
support@x.example.com        rt4:support
/^(support-list).*$/                mlmmj:support-list
  • Add to /etc/postfix/master.cf:

rt4 unix - n n - - pipe flags=DORhu user=lighttpd argv=/usr/bin/rt-mailgate --queue $nexthop --action correspond --url http://fqdn.in.example.com/ mlmmj unix - n n - - pipe flags=DORhu user=mlmmj argv=/usr/bin/mlmmj-recieve -F -L /var/spool/mlmmj/$nexthop

  • Allow users to create tickets by email by checking all General Rights for group Everyone in Tools -> Configuration -> Global -> Group Rights
  • Setup outbound emails:
  • /etc/rt4/RT_SiteConfig.pm:
Set($MailCommand, "sendmailpipe");
Set($SendmailPath, "/usr/sbin/sendmail");
Warning: Instructions below this warning haven't yet been tested


  • Stop rt-server
  • /etc/lightttpd/lighttpd.conf:
include "rt4.conf"
  • /etc/lighttpd/rt4.conf:
server.modules += ("mod_fastcgi")

$HTTP["host"] == "fqdn.in.example.com" {
        server.document-root = "/usr/share/rt4/html"
        index.file-names = ( "index.html" ) 

        fastcgi.server = ( "/" =>
             ((
                "bin-path"      => "/usr/sbin/rt-server.fcgi",
                "socket"        => "/var/run/lighttpd/rt4.socket",
                "check-local"   => "disable",
                "fix-root-scriptname" => "enable"
              )),
          )
}
  • /etc/init.d/lighttpd start

  • apk add mlmmj
  • adduser mlmmj
  • mkdir /var/spool/mlmmj
  • mlmmj-make-ml.sh -L support


TO BE CONTINUED