[rt-users] rt-mailgate HTTPS

James Moseley jmoseley at corp.xanadoo.com
Sun Jan 20 12:33:17 EST 2008

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

MAILGATE dependencies:

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 at rcmp-gr                                             
             c.gc.ca>                                                   To 
                                       <jmoseley at corp.xanadoo.com>         
             01/20/2008 11:06                                           cc 
             AM                        <rt-users at lists.bestpractical.com>, 
                                       <rt-users-bounces at lists.bestpractic 
                                       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

inherit => undef # inhibit UTF8 conversion done in /autohandler
$queue => 1
$action => "correspond"
$ticket => undef
$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');
my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway( \%ARGS );
if ( $status == 1 ) {
  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        || '') );
      '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 );

"|/opt/rt3/bin/rt-mailgate --queue 'XXXXX' --action correspond --url
https://XXXXXXXXXXX/"... Deferred: prog mailer (/bin/sh) exited with
Warning: message still undelivered after 4 hours

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

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 at 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 at rcmp-gr
             c.gc.ca>                                                   To
             Sent by:                  <rt-users at lists.bestpractical.com>
             rt-users-bounces@                                          cc
             al.com                                                Subject
                                       [rt-users] rt-mailgate HTTPS

             01/20/2008 08:11

I have seen list reference to email tickets not working with HTTPS
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

-  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.



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

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

More information about the rt-users mailing list