Re: [rt-users] sendmail error (exited with code 75) - RHEL6

2012-09-06 Thread Raphaël Berlamont
2012/9/5 Raphaël Berlamont 

> 2012/9/4 Thomas Sibley 
>
>> Unrelated notes about your template below.
>>
>> Hmm.  Can you wrap /usr/sbin/sendmail with a tiny shell script that
>> tee's the input somewhere else and then passes it through to the real
>> sendmail?
>>
>> mv -v /usr/sbin/sendmail{,.real}
>> cat /usr/sbin/sendmail
>> #!/bin/bash
>> exec tee -a /tmp/sendmail-stdin | /usr/sbin/sendmail.real "$@"
>> ^D
>> chmod a+rx /usr/sbin/sendmail
>>
>
> I've done the test 3 times, same result : logs appears in
> "/var/log/maillog", and nothing in "/tmp/sendmail-stdin". I don't even
> understand how can this be possible...
>

I confirm this behaviour. I slightly modified the script  :

[root@dgilx202 ~]# cat /usr/sbin/sendmail
#!/bin/bash

TMP_FILE="/tmp/sendmail-stdin"
echo "=NEW SENDMAIL CALL===" >> "${TMP_FILE}"
echo "`date +%Y%m%d-%H%M%S`" >> "${TMP_FILE}"
echo "MESSAGE BEGIN" >> "${TMP_FILE}"
exec tee -a "${TMP_FILE}" | /usr/sbin/sendmail.real "$@"
echo "MESSAGE ENDED" >> "${TMP_FILE}"
echo "`date +%Y%m%d-%H%M%S`" >> "${TMP_FILE}"
echo "==END SENDMAIL CALL==" >> "${TMP_FILE}"
[root@dgilx202 ~]#


And with a test, here is what I have in the log fie :

[root@dgilx202 ~]# tail -f /tmp/sendmail-stdin
=NEW SENDMAIL CALL===
20120906-154906
MESSAGE BEGIN
MESSAGE ENDED
20120906-154906
==END SENDMAIL CALL==
^C
[root@dgilx202 ~]#


And in the maillog, this what I have :

Sep  6 15:49:06 dgilx202 postfix/smtpd[19149]: connect from
unknown[10.223.2.22]
Sep  6 15:49:06 dgilx202 postfix/smtpd[19149]: 3B22B23538:
client=unknown[10.223.2.22]
Sep  6 15:49:06 dgilx202 postfix/cleanup[19154]: 3B22B23538: message-id=<
4d44666f4f0b2248a2c57dd0af573f930ecd2...@pla122vs151.fr.myfirm.org>
Sep  6 15:49:06 dgilx202 postfix/qmgr[1793]: 3B22B23538: from=<
raphael.berlam...@myfirm.fr>, size=1803, nrcpt=1 (queue active)
Sep  6 15:49:06 dgilx202 postfix/smtpd[19149]: disconnect from
unknown[10.223.2.22]
Sep  6 15:49:06 dgilx202 postfix/sendmail[19225]: fatal: rt-t...@myfirm.fr(48):
No recipient addresses found in message header
Sep  6 15:49:06 dgilx202 postfix/local[19155]: 3B22B23538: to=<
rt-t...@rt.myfirm.com>, relay=local, delay=0.6, delays=0.02/0/0/0.58,
dsn=2.0.0, status=sent (delivered to command: /opt/rt4/bin/rt-mailgate
--queue 'Test Queue' --action correspond --url https://rt.myfirm.com)
Sep  6 15:49:06 dgilx202 postfix/qmgr[1793]: 3B22B23538: removed


So I can now tell that sendmail IS called, but nothing is piped in, or it
crashs before RT can pipe anything in it...

Idea ?

-- 
Raphaël Berlamont


Re: [rt-users] Using 'today' in an Advanced search gives different results than using explicit date.

2012-09-06 Thread Robert Blackwell
On Fri, Aug 24, 2012 at 12:59 PM, Thomas Sibley  wrote:
> On 08/24/2012 09:35 AM, Robert Blackwell wrote:
>> For example I would expect these to return the same tickets but they don't:
>>
>> This returns 7 tickets.
>> Status != 'resolved' AND CF.{FollowUp} < '2012-08-25'
>>
>> This returns 513.
>> Status != 'resolved' AND CF.{FollowUp} < 'tomorrow'
>
> Capture the SQL that gets run for those queries, and we can see the
> difference between parsing.  It _shouldn't_ be different, but I'm
> guessing an implicit time part might be sneaking in.
>

Here is the SQL and stack trace of two queries obtained by using
"Configuration » Tools » SQL Queries".


SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN
ObjectCustomFieldValues ObjectCustomFieldValues_1 ON (
ObjectCustomFieldValues_1.CustomField = '49' ) AND (
ObjectCustomFieldValues_1.ObjectType = 'RT::Ticket' ) AND (
ObjectCustomFieldValues_1.Disabled = '0' ) AND (
ObjectCustomFieldValues_1.ObjectId = main.id ) LEFT JOIN
CustomFieldValues CustomFieldValues_2 ON (
CustomFieldValues_2.CustomField =
ObjectCustomFieldValues_1.CustomField ) AND ( CustomFieldValues_2.Name
= ObjectCustomFieldValues_1.Content ) WHERE (main.Status != 'deleted')
AND (main.Queue = '74' AND ( ( ( ObjectCustomFieldValues_1.Content <
'today' OR ( ( ObjectCustomFieldValues_1.Content = '' OR
ObjectCustomFieldValues_1.Content IS NULL ) AND
ObjectCustomFieldValues_1.LargeContent < 'today' ) ) ) ) ) AND
(main.Type = 'ticket') AND (main.EffectiveId = main.id) Toggle stack
trace

Stack:
  [/opt/rt4/sbin/../lib/RT/Handle.pm:1180]
  [/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm:589]
  [/usr/local/share/perl5/DBIx/SearchBuilder.pm:291]
  [/opt/rt4/sbin/../lib/RT/SearchBuilder.pm:331]
  [/opt/rt4/sbin/../lib/RT/Tickets.pm:2961]
  [/usr/local/share/perl5/DBIx/SearchBuilder.pm:1461]
  [/opt/rt4/sbin/../lib/RT/Tickets.pm:2871]
  [/opt/rt4/share/html/Search/Results.html:132]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:548]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:295]
  [/opt/rt4/share/html/autohandler:53]




 SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN
ObjectCustomFieldValues ObjectCustomFieldValues_1 ON (
ObjectCustomFieldValues_1.CustomField = '49' ) AND (
ObjectCustomFieldValues_1.ObjectType = 'RT::Ticket' ) AND (
ObjectCustomFieldValues_1.Disabled = '0' ) AND (
ObjectCustomFieldValues_1.ObjectId = main.id ) LEFT JOIN
CustomFieldValues CustomFieldValues_2 ON (
CustomFieldValues_2.CustomField =
ObjectCustomFieldValues_1.CustomField ) AND ( CustomFieldValues_2.Name
= ObjectCustomFieldValues_1.Content ) WHERE (main.Status != 'deleted')
AND (main.Queue = '74' AND ( ( ( ObjectCustomFieldValues_1.Content <
'2012-08-27' OR ( ( ObjectCustomFieldValues_1.Content = '' OR
ObjectCustomFieldValues_1.Content IS NULL ) AND
ObjectCustomFieldValues_1.LargeContent < '2012-08-27' ) ) ) ) ) AND
(main.Type = 'ticket') AND (main.EffectiveId = main.id) Toggle stack
trace

Stack:
  [/opt/rt4/sbin/../lib/RT/Handle.pm:1180]
  [/usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm:589]
  [/usr/local/share/perl5/DBIx/SearchBuilder.pm:291]
  [/opt/rt4/sbin/../lib/RT/SearchBuilder.pm:331]
  [/opt/rt4/sbin/../lib/RT/Tickets.pm:2961]
  [/usr/local/share/perl5/DBIx/SearchBuilder.pm:1461]
  [/opt/rt4/sbin/../lib/RT/Tickets.pm:2871]
  [/opt/rt4/share/html/Search/Results.html:132]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:548]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:295]
  [/opt/rt4/share/html/autohandler:53]

Thanks
Robert


[rt-users] Custom SQL

2012-09-06 Thread Winn Johnston
All,

I am trying to create a top closers list on the default dashboard. I have the 
exact SQL statment i want to use, but i am lost after that.

select u.Name as User, count(1) as TotalClosedTix from Users u join Tickets t 
on u.id = t.owner where t.Status = "resolved" group by u.Name order by 2 desc 
limit 10 \G;

*** 1. row ***
          User: winnj
TotalClosedTix: 6
*** 2. row ***
          User: dennisc
TotalClosedTix: 3
*** 3. row ***
          User: royced
TotalClosedTix: 1
3 rows in set (0.00 sec)


Can someone please help?

Thanks
Winn Johnston


[rt-users] How to grant access to users to edit the values in custom fields?

2012-09-06 Thread Jason Marshall
Hi all, I'm using rt-3.8.8.  Looking at the permissions I can grant, I 
thought this would be pretty simple.  I granted Modify and Admin rights on 
the custom field itself, but at this point a Configure menu doesn't even 
appear on the left side of the users' screens.  Is there something else I 
need to grant for that menu to show up?  Thanks, and sorry if this is 
something stupid -- I've googled all the words I can think of, and nothing 
has helped so far...


---
Jason Marshall
IT Manager
Kelman Data Management


Re: [rt-users] How to grant access to users to edit the values in custom fields?

2012-09-06 Thread Matt Brennan
On version 4, there is a permission called "ShowConfigTab" which is
also required. If memory serves, that was the same on 3.8.

-Matt

On Thu, Sep 6, 2012 at 11:28 AM, Jason Marshall  wrote:
> Hi all, I'm using rt-3.8.8.  Looking at the permissions I can grant, I
> thought this would be pretty simple.  I granted Modify and Admin rights on
> the custom field itself, but at this point a Configure menu doesn't even
> appear on the left side of the users' screens.  Is there something else I
> need to grant for that menu to show up?  Thanks, and sorry if this is
> something stupid -- I've googled all the words I can think of, and nothing
> has helped so far...
>
> ---
> Jason Marshall
> IT Manager
> Kelman Data Management


