Sending a mail to a user, should automatically create a ticket in RT ( Request Tracker)
Install the prerequisites
yum -y install wget perl-CPAN perl-HTML-Format.noarch perl-HTML-Parser.x86_64 perl-HTML-Tree.noarch perl-Module-Build.x86_64 perl-XML-Simple.noarch
Download rt-mailgate
#wget http://download.bestpractical.com/pub/rt/release/rt-3.4.4.tar.gz
#gunzip rt-3.4.4.tar.gz
#tar xf rt-3.4.4.tar
#cd rt-3.4.
#./configure --prefix=/usr/local
See what dependencies you are missing. If any are missing in the MAILGATE section, install the required packages.
# make testdeps
perl:
5.8.3...found
[...]
MAILGATE dependencies:
HTML::TreeBuilder ...found
HTML::FormatText ...found
Getopt::Long ...found
LWP::UserAgent ...found
[...]
Copy the rt-mailgate file from the ${prefix}/bin dir on the other machine where you installed RT and put in your bin dir (e.g., /usr/local/bin/rt-mailgate)
Add this line in /opt/zimbra/postfix/conf/transport file
example.user@domain.com example.user-pipe
#postmap /opt/zimbra/postfix/conf/transport
Now add this to main.cf by using the following command as zimbra user
#zmlocalconfig -e postfix_transport_maps=' hash:/opt/zimbra/postfix/conf/transport,ldap:/opt/zimbra/conf/ldap-transport.cf'
verify with this command
#zmlocalconfig -s postfix_transport_maps
Add the following two lines to the bottom of master.cf.in located in /opt/zimbra/postfix/cont/
example.user-pipe unix - n n - - pipe
flags= user=<user> argv=/usr/local/bin/rt-mailgate --debug --queue <queue> --action correspond --url http://url to rt/rt/
Its important that the second line starts with a white space and the user is a valid user.
Now restart zimbra
zmcontrol restart
Very Useful .. Thanks murugan.
ReplyDeletewelcome Sabeel
DeleteHi Sabeel,
ReplyDeleteThanks for your tutorial. I have configured my Zimbra server as you described above.
Actually I need to pipe all the emails to a php pipe fie in a url.
My /opt/zimbra/postfix/conf/master.cf.in file look like "
---------------------------------------------------------------
rt-pipe unix - n n - - pipe
flags= user=zimbra argv=/opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://mydomain.com/piping/pipe.php
"
But unfortunately not getting any data at the piping file. Can you please help me with this?