Rt-mailgate in RT2 vs RT3

Hello Everyone,

I am testing rt3.

I have setup rt3 on a test system which also has rt2. Now the problem that I have
is mail related. I use Exim-4.12.

I have two databases, rt2 and rt3, corresponding to the installations in /opt/rt{2|3}

rt-mailgate for rt3 fails to work, while rt-mailgate for rt2 works okay.

I have these aliases for testing (I’ve ommitted the -comment aliases):

rt2: "|/opt/rt2/bin/rt-mailgate --queue cs --action correspond"
rt: “|/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/

When I send mail to the “rt2 at freebsd.or.ke” the mail is processed perfectly.
However, when I send to “rt at freebsd.or.ke”, the mail gets stuck.
[addresses masked deliberately ;)]

I did a debug run and the error is:

Local deliveries >>>>>>>>>>>>>>>>
--------> |/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/ <--------
locking /var/spool/exim/db/retry.lockfile
home=NULL current=/
address_pipe transport returned DEFER for |/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url
https://rt3.wananchi.com/
post-process |/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/ (1)
LOG: MAIN
<|/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/>: address_pipe transport
output: An Error Occurred
LOG: MAIN
== |/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/ rt@freebsd.or.ke
R=system_aliases T=address_pipe defer (0): Child process of address_pipe transport returned 75 (could mean temporary
error) from command: /opt/rt3/bin/rt-mailgate

Below are the file permissions:

beastie# cd /opt/rt2/bin/
beastie# ls -al
total 85
drwxr-xr-x 2 root rt 512 Oct 5 13:26 .
drwxr-xr-x 10 root wheel 512 Jan 14 18:52 …
-rwxr-xr-x 1 root rt 2395 Sep 21 10:39 escalator
-rwxr-sr-x 1 root rt 5545 Oct 5 13:26 mason_handler.fcgi
-rwxr-sr-x 1 root rt 4633 Oct 5 13:26 mason_handler.scgi
-rwxr-sr-x 1 root rt 31395 Nov 18 14:09 rt
-rwxr-sr-x 1 root rt 9122 Oct 5 13:26 rt-mailgate
-rwxr-sr-x 1 root rt 23823 Oct 5 13:26 rtadmin
-rwxr-xr-x 1 root rt 4736 Oct 5 13:26 webmux.pl
beastie#
beastie# cd …/…/rt3/bin/
beastie# ls -al
total 32
drwxr-xr-x 2 root wheel 512 Feb 6 16:27 .
drwxr-xr-x 9 rt user 512 Feb 14 17:54 …
-rwxr-sr-x 1 root rt 1365 Feb 6 14:58 mason_handler.fcgi
-rw-r–r-- 1 root wheel 6705 Feb 6 14:58 mason_handler.svc
-rwxr-xr-x 1 root wheel 6102 Feb 6 14:58 rt-crontool
-rwxr-xr-x 1 root wheel 10530 Feb 6 14:58 rt-mailgate
-rwxr-xr-x 1 root wheel 3371 Feb 13 18:47 webmux.pl

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post

“OW” == Odhiambo Washington wash@wananchi.biz writes:

OW> rt: “|/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/

What happens when you save a message as a text file, then run

/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/ < messagefile.txt

The messagefile.txt should include all the headers and such, as well,
just as if it was piped in from the mail server.

rt-mailgate for rt3 fails to work, while rt-mailgate for rt2 works okay.

rt: “|/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/

However, when I send to “rt at freebsd.or.ke”, the mail gets stuck.
[addresses masked deliberately ;)]

So. It should be noted that rt3’s mailgate uses an http based RPC
mechanism to talk to the RT Application Server (The web ui). If you
don’t have the web ui running correctly, the mailgate won’t work.

�|� http://www.bestpractical.com/rt – Trouble Ticketing. Free.

“OW” == Odhiambo Washington wash@wananchi.biz writes:

OW> rt: “|/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/

What happens when you save a message as a text file, then run

/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/ < messagefile.txt

Yayi - I have looked at the Changelog and googled but I did not see this being mentioned.
Here is the output:

beastie# mv message.txt messagefile.txt
beastie# ./rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/ < messagefile.txt
An Error Occurred

501 Protocol scheme ‘https’ is not supported

