Re: [rt-users] Some external users not being AutoCreate'd

2014-02-10 Thread Mathew Snyder
A user who sends in an email for the first time should generate an
unprivileged account which sets the username as the email address. It
doesn't exist so it should be created.
On Feb 9, 2014 9:09 PM, Gerald Vogt v...@spamcop.net wrote:

 On 10.02.2014 06:46, Mathew Snyder wrote:
 ...
  [15816] [Fri Feb  7 05:29:01 2014] [debug]: Going to create user with
  address 'user.exam...@gmail.com mailto:user.exam...@gmail.com'
  (/opt/rt4/sbin/../lib/RT/Interface/Email/Auth/MailFrom.pm:100)
 ...
  [15816] [Fri Feb  7 05:29:01 2014] [info]:
  RT::Authen::ExternalAuth::CanonicalizeUserInfo returning Comments:
  Autocreated on ticket submission, Disabled: , EmailAddress:
  u...@example.com mailto:u...@example.com, Name: user, Password: ,
  Privileged: , RealName: User Example
 
 (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:685)

 If these logs are correct then the user has two or more  email addresses
 in LDAP and u...@example.com is already in the RT database. The user
 sends from the second address user.exam...@gmail.com. This is not
 supported (yet).

 Users with multiple email addresses in LDAP are not supported (even
 though some docs say otherwise). We have just discussed this recently.
 See this thread:

 http://lists.bestpractical.com/pipermail/rt-users/2014-January/082549.html

 The user must use the email address in the RT database. Mails from any
 other email address in LDAP is rejected because the user already exists
 in the RT database.

 You may try to manually create a second RT user with the second email
 address and then use the MergeUser extension to merge the accounts.

 -Gerald



Re: [rt-users] Some external users not being AutoCreate'd

2014-02-10 Thread Gerald Vogt
On 10.02.2014 09:29, Mathew Snyder wrote:
 A user who sends in an email for the first time should generate an
 unprivileged account which sets the username as the email address. It
 doesn't exist so it should be created.

The user has been created with e-mail address u...@example.com mapping
to user name user.

Now the user sends e-mail from e-mail address user.exam...@gmail.com
which you map to the same user user with LDAP. That's not supported.
That would mean the same LDAP user has two e-mail addresses.

You match users in LDAP using either of these attributes:

'attr_match_list' = [
'Name',
'EmailAddress',
'RealName',
],

If you don't have the gmail address in LDAP then it's probably the real
name which matches. With your configuration you can only have one RT
account for each real name. Thus if there is another Mathew Snyder
with a different e-mail address it gets rejected because again.

You don't want RealName in attr_match_list unless you are sure that each
real name will only match to a single person with a single e-mail address.

-Gerald




 
 On Feb 9, 2014 9:09 PM, Gerald Vogt v...@spamcop.net
 mailto:v...@spamcop.net wrote:
 
 On 10.02.2014 06:46, Mathew Snyder wrote:
 ...
  [15816] [Fri Feb  7 05:29:01 2014] [debug]: Going to create user with
  address 'user.exam...@gmail.com mailto:user.exam...@gmail.com
 mailto:user.exam...@gmail.com mailto:user.exam...@gmail.com'
  (/opt/rt4/sbin/../lib/RT/Interface/Email/Auth/MailFrom.pm:100)
 ...
  [15816] [Fri Feb  7 05:29:01 2014] [info]:
  RT::Authen::ExternalAuth::CanonicalizeUserInfo returning Comments:
  Autocreated on ticket submission, Disabled: , EmailAddress:
  u...@example.com mailto:u...@example.com
 mailto:u...@example.com mailto:u...@example.com, Name: user,
 Password: ,
  Privileged: , RealName: User Example
 
 
 (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:685)
 
 If these logs are correct then the user has two or more  email addresses
 in LDAP and u...@example.com mailto:u...@example.com is already in
 the RT database. The user
 sends from the second address user.exam...@gmail.com
 mailto:user.exam...@gmail.com. This is not
 supported (yet).
 
 Users with multiple email addresses in LDAP are not supported (even
 though some docs say otherwise). We have just discussed this recently.
 See this thread:
 
 http://lists.bestpractical.com/pipermail/rt-users/2014-January/082549.html
 
 The user must use the email address in the RT database. Mails from any
 other email address in LDAP is rejected because the user already exists
 in the RT database.
 
 You may try to manually create a second RT user with the second email
 address and then use the MergeUser extension to merge the accounts.
 
 -Gerald
 



