User talk:Jbilyk: Difference between revisions
m (add needed group rights) |
m (add outbound email config) |
||
Line 9: | Line 9: | ||
Note: This guide will get a basic rt4 setup working that will allow inbound emails to create/update issues. <br /> | Note: This guide will get a basic rt4 setup working that will allow inbound emails to create/update issues. <br /> | ||
* add edge/main and edge/testing repos to /etc/apk/repositories | * add edge/main and edge/testing repos to /etc/apk/repositories | ||
* apk add lighttpd fcgi postgresql rt4 php php-cli php-common postfix postfix-pcre | * apk add lighttpd fcgi postgresql rt4 php php-cli php-common postfix postfix-pcre msmtp | ||
* Edit lighttpd.conf and enable fastcgi | * Edit lighttpd.conf and enable fastcgi | ||
* /etc/init.d/lighttpd start | * /etc/init.d/lighttpd start | ||
Line 33: | Line 33: | ||
virtual_alias_maps = regexp:/etc/postfix/rt4-aliases, | 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: | * 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.*$/ rt4-support: | ||
Line 40: | Line 40: | ||
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-support unix - n n - - pipe flags=DORhu user=postgres argv=/usr/bin/rt-mailgate --queue support --action correspond --url http://ip.addr.of.interface/ | ||
* 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: | |||
* /etc/rt4/msmtp-wrapper.conf: | |||
defaults | |||
logfile /var/log/msmtp.log | |||
account default | |||
host ip.addr.of.interface | |||
port 25 | |||
auto_from on | |||
* /etc/rt4/msmtp-wrapper (chmod'd 755): | |||
#!/bin/sh | |||
msmtp -t -C /etc/rt4/msmtp_wrapper.conf | |||
logger -t rt-mailer -p syslog.info -- CALL msmtp -nt "$@" RETURNED $? | |||
* /etc/rt4/RT_SiteConfig.pm: | |||
Set($MailCommand, "sendmailpipe"); | |||
Set($SendmailPath, "/etc/rt4/msmtp_wrapper"); | |||
<hr /> | <hr /> |
Revision as of 20:18, 16 June 2011
This page is a work in progress ... This page is still being developed. |
RT ticket tracking system Alpine Linux 2.2.0 Howto
Note: Use a computer with at least 512MB of RAM.
Note: This guide will get a basic rt4 setup working that will allow inbound emails to create/update issues.
- add edge/main and edge/testing repos to /etc/apk/repositories
- apk add lighttpd fcgi postgresql rt4 php php-cli php-common postfix postfix-pcre msmtp
- Edit lighttpd.conf and enable fastcgi
- /etc/init.d/lighttpd start
- ln -s /usr/share/rt4/html /var/www/localhost/htdocs/rt4
- /etc/init.d/postgresql setup
- /etc/init.d/postgresql start
- su - postgres
- createuser -P
rt_user rtpass rtpass n y 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
- /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:
virtual_alias_maps = regexp:/etc/postfix/rt4-aliases, transport_maps = regexp:/etc/postfix/rt4-transport
- Create /etc/postfix/rt4-aliases (replacing example.com):
/^(.*)@example.com$/ $1
- Create /etc/postfix/rt4-transport:
/^support.*$/ rt4-support:
- 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/
- 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/msmtp-wrapper.conf:
defaults logfile /var/log/msmtp.log account default host ip.addr.of.interface port 25 auto_from on
- /etc/rt4/msmtp-wrapper (chmod'd 755):
#!/bin/sh msmtp -t -C /etc/rt4/msmtp_wrapper.conf logger -t rt-mailer -p syslog.info -- CALL msmtp -nt "$@" RETURNED $?
- /etc/rt4/RT_SiteConfig.pm:
Set($MailCommand, "sendmailpipe"); Set($SendmailPath, "/etc/rt4/msmtp_wrapper");
Idea is to set up Nagios as an SNMP trap receiver, especially for HP Procurve switch alerts
Source: http://xavier.dusart.free.fr/joomla/index.php/en/nagios/47-traps-snmp-dans-nagios
Add packages:
nagios
nagios-web
lighttpd
net-snmp
perl
snmptt (available from edge/testing)
Create file /etc/snmp/snmptrapd.conf, and populate:
traphandle default /usr/sbin/snmptt
disableAuthorization yes
donotlogtraps yes
Edit /etc/conf.d/snmptrapd:
OPTIONS="-On -Lsd -p /var/run/snmptrapd.pid"
Start snmptrapd using init script.
Edit /etc/snmptt.ini and insert contents found at source link.
To be continued once my testing is complete :). With the config done as above, snmp traps will simply be logged to syslog since they're all unknown to snmptrapd.
Test edit http://www.google.com