Re: [rt-users] using HTTPS: RT complains about $WebPort

2014-06-10 Thread Christian Lyra
Hi,

I just hit the same problem today. But my case is slight different, because
my RT is behind a NAT/Apache proxy, and I have users outside and inside
that network.  It also complained about a possible cross-site requestr
forgery but setting @ReferrerWhitelist solved it.

So it's not possible to have RT accept requests on two or more web ports
without complaining?


On Tue, Jun 10, 2014 at 9:14 PM, Alex Peters a...@peters.net wrote:

 I don't think RT can be configured that way.

 Consider setting up RT for port 443 only, and setting up the web server to
 redirect requests on port 80 to identical locations on port 443.  This
 should deliver the same end user experience with the benefit of coaxing
 users to move over to port 443.
 On 07/06/2014 10:54 am, Florin Andrei flo...@andrei.myip.org wrote:

 After opening port 443 and enabling SSL in the web server, RT complains
 all the time about this:

 [warning]: The requested port (443) does NOT match the configured WebPort
 (80).  Perhaps you should Set($WebPort, 443); in RT_SiteConfig.pm,
 otherwise your internal links may be broken.

 Yes, $WebPort is set to 80 in RT_Config.pm, it's the default value. But
 right now I have both 80 and 443 open, and a mix of clients using both. Is
 there a way to tell RT that both ports are okay?


 --
 Florin Andrei
 http://florin.myip.org/
 --
 RT Training - Boston, September 9-10
 http://bestpractical.com/training


 --
 RT Training - Boston, September 9-10
 http://bestpractical.com/training




-- 
Christian Lyra
PoP-PR/RNP
(41) 3361-3343
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

[rt-users] Help with mailgate after upgrade

2013-11-01 Thread Christian Lyra
Hi,

I had a working RT 4.0.4 and did the upgrade to the new 4.2.0. Upgrade went
fine after all the make testdeps/fixdeps/upgrade/upgrade-database but now
the mailgate is broken! My system is a debian stable and the latest perl
libraries from CPAN (installed with make fixdeps). When I try to open a
ticket by email I got the following:

from apache error log:

[14196] [Fri Nov  1 17:03:04 2013] [warning]: Use of uninitialized value
$NewSubject in scalar chomp at /opt/rt4/sbin/../lib/RT/Interface/Email.pm
line 1330. (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1330)
[14196] [Fri Nov  1 17:03:04 2013] [error]: Couldn't parse or find sender's
address (/opt/rt4/sbin/../lib/RT/Interface/Email/Auth/MailFrom.pm:74)
[14196] [Fri Nov  1 17:03:04 2013] [error]: Could not record email: Could
not load a valid user (/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:75)

from procmail:

--- Logging /home/rt/procmail.log for rt, procmail: [17692] Fri Nov  1
15:03:02 2013
procmail: Assigning MAILDOMAIN=mydomain
procmail: Assigning RT_MAILGATE=/opt/rt4/bin/rt-mailgate
procmail: Assigning RT_URL=http://mydomain/rt;
procmail: Assigning LOGABSTRACT=all
procmail: Executing formail -c -xTo: |grep $MAILDOMAIN |sed -e 's/.*for
**\(.*\)* *;.*$/\1/'
procmail: Assigning TO= rti@mydomain rti@mydomain
procmail: Executing echo $TO| $HOME/get_queue.pl
procmail: Assigning QUEUE=rti
procmail: Executing echo $TO| $HOME/get_action.pl
procmail: Assigning ACTION=correspond
procmail: Executing
/usr/bin/perl,/opt/rt4/bin/rt-mailgate,--debug,--queue,rti,--action,correspond,--url,
http://mydomain/rt;
/opt/rt4/bin/rt-mailgate: temp file is '/tmp/kb3fog0szG/3wYOMoZmOS'
/opt/rt4/bin/rt-mailgate: connecting to
http://mydomain/rt/REST/1.0/NoAuth/mail-gateway
not ok - Could not load a valid user

procmail: [17692] Fri Nov  1 15:03:04 2013
procmail: Assigning LASTFOLDER=/usr/bin/perl /opt/rt4/bin/rt-mailgate
--debug --queue rti --action correspond --url http://mydomain/rt;
procmail: Notified comsat: rt@:/usr/bin/perl /opt/rt4/bin/rt-mailgate
--debug --queue rti --action correspond --url http://mydomain/rt;
From lyra@mydomain  Fri Nov  1 15:03:02 2013
 Subject: Teste N1
  Folder: /usr/bin/perl /opt/rt4/bin/rt-mailgate --debug --queue rti -
   2666

Now the strange part: If i try to open the ticket from command line as:

cat email.txt | /opt/rt4/bin/rt-mailgate --debug --queue rti --action
correspond --url http://mydomain/rt
/opt/rt4/bin/rt-mailgate: temp file is '/tmp/8JZz6PkHMz/d_rvgfpGHN'
/opt/rt4/bin/rt-mailgate: connecting to
http://mydomain/rt/REST/1.0/NoAuth/mail-gateway
ok
Ticket: 67098
Queue: RTI
Owner: Nobody
Status: new
Subject: Teste N1
Requestor: lyra@mydomain

It works! Any clues?


-- 
Christian Lyra
PoP-PR/RNP


Re: [rt-users] Help with mailgate after upgrade

2013-11-01 Thread Christian Lyra
Hi,

 I think you are right, but something has changed between versions. Digging
a little further I found that fetchmail/procmail is adding a line like
From rt  Fri Nov  1 18:08:01 2013 at the top of the headers! It seems
that this line was not parsed before but now it is and cause all that
problem! Removing -f %F from procmail seem to solve that. Not sure about
what this would break next :-)



On Fri, Nov 1, 2013 at 5:54 PM, Kevin Falcone falc...@bestpractical.comwrote:

 On Fri, Nov 01, 2013 at 03:36:00PM -0200, Christian Lyra wrote:
 [14196] [Fri Nov 1 17:03:04 2013] [warning]: Use of uninitialized
 value $NewSubject in scalar
 chomp at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line 1330.
 (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1330)
 [14196] [Fri Nov 1 17:03:04 2013] [error]: Couldn't parse or find
 sender's address
 (/opt/rt4/sbin/../lib/RT/Interface/Email/Auth/MailFrom.pm:74)

 These two errors imply that the email RT receives does not have a
 Subject: line (the warning) or any of Reply-To:, From:, Sender: (second
 error)

 I'd be looking at what in your formail/procmail/get_*.pl scrips is
 munging the mail before delivery to RT.

 It doesn't appear to be an RT error since piping the mail directly to
 rt-mailgate (as your later test shows) works as expected.

 -kevin




-- 
Christian Lyra
PoP-PR/RNP