[rt-users] reply via email as comment

2014-02-10 Thread Paul Warren
Hi all,

I've been asked by my support team to configure RT to treat replies via email 
as comments, for a single queue only.  I'm new to RT and don't really know how 
to do that!

Specifically, when staff reply to a ticket notification email, they do not want 
that reply to go to the requestor.

I had thought that having the default '$QUEUE'@example.com be the 'comments' 
email in my /etc/aliases might work, but that means no tickets are created when 
sent to that address.

I don't think setting the $SetOutgoingMailFrom and OverrideOutgoingMailFrom are 
quite what I need.

Is this something  I should be doing as a scrip?

Apparently, they've had this working previously, from a different sysadmin, 
then RT was upgraded to 4.0, and it hasn't worked since. Of course, no-one 
remembers how it was done, and there was no documentation made!

Thanks for your time!
--
Paul Warren



Re: [rt-users] Problem : A custom field edited via REST will be disabled

2014-02-10 Thread Kevin Falcone
On Mon, Feb 10, 2014 at 02:16:50PM +0100, Sylvain Auguy wrote:
Ok my bad... It does as you said Kevin, but I still have a problem. The 
 new customer field
values are not recognized properly by the pages Modify.html and 
 ModifyAll.html and it acts as
if these fields were without any value (while they appear correctly on 
 Display.html).
When I perform a request with the mysql CLI client, the display is very 
 weird. While it is
correct with a graphical client like mysql workbench.
You can see it on the attached screenshots (the 3 last lines are the 
 custom fields which have
a problem).
Any idea why these outputs differ depending on the mysql client and why it 
 interferes with RT
behavior ?

The mysql command line client is probably correctly representing the
data in the field while mysqlbench is papering over formatting errors.

I assume you have extraneous whitespace / line endings, most likely \r
from using a windows machine..

You may be able to see better if you run your mysql command line query
with a trailing \G or by running the Content column through mysql's
HEX() function so you can see the literal characters.

Since those Content values have bogus line endings, they don't match
the CustomFieldValues in RT, so Modify.html won't be able to tell that
the values are the same.

So - figuring out why your REST client is sending bogus line endings
on trailing characters would be high on the short list of things to
check.

-kevin


pgppiOhnUog4B.pgp
Description: PGP signature


Re: [rt-users] reply via email as comment

2014-02-10 Thread Kevin Falcone
On Mon, Feb 10, 2014 at 04:35:42PM +1100, Paul Warren wrote:
I've been asked by my support team to configure RT to treat replies via 
 email as comments, for
a single queue only.  I'm new to RT and don't really know how to do that!
 
Specifically, when staff reply to a ticket notification email, they do not 
 want that reply to
go to the requestor.
 
I had thought that having the default `$QUEUE'@example.com be the 
 `comments' email in my
/etc/aliases might work, but that means no tickets are created when sent 
 to that address.

You should be able to create tickets when sending mail to a --action
comment email address.  I do it.  If you want to know what's wrong,
you'll need to show your config and logs.

Alternatively, you can just disable all the On Correspond Notify
Requestor (and CC, and one time recipients) in that Queue, which would
mean that nobody could ever send them email from that queue.

-kevin


pgpRGvwYPsGGI.pgp
Description: PGP signature


[rt-users] rt-importer in 4.2.2 with a typo?

2014-02-10 Thread ms
Hi,

I was trying to migrate from mysql to pgsql with a 4.2.2 installation.

The 4.2.2 installation ran just fine.

I then had to run ./configure again with --with-db-type=Pg to get the
missing dependencies via 'make fixdeps'.

I then ran rt-serializer --clone --directory /root/rt422-mysql/
which completed just fine after bumping up the VM to 2gigs of memory

Next up I prepared the pgsql database:

rt-setup-database --action=create,acl,schema
#as per documentation, no action=init for a clone

Now I tried to import that:

rt-importer /root/rt422-mysql/

However, this almost immediately fails with:

[11764] [Mon Feb 10 18:12:01 2014] [warning]:
Can't read /root/rt422-mysql/root/rt422-mysql/001.dat: No such file or
directory at /opt/rt4/sbin/../lib/RT/Migrate/Importer/File.pm line 102.
(/opt/rt4/sbin/../lib/RT/Migrate/Importer/File.pm:97)


As you can see it doubles the path because its looking for 001.dat in
the wrong place. Is this a typo somewhere within the rt-importer script
or did I do something wrong?


Kind regards,
ms