Re: [rt-users] check for available recipients on reply

2012-09-06 Thread Kevin Falcone
On Mon, Sep 03, 2012 at 12:00:52PM +0200, inb...@telenet.be wrote:
> Our internal staff uses comments to put information in tickets for co-workers 
> that can't be viewed by customers.
> Customer information is shared via correspondence.
> 
> Last week, a staff member deleted (accidentaly) the requestor of a ticket.  
> There were no other cc's or admin cc's.
> When the staff member clicked on Reply, RT did not sent a outgoing mail, but 
> the message was flagged as Correspondence.
> 
> So I would like to make a check that returns an error to the user when he/she 
> tries to reply on a ticket with no watchers.
> Should I try to do it with a scrip or should I adapt the Email.pm?

You may want to grant the ShowOutgoingMail right and turn on the
SimplifiedRecipients configuration which will make a box appear above
the reply box indicating who will get this email.  Turning off
SimplifiedRecipients will get you a much more detailed view below the
reply.

-kevin


pgpd04YOPgxh0.pgp
Description: PGP signature


Re: [rt-users] How to grant access to users to edit the values in custom fields?

2012-09-06 Thread Jason Marshall
Thanks Matt, that might just have done it.  I set it for the Privileged 
Users group, so anyone who needs to do something in there should now be 
able to.  I'm getting the users to test now  -- thanks again!



On version 4, there is a permission called "ShowConfigTab" which is
also required. If memory serves, that was the same on 3.8.

-Matt

On Thu, Sep 6, 2012 at 11:28 AM, Jason Marshall  wrote:

Hi all, I'm using rt-3.8.8.  Looking at the permissions I can grant, I
thought this would be pretty simple.  I granted Modify and Admin rights on
the custom field itself, but at this point a Configure menu doesn't even
appear on the left side of the users' screens.  Is there something else I
need to grant for that menu to show up?  Thanks, and sorry if this is
something stupid -- I've googled all the words I can think of, and nothing
has helped so far...

---
Jason Marshall
IT Manager
Kelman Data Management





---
Jason Marshall
IT Manager
Kelman Data Management
403.294.7557


Re: [rt-users] sendmail error (exited with code 75) - RHEL6

2012-09-06 Thread Thomas Sibley
On 09/06/2012 06:55 AM, Raphaël Berlamont wrote:
> So I can now tell that sendmail IS called, but nothing is piped in, or
> it crashs before RT can pipe anything in it...

This is indeed strange.  Can you show us the output of `apachectl -V`?

apachectl may be spelled apache2ctl or httpdctl on RHEL, not sure off
the top of my head.



Re: [rt-users] Using 'today' in an Advanced search gives different results than using explicit date.

2012-09-06 Thread Thomas Sibley
On 09/06/2012 07:07 AM, Robert Blackwell wrote:
> Here is the SQL and stack trace of two queries obtained by using
> "Configuration » Tools » SQL Queries".
> 
[snip]
> ObjectCustomFieldValues_1.Content < 'today'

Er, right.  I forgot that date and datetime CFs don't get the same
"natural language" parsing that core datetime fields do.  This is a
known bug, and I believe we have a ticket open about it (but maybe not,
can't find it quickly).

Sorry about that.


Re: [rt-users] Custom SQL

2012-09-06 Thread Kenneth Crocker
Winn,

Are you using the RT SQL provided with the system?

Once you've created a search with RTSQL, you save the search and then it is
available to be used in a Dashboard.

Hope this helps.

Kenn

On Thu, Sep 6, 2012 at 7:54 AM, Winn Johnston wrote:

> All,
>
> I am trying to create a top closers list on the default dashboard. I have
> the exact SQL statment i want to use, but i am lost after that.
>
> select u.Name as User, count(1) as TotalClosedTix from Users u join
> Tickets t on u.id = t.owner where t.Status = "resolved" group by u.Name
> order by 2 desc limit 10 \G;
>
> *** 1. row ***
>   User: winnj
> TotalClosedTix: 6
> *** 2. row ***
>   User: dennisc
> TotalClosedTix: 3
> *** 3. row ***
>   User: royced
> TotalClosedTix: 1
> 3 rows in set (0.00 sec)
>
>
> Can someone please help?
>
> Thanks
> Winn Johnston
>
>


Re: [rt-users] configure RT-Authen-ExternalAuth to not verify certificates

2012-09-06 Thread Brent Wiese
> Hello All,
> 
> Is there anyway to configure RT-Authen-ExternalAuth to not verify ssl
> certificates? I'm hitting an ldap server that has a self-signed cert
> and it would be much more simple to not verify the certificate. I tried
> adding "verify => 'none'" to net_ldap_args which is used by Net::LDAP
> start_tls but that didn't work.
> 
> --
> Later,
> Darin

I realize this is an old post, but I didn't see any responses. 

I struggled with this too. Turned out to be far easier to append the 
self-signed cert (or internal CA depending on your situation) to my 
ca-bundle.crt file on my RT box.