Okay, I now changed the https to http:

beastie# ./rt-mailgate --queue general --action correspond --url http://rt3.wananchi.com/ < messagefile.txt
An Error Occurred

404 Not Found
beastie#

Thirdly I changed the virtualhost for rt from <VirtualHost *:443> to <VirtualHost *:80> and
did apachectl {stop|startssl}. The result…

beastie# ./rt-mailgate --queue general --action correspond --url http://rt3.wananchi.com/ < messagefile.txt
beastie#

I hope it is documented that either

  1. rt3 doesn’t support ssl virtualhosts, OR
  2. there is some tweaks rqd to use ssl virtualhosts.

Thank you so much Vivek.

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post

Maybe I concluded so fast. The last test seemed to have succeeded, but after
all the changes, I see a failure still:

2003-02-14 19:22:46 SMTP connection from ns2.wananchi.com [62.8.64.4] (TCP/IP connection count = 1)
2003-02-14 19:22:46 18jibu-000NaZ-00 <= wash@wananchi.com H=ns2.wananchi.com [62.8.64.4] P=esmtp S=1702
id=20030214162142.GE68682@ns2.wananchi.com T=“Testing” from wash@wananchi.com for rt@freebsd.or.ke
2003-02-14 19:22:47 3 args: /usr/local/sbin/exim -Mc 18jibu-000NaZ-00
2003-02-14 19:22:47 SMTP connection from ns2.wananchi.com [62.8.64.4] closed by QUIT
2003-02-14 19:22:47 18jibu-000NaZ-00 <|/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url
http://rt3.wananchi.com/>: address_pipe transport output: An Error Occurred
2003-02-14 19:22:47 18jibu-000NaZ-00 == |/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url
http://rt3.wananchi.com/ rt@freebsd.or.ke R=system_aliases T=address_pipe defer (0): Child process of address_pipe transport
returned 75 (could mean temporary error) from command: /opt/rt3/bin/rt-mailgate

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post

beastie# mv message.txt messagefile.txt
beastie# ./rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/ < messagefile.txt
An Error Occurred

501 Protocol scheme ‘https’ is not supported

Actually, I believe that would be your lib-www-perl not being built with
ssl support. But I’ll point our tech writer at this bit when she’s next
ready for installation guide details.

Okay, I now changed the https to http:

beastie# ./rt-mailgate --queue general --action correspond --url http://rt3.wananchi.com/ < messagefile.txt
An Error Occurred

404 Not Found
beastie#

Thirdly I changed the virtualhost for rt from <VirtualHost *:443> to <VirtualHost *:80> and
did apachectl {stop|startssl}. The result…

beastie# ./rt-mailgate --queue general --action correspond --url http://rt3.wananchi.com/ < messagefile.txt
beastie#

I hope it is documented that either

  1. rt3 doesn’t support ssl virtualhosts, OR
  2. there is some tweaks rqd to use ssl virtualhosts.

Thank you so much Vivek.

    cheers
   - wash 

±---------------------------------±----------------------------------------+
Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
±--------------------------------±-----------------------------------------+
“Oh My God! They killed init! You Bastards!”
–from a /. post


rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

�|� http://www.bestpractical.com/rt – Trouble Ticketing. Free.

So. It should be noted that rt3’s mailgate uses an http based RPC
mechanism to talk to the RT Application Server (The web ui). If you
don’t have the web ui running correctly, the mailgate won’t work.

Not running RT3 yet, but worried: we’ll need to be sure to document
how to make an rt-mailgate RPC failure appear to the MTA as a
transient error, so that mail received while the webserver is being
restarted gets queued for retry rather than bouncing.

-Rich

Rich Lafferty --------------±----------------------------------------------
Ottawa, Ontario, Canada | Save the Pacific Northwest Tree Octopus!
http://www.lafferty.ca/ | http://zapatopi.net/treeoctopus.html
rich@lafferty.ca -----------±----------------------------------------------

Not running RT3 yet, but worried: we’ll need to be sure to document
how to make an rt-mailgate RPC failure appear to the MTA as a
transient error, so that mail received while the webserver is being
restarted gets queued for retry rather than bouncing.

It should already be exiting with a TEMPFAIL.

-Rich