Re: [rt-users] rt-importer in 4.2.2 with a typo?

2014-02-10 Thread Kevin Falcone
On Mon, Feb 10, 2014 at 07:14:58PM +0100, m...@fv-berlin.de wrote:
 Now I tried to import that:
 
 rt-importer /root/rt422-mysql/
 
 However, this almost immediately fails with:
 
 [11764] [Mon Feb 10 18:12:01 2014] [warning]:
 Can't read /root/rt422-mysql/root/rt422-mysql/001.dat: No such file or
 directory at /opt/rt4/sbin/../lib/RT/Migrate/Importer/File.pm line 102.
 (/opt/rt4/sbin/../lib/RT/Migrate/Importer/File.pm:97)

Sounds like the bug fixed in this branch, which should get merged down
for 4.2.3, but you can patch it in manually (or use a relative path
for now).

https://github.com/bestpractical/rt/compare/4.2;importer-abs-paths

-kevin


pgpB4OXJFS6mi.pgp
Description: PGP signature


Re: [rt-users] Slow RT after moving DB on another server

2014-02-10 Thread Kevin Falcone
On Mon, Feb 10, 2014 at 12:55:49AM +0100, Jan Niezbędny wrote:
A few days ago i moved my RT (v4.0.4) database (MySQL) to another server. 
 Of course
I introduced relevant configuration indicating where the base is located. 
 From
that moment to log on to the program is a big problem. And when you will
succeed it works very slowly.
 
The logs do not have anything specific on this topic. Do you have any idea 
 how
to check what could be wrong?

Generally this means that there are problems communicating between the
servers.  Manually connect from the web server to the database server
and see how long it takes to run something like select * from Users
where name = 'root'.  Most often this is network problems or dns
problems or something similar.

See the recent discussions on this list about how Rt performs when
talking to a Postgres install with unpredictable and occasionally very
high latency.

-kevin


pgpvWc0SVdZ3C.pgp
Description: PGP signature


Re: [rt-users] Forwarding an e-mail with an HTML alternative

2014-02-10 Thread Kevin Falcone
On Fri, Feb 07, 2014 at 09:44:48PM +0100, Martin Drašar wrote:
 Hmm... so I have just hacked the Template.pm _DowngradeFromHTML() to
 check for multipart/alternative in transaction and supply the
 text/plain part from it, instead of using the HTML::TreeBuilder and
 HTML::FormatText. Seems to work like a charm.
 
 Now I wonder, when it's going to bite me :-)

In the future, if you report bugs, please mention this local
modification.

-kevin


pgpYeQC2EF31i.pgp
Description: PGP signature


Re: [rt-users] Trying to get RT4.2.2 to use mysql and not sqllite3

2014-02-10 Thread Kevin Falcone
On Fri, Feb 07, 2014 at 12:30:45PM -0500, john boris wrote:
Kevin,
Thanks for the reply. I reran the script and selected mysql (which I did 
 originally) it had an
error at the end and I had a choice to retry, abort, retry (skip 
 questions) so I said retry
and it asked me the questions again and I answered as before and the 
 script ended without an
error. I went into Mysql with phpmyadmin and the database was created by 
 when I go to the web
address I now get
 
  * Config file /etc/request-tracker4/RT_SiteConfig.pm is locked
 
I checked all of my windows and I don't have it opened anywhere.
I restarted the server just in case but I still get the message.

You would need to show the errors you get and show your RT log errors.
The RT_SiteConfig.pm being locked implies you ran but failed to
complete the Web Installer (or that the Debian installer uses this
behavior too).

You could manually change permissions on that file, but I'd want to
know how it got to that state.

-kevin


pgpLs_CljBKEi.pgp
Description: PGP signature


[rt-users] rt command error

2014-02-10 Thread Xin, Qiao
Hi,

We upgraded rt from 4.0.5 to 4.0.17 and rt command line client failed after the 
upgrading.

# /opt/rt/bin/rt ls 18990
Query:id=18990
   Strong encryption not available, switched off by externalauth=0
   Password will be sent to rt.mydomin.com over SSL
   Press CTRL-C now if you do not want to continue
Password:
rt: Server error: Can't connect to rt.mydomin.com:443 (certificate verify 
failed) (500)

We are using self-signed certificate for the site. Please advise.

Below is .rtrc file

server  https://rt.mydomain.com/
usertest


Thanks,
Qiao

---
SC-ISAC, DSIT
(803)896-0597
q...@cio.sc.gov


Re: [rt-users] Some external users not being AutoCreate'd

