Rt-mailgate HTTPS

I have seen list reference to email tickets not working with HTTPS configurations.
Some indicate that a local http connection must exist for the rt-mailgate to work

my current install is 3.6.5 using Lighttpd

Everything is working fine using the GUI.
but I cannot get emails to open tickets.
I have verified that I can actually receive smtp mail sent to a user on the box.

  • I redirect my http to https
  • my /etc/aliases point to the https url
    -my lighttpd.conf is below;

$SERVER[“socket”] == “xx.xx.xx.xx:80” {
#server.document-root = “/”
server.document-root = “/opt/rt3/share/html/”
url.redirect = (
“^/(.*)” => “https://mysite/$1
)
}

$SERVER[“socket”] == “xx.xx.xx.xx:443” {
server.document-root = “/opt/rt3/share/html/”
url.rewrite = (
“^(.)/Ticket/Attachment/(.)” => “/$1/Ticket/Attachment/$2/”
)

fastcgi.map-extensions = ( “.css” => “.html”, “.js” => “.html”, “/” => “.html” )
ssl.engine = “enable”
ssl.pemfile = “/etc/lighttpd/ssl/domain.com/server.pem”
$HTTP[“useragent”] =~ “.MSIE.” {server.max-keep-alive-requests = 0 }
}

I do not know where best to try and resolve this …( web config or rt-mailgate )

I would be very grateful if someone could point me in the right direction on what or where to go from here.

Thanks
Roy

First of all, what error messages were generated when you tried to send
email to the RT address via bounced emails or from RT/mail logs?

Secondly, rt-mailgate works just fine with HTTPS only installs - you’ve got
to make sure that all your SSL related PERL modules have been installed,
namely Crypt::SSLeay

Lastly, what do your aliases look like?

James Moseley

         "Roy Sowa"                                                    
         <Roy.Sowa@rcmp-gr                                             
         c.gc.ca>                                                   To 
         Sent by:                  <rt-users@lists.bestpractical.com>  
         rt-users-bounces@                                          cc 
         lists.bestpractic                                             
         al.com                                                Subject 
                                   [rt-users] rt-mailgate HTTPS        
                                                                       
         01/20/2008 08:11                                              
         AM                                                            

I have seen list reference to email tickets not working with HTTPS
configurations.
Some indicate that a local http connection must exist for the rt-mailgate
to work

my current install is 3.6.5 using Lighttpd

Everything is working fine using the GUI.
but I cannot get emails to open tickets.
I have verified that I can actually receive smtp mail sent to a user on the
box.

  • I redirect my http to https
  • my /etc/aliases point to the https url
    -my lighttpd.conf is below;

$SERVER[“socket”] == “xx.xx.xx.xx:80” {
#server.document-root = “/”
server.document-root = “/opt/rt3/share/html/”
url.redirect = (
“^/(.*)” => “https://mysite/$1
)
}

$SERVER[“socket”] == “xx.xx.xx.xx:443” {
server.document-root = “/opt/rt3/share/html/”
url.rewrite = (
“^(.)/Ticket/Attachment/(.)” => “/$1/Ticket/Attachment/$2/”
)

fastcgi.map-extensions = ( “.css” => “.html”, “.js” => “.html”,
“/” => “.html” )
ssl.engine = “enable”
ssl.pemfile = “/etc/lighttpd/ssl/domain.com/server.pem”
$HTTP[“useragent”] =~ “.MSIE.” {server.max-keep-alive-requests = 0 }
}

I do not know where best to try and resolve this …( web config or
rt-mailgate )

I would be very grateful if someone could point me in the right direction
on what or where to go from here.

Thanks
Roy

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Thanks James,
i have provided the info below, and while still stuggling, I have tried to set things up to use either HTTPS or HTTP
Ihave that going now, and either one works fine with the GUI.
Still cannot get an email through .
That is why you will see one http alias in the list.
So I am still working my way backwards…
Thanks for your time
If you need more info just ask ( also this is all new to me so I might not always know how to get what you ask for )

Error from a bounce;

RT server error.

The RT server which handled your email did not behave as expected. It
said:

%# BEGIN BPS TAGGED BLOCK {{{
<%flags>
inherit => undef # inhibit UTF8 conversion done in /autohandler
</%flags>
<%ARGS>
$queue => 1
$action => “correspond”
$ticket => undef
</%ARGS>
<%init>
$m->comp(‘/Elements/Callback’, _CallbackName => ‘Pre’, %ARGS);
use RT::Interface::Email (); # It’s an exporter, but we don’t care
$r->content_type(‘text/plain; charset=utf-8’);
$m->error_format(‘text’);
my ( $status, $error, $Ticket ) = RT::Interface::email::Gateway( %ARGS );
if ( $status == 1 ) {
$m->out(‘ok’);
if ( $Ticket->Id ) {
$m->out( 'Ticket: ’ . ($Ticket->Id || ‘’) );
$m->out( 'Queue: ’ . ($Ticket->QueueObj->Name || ‘’) );
$m->out( 'Owner: ’ . ($Ticket->OwnerObj->Name || ‘’) );
$m->out( 'Status: ’ . ($Ticket->Status || ‘’) );
$m->out( 'Subject: ’ . ($Ticket->Subject || ‘’) );
$m->out(
'Requestor: ’ . ($Ticket->Requestors->MemberEmailAddressesAsString || ‘’) );
}
}
else {
$RT::Logger->error( "Could not record email: " . $error );
if ( $status == -75 ) {
$m->out( "temporary failure - " . $error );
}
else {
$m->out( 'not ok - ’ . $error );
}
}
$m->abort();
</%init>

“|/opt/rt3/bin/rt-mailgate --queue ‘XXXXX’ --action correspond --url https://XXXXXXXXXXX/”… Deferred: prog mailer (/bin/sh) exited with EX_TEMPFAIL
Warning: message still undelivered after 4 hours

I saw that about the Crypt::SSLeay , so I installed
Crypt-SSLeay-0.57
stop started everything this did not help

Aliases:
Ticket_ELS: “|/opt/rt3/bin/rt-mailgate --queue ‘NAME1’ --action correspond --url https://xxxxxxx/
ELS_MSG: “|/opt/rt3/bin/rt-mailgate --queue ‘Name2’ --action correspond --url https://xxxxxxxx/
Ticket_EHIVE: “|/opt/rt3/bin/rt-mailgate --queue ‘Name3’ --action correspond --url http://xxxxxx/

James Moseley jmoseley@corp.xanadoo.com 2008-01-20 11:24 >>>
First of all, what error messages were generated when you tried to send
email to the RT address via bounced emails or from RT/mail logs?

Secondly, rt-mailgate works just fine with HTTPS only installs - you’ve got
to make sure that all your SSL related PERL modules have been installed,
namely Crypt::SSLeay

Lastly, what do your aliases look like?

James Moseley

         "Roy Sowa"                                                    
         <Roy.Sowa@rcmp-gr                                             
         c.gc.ca>                                                   To 
         Sent by:                  <rt-users@lists.bestpractical.com>  
         rt-users-bounces@                                          cc 
         lists.bestpractic                                             
         al.com                                                Subject 
                                   [rt-users] rt-mailgate HTTPS        
                                                                       
         01/20/2008 08:11                                              
         AM                                                            

I have seen list reference to email tickets not working with HTTPS
configurations.
Some indicate that a local http connection must exist for the rt-mailgate
to work

my current install is 3.6.5 using Lighttpd

Everything is working fine using the GUI.
but I cannot get emails to open tickets.
I have verified that I can actually receive smtp mail sent to a user on the
box.

  • I redirect my http to https
  • my /etc/aliases point to the https url
    -my lighttpd.conf is below;

$SERVER[“socket”] == “xx.xx.xx.xx:80” {
#server.document-root = “/”
server.document-root = “/opt/rt3/share/html/”
url.redirect = (
“^/(.*)” => “https://mysite/$1
)
}

$SERVER[“socket”] == “xx.xx.xx.xx:443” {
server.document-root = “/opt/rt3/share/html/”
url.rewrite = (
“^(.)/Ticket/Attachment/(.)” => “/$1/Ticket/Attachment/$2/”
)

fastcgi.map-extensions = ( “.css” => “.html”, “.js” => “.html”,
“/” => “.html” )
ssl.engine = “enable”
ssl.pemfile = “/etc/lighttpd/ssl/domain.com/server.pem”
$HTTP[“useragent”] =~ “.MSIE.” {server.max-keep-alive-requests = 0 }
}

I do not know where best to try and resolve this …( web config or
rt-mailgate )

I would be very grateful if someone could point me in the right direction
on what or where to go from here.

Thanks
Roy

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

more info…
I saw this on the list …
same scenario … I am moving to new hardware/versions and trying to do SSL
so I tried this as well… my error: Connecting to http://xxxxxxxxx/REST/1.0/NoAuth/mail-gateway at /opt/rt3/bin/rt-mailgate line 102, <> line 1.

-----------------------------------------------------------------------------------------------------------from the list below ( not me)

tried to move our RT installation to a new server (New: Debian Etch. Old: Debian Sarge). Copied the DB content and RT_SiteConfig.
Everything looks fine, but the mailgate does not work. When testing rt-mailgate manually I get the error:

cat mail | /usr/local/rt3/bin/rt-mailgate --debug --queue RT_Test --action correspond --url https://rt.ponton.local/
Connecting to https://rt.ponton.local//REST/1.0/NoAuth/mail-gateway at /usr/local/rt3/bin/rt-mailgate line 100, <> line 1.
Segmentation fault

The file mail contains:From: foo[at]bar.com
To: rt[at]ponton
Subject: Test

Test

The aliases appear to be correct. Do you have the following required RT
Mailgate Perl modules installed:

MAILGATE dependencies:
Pod::Usage…found
HTML::TreeBuilder…found
Getopt::Long…found
HTML::FormatText…found
LWP::UserAgent…found

You’ve also forced Lighty to redirect port 80 requests over to 443. Why
don’t you back out of that and try to get this working via port 80 first
and take SSL out of the mix?

Lastly, I remember from last week this was a new install and you were
switching from Apache to Lighty. I might be worth your while to get this
working with Apache and then move on to the Lighty. At least then you know
RT is fine and any errors that crop up are due to the Lighty config or
issues between RT and Lighty. You’ve introduced quite a few variables into
the equation…

James Moseley

         "Roy Sowa"                                                    
         <Roy.Sowa@rcmp-gr                                             
         c.gc.ca>                                                   To 
                                   <jmoseley@corp.xanadoo.com>         
         01/20/2008 11:06                                           cc 
         AM                        <rt-users@lists.bestpractical.com>, 
                                   <rt-users-bounces@lists.bestpractic 
                                   al.com>                             
                                                               Subject 
                                   Re: [rt-users] rt-mailgate HTTPS    

Thanks James,
i have provided the info below, and while still stuggling, I have tried
to set things up to use either HTTPS or HTTP
Ihave that going now, and either one works fine with the GUI.
Still cannot get an email through .
That is why you will see one http alias in the list.
So I am still working my way backwards…
Thanks for your time
If you need more info just ask ( also this is all new to me so I might
not always know how to get what you ask for )

Error from a bounce;

RT server error.

The RT server which handled your email did not behave as expected. It
said:

%# BEGIN BPS TAGGED BLOCK {{{
<%flags>
inherit => undef # inhibit UTF8 conversion done in /autohandler
</%flags>
<%ARGS>
$queue => 1
$action => “correspond”
$ticket => undef
</%ARGS>
<%init>
$m->comp(‘/Elements/Callback’, _CallbackName => ‘Pre’, %ARGS);
use RT::Interface::Email (); # It’s an exporter, but we don’t care
$r->content_type(‘text/plain; charset=utf-8’);
$m->error_format(‘text’);
my ( $status, $error, $Ticket ) = RT::Interface::email::Gateway( %ARGS );
if ( $status == 1 ) {
$m->out(‘ok’);
if ( $Ticket->Id ) {
$m->out( 'Ticket: ’ . ($Ticket->Id || ‘’) );
$m->out( 'Queue: ’ . ($Ticket->QueueObj->Name || ‘’) );
$m->out( 'Owner: ’ . ($Ticket->OwnerObj->Name || ‘’) );
$m->out( 'Status: ’ . ($Ticket->Status || ‘’) );
$m->out( 'Subject: ’ . ($Ticket->Subject || ‘’) );
$m->out(
'Requestor: ’ . ($Ticket->Requestors->MemberEmailAddressesAsString ||
‘’) );
}
}
else {
$RT::Logger->error( "Could not record email: " . $error );
if ( $status == -75 ) {
$m->out( "temporary failure - " . $error );
}
else {
$m->out( 'not ok - ’ . $error );
}
}
$m->abort();
</%init>

“|/opt/rt3/bin/rt-mailgate --queue ‘XXXXX’ --action correspond --url
https://XXXXXXXXXXX/”… Deferred: prog mailer (/bin/sh) exited with
EX_TEMPFAIL
Warning: message still undelivered after 4 hours

I saw that about the Crypt::SSLeay , so I installed
Crypt-SSLeay-0.57
stop started everything this did not help

Aliases:
Ticket_ELS: “|/opt/rt3/bin/rt-mailgate --queue ‘NAME1’ --action
correspond --url https://xxxxxxx/
ELS_MSG: “|/opt/rt3/bin/rt-mailgate --queue ‘Name2’ --action
correspond --url https://xxxxxxxx/
Ticket_EHIVE: “|/opt/rt3/bin/rt-mailgate --queue ‘Name3’ --action
correspond --url http://xxxxxx/

James Moseley jmoseley@corp.xanadoo.com 2008-01-20 11:24 >>>
First of all, what error messages were generated when you tried to send
email to the RT address via bounced emails or from RT/mail logs?

Secondly, rt-mailgate works just fine with HTTPS only installs - you’ve got
to make sure that all your SSL related PERL modules have been installed,
namely Crypt::SSLeay

Lastly, what do your aliases look like?

James Moseley

         "Roy Sowa"
         <Roy.Sowa@rcmp-gr
         c.gc.ca>                                                   To
         Sent by:                  <rt-users@lists.bestpractical.com>
         rt-users-bounces@                                          cc
         lists.bestpractic
         al.com                                                Subject
                                   [rt-users] rt-mailgate HTTPS

         01/20/2008 08:11
         AM

I have seen list reference to email tickets not working with HTTPS
configurations.
Some indicate that a local http connection must exist for the rt-mailgate
to work

my current install is 3.6.5 using Lighttpd

Everything is working fine using the GUI.
but I cannot get emails to open tickets.
I have verified that I can actually receive smtp mail sent to a user on the
box.

  • I redirect my http to https
  • my /etc/aliases point to the https url
    -my lighttpd.conf is below;

$SERVER[“socket”] == “xx.xx.xx.xx:80” {
#server.document-root = “/”
server.document-root = “/opt/rt3/share/html/”
url.redirect = (
“^/(.*)” => “https://mysite/$1
)
}

$SERVER[“socket”] == “xx.xx.xx.xx:443” {
server.document-root = “/opt/rt3/share/html/”
url.rewrite = (
“^(.)/Ticket/Attachment/(.)” => “/$1/Ticket/Attachment/$2/”
)

fastcgi.map-extensions = ( “.css” => “.html”, “.js” => “.html”,
“/” => “.html” )
ssl.engine = “enable”
ssl.pemfile = “/etc/lighttpd/ssl/domain.com/server.pem”
$HTTP[“useragent”] =~ “.MSIE.” {server.max-keep-alive-requests = 0 }
}

I do not know where best to try and resolve this …( web config or
rt-mailgate )

I would be very grateful if someone could point me in the right direction
on what or where to go from here.

Thanks
Roy

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

This output suggest me that you’ve disabled mason for /NoAuth/… paph.On Jan 20, 2008 8:06 PM, Roy Sowa Roy.Sowa@rcmp-grc.gc.ca wrote:

Thanks James,
i have provided the info below, and while still stuggling, I have tried to set things up to use either HTTPS or HTTP
Ihave that going now, and either one works fine with the GUI.
Still cannot get an email through .
That is why you will see one http alias in the list.
So I am still working my way backwards…
Thanks for your time
If you need more info just ask ( also this is all new to me so I might not always know how to get what you ask for )

Error from a bounce;

RT server error.

The RT server which handled your email did not behave as expected. It
said:

%# BEGIN BPS TAGGED BLOCK {{{
<%flags>
inherit => undef # inhibit UTF8 conversion done in /autohandler
</%flags>
<%ARGS>
$queue => 1
$action => “correspond”
$ticket => undef
</%ARGS>
<%init>
$m->comp(‘/Elements/Callback’, _CallbackName => ‘Pre’, %ARGS);
use RT::Interface::Email (); # It’s an exporter, but we don’t care
$r->content_type(‘text/plain; charset=utf-8’);
$m->error_format(‘text’);
my ( $status, $error, $Ticket ) = RT::Interface::email::Gateway( %ARGS );
if ( $status == 1 ) {
$m->out(‘ok’);
if ( $Ticket->Id ) {
$m->out( 'Ticket: ’ . ($Ticket->Id || ‘’) );
$m->out( 'Queue: ’ . ($Ticket->QueueObj->Name || ‘’) );
$m->out( 'Owner: ’ . ($Ticket->OwnerObj->Name || ‘’) );
$m->out( 'Status: ’ . ($Ticket->Status || ‘’) );
$m->out( 'Subject: ’ . ($Ticket->Subject || ‘’) );
$m->out(
'Requestor: ’ . ($Ticket->Requestors->MemberEmailAddressesAsString || ‘’) );
}
}
else {
$RT::Logger->error( "Could not record email: " . $error );
if ( $status == -75 ) {
$m->out( "temporary failure - " . $error );
}
else {
$m->out( 'not ok - ’ . $error );
}
}
$m->abort();
</%init>

“|/opt/rt3/bin/rt-mailgate --queue ‘XXXXX’ --action correspond --url https://XXXXXXXXXXX/”… Deferred: prog mailer (/bin/sh) exited with EX_TEMPFAIL
Warning: message still undelivered after 4 hours

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I saw that about the Crypt::SSLeay , so I installed
Crypt-SSLeay-0.57
stop started everything this did not help

Aliases:
Ticket_ELS: “|/opt/rt3/bin/rt-mailgate --queue ‘NAME1’ --action correspond --url https://xxxxxxx/
ELS_MSG: “|/opt/rt3/bin/rt-mailgate --queue ‘Name2’ --action correspond --url https://xxxxxxxx/
Ticket_EHIVE: “|/opt/rt3/bin/rt-mailgate --queue ‘Name3’ --action correspond --url http://xxxxxx/

James Moseley jmoseley@corp.xanadoo.com 2008-01-20 11:24 >>>

First of all, what error messages were generated when you tried to send
email to the RT address via bounced emails or from RT/mail logs?

Secondly, rt-mailgate works just fine with HTTPS only installs - you’ve got
to make sure that all your SSL related PERL modules have been installed,
namely Crypt::SSLeay

Lastly, what do your aliases look like?

James Moseley

         "Roy Sowa"
         <Roy.Sowa@rcmp-gr
         c.gc.ca>                                                   To
         Sent by:                  <rt-users@lists.bestpractical.com>
         rt-users-bounces@                                          cc
         lists.bestpractic
         al.com                                                Subject
                                   [rt-users] rt-mailgate HTTPS

         01/20/2008 08:11
         AM

I have seen list reference to email tickets not working with HTTPS
configurations.
Some indicate that a local http connection must exist for the rt-mailgate
to work

my current install is 3.6.5 using Lighttpd

Everything is working fine using the GUI.
but I cannot get emails to open tickets.
I have verified that I can actually receive smtp mail sent to a user on the
box.

  • I redirect my http to https
  • my /etc/aliases point to the https url
    -my lighttpd.conf is below;

$SERVER[“socket”] == “xx.xx.xx.xx:80” {
#server.document-root = “/”
server.document-root = “/opt/rt3/share/html/”
url.redirect = (
“^/(.*)” => “https://mysite/$1
)
}

$SERVER[“socket”] == “xx.xx.xx.xx:443” {
server.document-root = “/opt/rt3/share/html/”
url.rewrite = (
“^(.)/Ticket/Attachment/(.)” => “/$1/Ticket/Attachment/$2/”
)

fastcgi.map-extensions = ( “.css” => “.html”, “.js” => “.html”,
“/” => “.html” )
ssl.engine = “enable”
ssl.pemfile = “/etc/lighttpd/ssl/domain.com/server.pem”
$HTTP[“useragent”] =~ “.MSIE.” {server.max-keep-alive-requests = 0 }
}

I do not know where best to try and resolve this …( web config or
rt-mailgate )

I would be very grateful if someone could point me in the right direction
on what or where to go from here.

Thanks
Roy


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Best regards, Ruslan.

That little hint was what I needed , thanks Ruslan
It was not intentional, trust me !!!
Although everything was working using the GUI,
I had numerous ownership and permission confusion throughout my install.
The most glaring, carrying over the apache user in my rt group as it was on my original system
and now running lighttpd as a different user name.

Thanks to you all , for your help and patience.

“Ruslan Zakirov” ruz@bestpractical.com 2008-01-20 13:35 >>>
This output suggest me that you’ve disabled mason for /NoAuth/… paph.

Best regards, Ruslan.