Rich Lafferty --------------±----------------------------------------------
Ottawa, Ontario, Canada | Save the Pacific Northwest Tree Octopus!
http://www.lafferty.ca/ | http://zapatopi.net/treeoctopus.html
rich@lafferty.ca -----------±----------------------------------------------


rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

�|� http://www.bestpractical.com/rt – Trouble Ticketing. Free.

501 Protocol scheme ‘https’ is not supported

Actually, I believe that would be your lib-www-perl not being built with
ssl support. But I’ll point our tech writer at this bit when she’s next
ready for installation guide details.

IIRC, it builds the wrappers by default. You need IO::Socket::SSL or
Net::SSL installed to enable it. (Which each has other dependencies.)

-R

Maybe I concluded so fast. The last test seemed to have succeeded, but after
all the changes, I see a failure still:

2003-02-14 19:22:47 18jibu-000NaZ-00 == |/opt/rt3/bin/rt-mailgate --queue cs --action correspond --url
http://rt3.wananchi.com/ rt@freebsd.or.ke R=system_aliases T=address_pipe defer (0): Child process of address_pipe transport
returned 75 (could mean temporary error) from command: /opt/rt3/bin/rt-mailgate

Forgive my stupidity. I had used a SSL virtualhost again.
It works!

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post

beastie# mv message.txt messagefile.txt
beastie# ./rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/ < messagefile.txt
An Error Occurred

501 Protocol scheme ‘https’ is not supported

Actually, I believe that would be your lib-www-perl not being built with
ssl support. But I’ll point our tech writer at this bit when she’s next
ready for installation guide details.

I have recompiled my server, with ssl support in mod_perl, so I am heading
back to https again just for the feel of it, to try-verify this observation.

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post

beastie# mv message.txt messagefile.txt
beastie# ./rt-mailgate --queue cs --action correspond --url https://rt3.wananchi.com/ < messagefile.txt
An Error Occurred

501 Protocol scheme ‘https’ is not supported

Actually, I believe that would be your lib-www-perl not being built with
ssl support. But I’ll point our tech writer at this bit when she’s next
ready for installation guide details.

More feedback. I have (I believe) met the condition above, building modperl1
with ssl support. Actually I am not quite certain about it :wink:
My rt3 is running under fastcgi. When I attempt to run with modperl my
httpd core dumps.

I used the script below to build this stuff, so maybe someone can spot an error in
my script??

#!/bin/sh

APACHE="apache_1.3.27"
MOD_PERL=“mod_perl-1.27"
MOD_SSL=“mod_ssl-2.8.12-1.3.27"
SSL_BASE=”/usr/local”

PACKAGES="$APACHE $MOD_PERL $MOD_SSL"

for package in $PACKAGES; do

if [ -d $package ]; then
echo removing $package
rm -rf $package
fi
if [ -f $package.tar.bz2 ]; then
tar xfvy $package.tar.bz2
else
tar xfvz $package.tar.gz
fi

done

cd $MOD_SSL
./configure --with-apache=…/$APACHE --with-ssl=/usr --enable-shared=ssl --with-mm=/usr/local
cd …/$MOD_PERL
perl Makefile.PL DO_HTTPD=1 USE_APACI=1 APACHE_PREFIX=/usr/local EVERYTHING=1 SSL_BASE=/usr/local
APACI_ARGS=’–server-uid=www, --server-gid=www, --enable-module=so --enable-module=most, \
–enable-shared=max --disable-shared=perl, --enable-module=perl, --enable-module=ssl,
–enable-module=rewrite, --with-layout=…/FreeBSD.layout:FreeBSD, --without-confadjust’
make test; cd …/$APACHE; make certificate TYPE=custom
mv /usr/local/etc/apache/httpd.conf /usr/local/etc/apache/httpd.conf.OLD
cd …/mod_perl-1.27; make install

    cheers
   - wash 

Odhiambo Washington, wash@wananchi.com . WANANCHI ONLINE LTD (Nairobi, KE) |
http://ns2.wananchi.com/~wash/ . 1ere Etage, Loita Hse, Loita St., |
GSM: (+254) 722 743 223 . # 10286, 00100 NAIROBI |
“Oh My God! They killed init! You Bastards!”
–from a /. post