2014-02-10 Thread Mathew Snyder
-Mathew

When you do things right, people won't be sure you've done anything at
all. - God; Futurama

We'll get along much better once you accept that you're wrong and neither
am I. - Me


On Mon, Feb 10, 2014 at 1:13 AM, Gerald Vogt v...@spamcop.net wrote:

 On 10.02.2014 09:29, Mathew Snyder wrote:
  A user who sends in an email for the first time should generate an
  unprivileged account which sets the username as the email address. It
  doesn't exist so it should be created.

 The user has been created with e-mail address u...@example.com mapping
 to user name user.

 Now the user sends e-mail from e-mail address user.exam...@gmail.com
 which you map to the same user user with LDAP. That's not supported.
 That would mean the same LDAP user has two e-mail addresses.

 You match users in LDAP using either of these attributes:

 'attr_match_list' = [
 'Name',
 'EmailAddress',
 'RealName',
 ],

 If you don't have the gmail address in LDAP then it's probably the real
 name which matches. With your configuration you can only have one RT
 account for each real name. Thus if there is another Mathew Snyder
 with a different e-mail address it gets rejected because again.

 You don't want RealName in attr_match_list unless you are sure that each
 real name will only match to a single person with a single e-mail address.


I asked the person that is doing most of the grunt work to look into this.
Rather than comment out the RealName setting under attr_match_list he
commented it out under attr_map. This seems to have ad the same effect as
it no longer creates a second account with the same real name as another
that is in LDAP.

I'm not entirely sure why RT should care about a person's actual name. The
username is really all that is relevant. This seems to be a failure on the
designers part, as far as I'm concerned.




 -Gerald




 
  On Feb 9, 2014 9:09 PM, Gerald Vogt v...@spamcop.net
  mailto:v...@spamcop.net wrote:
 
  On 10.02.2014 06:46, Mathew Snyder wrote:
  ...
   [15816] [Fri Feb  7 05:29:01 2014] [debug]: Going to create user
 with
   address 'user.exam...@gmail.com mailto:user.exam...@gmail.com
  mailto:user.exam...@gmail.com mailto:user.exam...@gmail.com'
   (/opt/rt4/sbin/../lib/RT/Interface/Email/Auth/MailFrom.pm:100)
  ...
   [15816] [Fri Feb  7 05:29:01 2014] [info]:
   RT::Authen::ExternalAuth::CanonicalizeUserInfo returning Comments:
   Autocreated on ticket submission, Disabled: , EmailAddress:
   u...@example.com mailto:u...@example.com
  mailto:u...@example.com mailto:u...@example.com, Name: user,
  Password: ,
   Privileged: , RealName: User Example
  
 
 (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:685)
 
  If these logs are correct then the user has two or more  email
 addresses
  in LDAP and u...@example.com mailto:u...@example.com is already in
  the RT database. The user
  sends from the second address user.exam...@gmail.com
  mailto:user.exam...@gmail.com. This is not
  supported (yet).
 
  Users with multiple email addresses in LDAP are not supported (even
  though some docs say otherwise). We have just discussed this
 recently.
  See this thread:
 
 
 http://lists.bestpractical.com/pipermail/rt-users/2014-January/082549.html
 
  The user must use the email address in the RT database. Mails from
 any
  other email address in LDAP is rejected because the user already
 exists
  in the RT database.
 
  You may try to manually create a second RT user with the second email
  address and then use the MergeUser extension to merge the accounts.
 
  -Gerald
 




Re: [rt-users] Some external users not being AutoCreate'd

2014-02-10 Thread Gerald Vogt
On 10.02.2014 22:12, Mathew Snyder wrote:
 I asked the person that is doing most of the grunt work to look into
 this. Rather than comment out the RealName setting under attr_match_list
 he commented it out under attr_map. This seems to have ad the same

If you do that RT won't set the real name from LDAP into the RT
database. You won't see the real name unless the user sets it in
preferences. The attr_map synchronizes data from LDAP into the RT
database...

 effect as it no longer creates a second account with the same real name
 as another that is in LDAP.
 
 I'm not entirely sure why RT should care about a person's actual name.

It doesn't. You have configured it this way. You made RT care about the
real name.

 The username is really all that is relevant. This seems to be a failure
 on the designers part, as far as I'm concerned.

It's in the documentation. You have to match the users in LDAP to the RT
database somehow. You have to configure that. Not everyone wants to use
the username. Some people use the email address.

You have to configure it. You get what you configure.

Gerald