Re: [rt-users] rt-users Digest, Vol 101, Issue 11

2012-08-13 Thread Wolfram Huettermann

On 08/10/12 18:00, rt-users-requ...@lists.bestpractical.com wrote:

Send rt-users mailing list submissions to
rt-users@lists.bestpractical.com

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
or, via email, send a message with subject or body 'help' to
rt-users-requ...@lists.bestpractical.com

You can reach the person managing the list at
rt-users-ow...@lists.bestpractical.com

When replying, please edit your Subject line so it is more specific
than Re: Contents of rt-users digest...


Today's Topics:

1. testing perl script in RT (Gergely Buday)
2. Re: testing perl script in RT (Paul Tomblin)
3. Re: testing perl script in RT (Thomas Sibley)
4. Re: testing perl script in RT (Thomas Sibley)
5. Re: testing perl script in RT (Paul Tomblin)
6. Re: testing perl script in RT (Thomas Sibley)
7. HTML emails and attachments (Josh Hopkins)
8. Re: rt-users Digest, Vol 101, Issue 9 (Wolfram Huettermann)
9. Email notification of updates (Mark Goodge)
   10. Re: Email notification of updates (k...@rice.edu)
   11. Re: Email notification of updates (Mark Goodge)
   12. Re: Email notification of updates (k...@rice.edu)
   13. Re: Email notification of updates (Mark Goodge)
   14. incoming mail with attachement Permission Denied (Leon Berkers)


--

Message: 1
Date: Thu, 9 Aug 2012 18:01:33 +0200
From: Gergely Budaygbu...@gmail.com
To: rt-users@lists.bestpractical.com
Subject: [rt-users] testing perl script in RT
Message-ID:
ca+3iozkqt_yopimrzc1vft1sdz7csmdjfvexjf4+imjkol+...@mail.gmail.com
Content-Type: text/plain; charset=ISO-8859-1

Hi there,

how can I run a perl script through the RT environment so that I can
use the database and all the modules, but see the compiler output on
my faulty experiments?

- Gergely


--

Message: 2
Date: Thu, 9 Aug 2012 12:03:43 -0400
From: Paul Tomblinptomb...@xcski.com
To: Gergely Budaygbu...@gmail.com
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] testing perl script in RT
Message-ID:
cajcd8l8ahua53wnns+4rlyextc5yphh8svebrz7weogmz6x...@mail.gmail.com
Content-Type: text/plain; charset=iso-8859-1

On Thu, Aug 9, 2012 at 12:01 PM, Gergely Budaygbu...@gmail.com  wrote:


Hi there,

how can I run a perl script through the RT environment so that I can
use the database and all the modules, but see the compiler output on
my faulty experiments?

- Gergely


use lib /opt/rt4/lib;
use RT;

That should be enough.


Hello I use a perl template like this:


#!/usr/bin/perl -w
# notwendige Header Anfang
use strict;

use lib /opt/rt4/local/lib,  /opt/rt4/lib;


use RT;
use RT::Interface::Web;

# Load the config file
use RT::Interface::CLI GetCurrentUser, loc, ;
RT::LoadConfig();

# Connect to the database and get RT::SystemUser
#  loaded
RT::Init();

### Put here all other PERL modules you need or whereever you want.


Greetings,


Wolfram




[rt-users] RT::User problem

2012-08-13 Thread Gergely Buday
Hi there,

I would like to create a User object through the Load method. The
documentation writes:

Load a user object from the database. Takes a single argument.  If
the argument is numerical, load by the column 'id'. If a user object
or its subclass passed then loads the same user by id.  Otherwise,
load by the Name column which is the user's textual username.

#!/usr/bin/perl
use strict;
use lib /opt/rt4/lib;
use lib /opt/rt4/local/lib;
use RT;
use RT::User;


RT-LoadConfig;
RT-Init;

my $test_user = RT::User::Load('b...@buday-rd.hu');
printf \$test_user=, $test_user;
my @to = $test_user-EmailAddress;

for $a (0 .. $#to)
{
print $to[$a], \n;
}

Running this script with sudo makes it say

[Mon Aug 13 11:16:47 2012] [crit]: Can't call method EmailAddress on
an undefined value at ./email.pl line 13. (/opt/rt4/lib/RT.pm:341)
Can't call method EmailAddress on an undefined value at ./email.pl line 13.

The username I used in the place of m...@company.com is indeed a valid
user name. What is the problem then?

- Gergely


[rt-users] accessing custom fields

2012-08-13 Thread Gergely Buday
Hi,

I have created a custom field for a User. How can I access it from a
perl script? I have the CF id, that's clear, but some of the code I
have found had referred to some queue which I wonder about as I want a
core User custom field, not related to any queue.

- Gergely


[rt-users] Active Directory Integration With Request Tracker 3.8.7

2012-08-13 Thread Varun Naik
Hi Folks,

Please help me to integrate RT 3.8.7 with Windows Server 2008 Active
Directory.

If anyone have any proper documentation please share it. I have tried many
documents which is there in internet, but could not succeeded. Please let
me how to configure it.

-- 
Thanks  Regard,
Varun.V.Naik


[rt-users] Result after On queue change

2012-08-13 Thread Björn Schulz
Hi,

I try to build a scrip to avoid a queue change from a specific queue
(general (1)) if a Cf (Text1) isn't set on a rt3.8 box.

In principal it work as a global scrip, but the result field didn't say
the truth. ;-)

After the not possible queue change the ticket is in the old queue, but
results tells me:

Ticket 30: Queue changed from General to TQ-1

Any ideas to fix this?


Cheers,
  Björn

P.S. Here is my global scrip. On queue level (general) it doesn't work
for me.


Description:Queue Change only if Text1 is set
Condition:  On Queue Change
Action: User Defined
Template:   Global template Blank
Stage:  TransactionCreate


---
Custom action preparation code: 

return 1;
---
Custom action cleanup code: 

my $OV =
$self-TransactionObj-OldValue;
$RT::Logger-crit(The old value is: .$OV);
if ($OV != 1)
{
 return 0;
}
if (!$self-TicketObj-FirstCustomFieldValue(Text1))
{
  $self-TicketObj-SetQueue($OV);
}
return 1;
---

In pricipal


Re: [rt-users] accessing custom fields

2012-08-13 Thread Rajesh Kumar

On Monday 13 August 2012 05:08 PM, Gergely Buday wrote:

Hi,

I have created a custom field for a User. How can I access it from a
perl script? I have the CF id, that's clear, but some of the code I
have found had referred to some queue which I wonder about as I want a
core User custom field, not related to any queue.

- Gergely

my $cf_value = 
$self-TransactionObj-CreatorObj-FirstCustomFieldValue('Client');


I used above in OnCreate scrip. Hope that helps.

--
Rajesh


Re: [rt-users] Active Directory Integration With Request Tracker 3.8.7

2012-08-13 Thread Ruslan Zakirov
Hi,

Start from ExternalAuth extension and its documentation.

On Mon, Aug 13, 2012 at 3:45 PM, Varun Naik varun.v.n...@gmail.com wrote:
 Hi Folks,

 Please help me to integrate RT 3.8.7 with Windows Server 2008 Active
 Directory.

 If anyone have any proper documentation please share it. I have tried many
 documents which is there in internet, but could not succeeded. Please let me
 how to configure it.

 --
 Thanks  Regard,
 Varun.V.Naik




-- 
Best regards, Ruslan.


Re: [rt-users] accessing custom fields

2012-08-13 Thread Gergely Buday
 I have created a custom field for a User. How can I access it from a
 perl script? I have the CF id, that's clear, but some of the code I
 have found had referred to some queue which I wonder about as I want a
 core User custom field, not related to any queue.

 my $cf_value =
 $self-TransactionObj-CreatorObj-FirstCustomFieldValue('Client');

 I used above in OnCreate scrip. Hope that helps.

Seems fine, but what is the $self? I guess it is set by the general
scrip beginning but how can I create it from a standalone scrip_t_?

- Gergely


Re: [rt-users] RT::User problem

2012-08-13 Thread Ruslan Zakirov
On Mon, Aug 13, 2012 at 3:22 PM, Gergely Buday gbu...@gmail.com wrote:
 Hi there,

 I would like to create a User object through the Load method. The
 documentation writes:

 Load a user object from the database. Takes a single argument.  If
 the argument is numerical, load by the column 'id'. If a user object
 or its subclass passed then loads the same user by id.  Otherwise,
 load by the Name column which is the user's textual username.

 #!/usr/bin/perl
 use strict;
 use lib /opt/rt4/lib;
 use lib /opt/rt4/local/lib;
 use RT;
 use RT::User;


 RT-LoadConfig;
 RT-Init;

 my $test_user = RT::User::Load('b...@buday-rd.hu');

In theory load could act as an object instance creator, but it
doesn't. To create
an object you use -new call first and then load record into it:

my $user = RT::User-new( RT-SystemUser );
$user-Load('xxx');


About argument of Load methods. The bottom variant only accepts id. For
some objects that have unique parameters besides id it also accepts string.
For example queue name or user name (login). For such objects Load looks
at argument and if it contains any not number character then load lookups
by name not id. This the reason why RT doesn't support user names containing
only digits.

Users have more than one unique parameter, EmailAddress is also unique.
Load in RT::User doesn't do more checks to decide whether argument is
email address or not, so you have to use different Load* methods which exist.

A little bit about Perl's way to call things:

1) RT::User::Load(...) - function call in other package - call Load
sub in RT::User package without emplicit arguments ignoring any
inheritance that may exist
2) RT::User-Load(...) - class method call - call Load sub starting
from RT::User package and accounting inheritance with RT::User class
name as implicit first argument
3) $user_obj-Load(...) - instance method call - previous, but with
object as implicit first argument

In RT you mostly use third variant. Second variant is also used, for
example: XXX-new call returns object instance of XXX class;
RT-SystemUser returns global object (one for the whole system);
RT-Config-Get(...);

First variant should be avoided, it only helpful if you do magic or in
some historical places. For example we used to write RT::Init(), but
now move towards RT-Init, likely for us Init ignores arguments and
doesn't care how it's called.

 printf \$test_user=, $test_user;
 my @to = $test_user-EmailAddress;

 for $a (0 .. $#to)
 {
 print $to[$a], \n;
 }

 Running this script with sudo makes it say

 [Mon Aug 13 11:16:47 2012] [crit]: Can't call method EmailAddress on
 an undefined value at ./email.pl line 13. (/opt/rt4/lib/RT.pm:341)
 Can't call method EmailAddress on an undefined value at ./email.pl line 13.

 The username I used in the place of m...@company.com is indeed a valid
 user name. What is the problem then?

 - Gergely



-- 
Best regards, Ruslan.


[rt-users] Extending the RT UI

2012-08-13 Thread Martin Drasar
Hi,

with the move from RT 3.8.7 to 4.0.6, I have decided (or was forced to
by changes in RT html code) to ditch onload scripts that extended RT
Ticket UI with some functionality (getting abuse contacts by clicking on
ip, etc.). I would, however, still like to have that functionality, but
this time in a saner manner as a server side perl script.

I have browsed the RT source and it seems to me, that the final
processing of ticket attachments to display is done in the
Ticket/Element/ShowMessageStanza component. There is a callback called
that passes a reference to an attachment content, so it seems to me that
providing my callback to alter it would be the best way to do it.

My questions are following:
- Is this the right approach to extend the UI?
- If not, what would you suggest?
- If so, how can I create/hook/use the callback?
According to the documentation of lib/RT/Interface/Web/Request.pm that
defines the callback function, all callbacks are in
/Callbacks/any_dir/CallbackPage/CallbackName. Should the /Callbacks
dir be in main RT directory or could it be somewhere in the
/rt_dir/local? Also what is the true purpose of any_dir? The
documentation uses MyExtension as an example, but the name 'MyExtension'
is apparently not used as a discriminator or anything...

Thank you,
Martin


[rt-users] Incoming mail subject with first word starting with re gets chopped in 3.8.8

2012-08-13 Thread Andy D'Arcy Jewell

Hi all,

We are seeing a problem where the ticket  subject gets mangled when it 
starts with re, for example remote gets mangled to mote. I know 
3.8.8 is pretty old, and I'm planning to upgrade, but I can't do it 
immediately.


I assume this is happening due to some regex intended to strip off Re: 
 prefixes from the subject, but I can't find it anywhere in the code


So, I have a few questions:

1. Is there a config parameter I can change to avoid this?
2. Does the 4.x branch have this same problem?
3. If none of the above, does anyone know what code I need to look at? 
(I've tried the RT::Interface::Email::Gateway module, but I can't see it 
filtering the re out anywhere).


Regards,

--
Andy D'Arcy Jewell

SysMicro Limited
Linux Support
E:  andy.jew...@sysmicro.co.uk
W:  www.sysmicro.co.uk



[rt-users] Correction: Re: Incoming mail subject with first word starting with re gets chopped in 3.8.8

2012-08-13 Thread Andy D'Arcy Jewell

On 13/08/12 14:24, Andy D'Arcy Jewell wrote:

Hi all,

We are seeing a problem where the ticket  subject gets mangled when it 
starts with re, for example remote gets mangled to mote. I know 
3.8.8 is pretty old, and I'm planning to upgrade, but I can't do it 
immediately.


I assume this is happening due to some regex intended to strip off 
Re:  prefixes from the subject, but I can't find it anywhere in the 
code


So, I have a few questions:

1. Is there a config parameter I can change to avoid this?
2. Does the 4.x branch have this same problem?
3. If none of the above, does anyone know what code I need to look at? 
(I've tried the RT::Interface::Email::Gateway module, but I can't see 
it filtering the re out anywhere).


Regards,

I've now done some more tests, and it only seems to happen when making 
comments on a ticket with a subject that starts with re. I'm still 
digging...


--
Andy D'Arcy Jewell

SysMicro Limited
Linux Support
T:  0844 9918804
M:  07961605631
E:  andy.jew...@sysmicro.co.uk
W:  www.sysmicro.co.uk



[rt-users] ldap info update over e-mail

2012-08-13 Thread Marko Cupać

Dear list readers,

I have rt-4.0.6 with p5-RT-Authen-ExternalAuth-0.11. 100% (~300) of my 
requesters use RT over e-mail, never logging into web interface. 9 staff 
members use web interface. This works very nice.


Now, more than 100 requesters are changing e-mail addresses, moving from 
one company within the organization to anther one. I am starting to see 
messages like these:


--
Aug  9 14:45:53 rsbgyucnix02 RT: RT could not load a valid user, and 
RT's configuration does not allow for the creation of a new user for 
this email (name.surn...@newcompany.tld). You might need to grant 
'Everyone' the right 'CreateTicket' for the queue General. 
(/usr/local/lib/perl5/site_perl/5.12.4/RT/Interface/Email.pm:245)

--

So, what do I do? What is the most convenient way to update their 
e-mails in RT? Do these messages mean that RT is rejecting their e-mails 
at the moment?


Thank you in advance,

Marko Cupać


Re: [rt-users] Correction: Re: Incoming mail subject with first word starting with re gets chopped in 3.8.8

2012-08-13 Thread Kevin Falcone
On Mon, Aug 13, 2012 at 02:47:07PM +0100, Andy D'Arcy Jewell wrote:
 On 13/08/12 14:24, Andy D'Arcy Jewell wrote:
 We are seeing a problem where the ticket  subject gets mangled
 when it starts with re, for example remote gets mangled to
 mote. I know 3.8.8 is pretty old, and I'm planning to upgrade,
 but I can't do it immediately.
 
 I assume this is happening due to some regex intended to strip off
 Re:  prefixes from the subject, but I can't find it anywhere in
 the code
 
 So, I have a few questions:
 
 1. Is there a config parameter I can change to avoid this?
 2. Does the 4.x branch have this same problem?
 3. If none of the above, does anyone know what code I need to look
 at? (I've tried the RT::Interface::Email::Gateway module, but I
 can't see it filtering the re out anywhere).
 
 Regards,
 
 I've now done some more tests, and it only seems to happen when
 making comments on a ticket with a subject that starts with re.
 I'm still digging...

I believe you want to grab a copy of the Admin Comment template from 3.8.9 or
later and update it through the web UI.

-kevin


pgpkMzlNJFkUG.pgp
Description: PGP signature


[rt-users] Relay Access Denied on incoming email postfix. (RT 4.0.6)

2012-08-13 Thread Hesan D Yousif

Hi all,

Getting annoyingly frustrated with relay access denied errors on my rt 
4.0.6 instllation. Specifically:


NOQUEUE: reject: RCPT

postconf -n gives:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = xxx.com, localhost.xxx.com, $myhostname, 
localhost.$mydomain, localhost

mydomain = yyy.yy.yy.yy
myhostname = rtsu...yy.yy
mynetworks = 13x.xxx.150.0/28, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relayhost = [smtp.gmail.com]:587
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_loglevel = 1
smtp_tls_security_level = encrypt
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_recipient_restrictions = 
permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination

smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/pki/tls/certs/rtsu...yy.yy.crt
smtpd_tls_key_file = /etc/pki/tls/private/rtsu...yy.yy.key
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 450

It seems to occur only on incoming emails, not outgoing. I am relaying 
email on all outbound emails, but not when they come into the rt server.


Any help would be greatly appreciated.

Regards,
Hesan






Re: [rt-users] Result after On queue change

2012-08-13 Thread Kevin Falcone
On Mon, Aug 13, 2012 at 01:54:33PM +0200, Björn Schulz wrote:
 I try to build a scrip to avoid a queue change from a specific queue
 (general (1)) if a Cf (Text1) isn't set on a rt3.8 box.
 
 In principal it work as a global scrip, but the result field didn't say
 the truth. ;-)
 
 After the not possible queue change the ticket is in the old queue, but
 results tells me:
 
 Ticket 30: Queue changed from General to TQ-1
 
 Any ideas to fix this?

Unfortunately, the Scrip runs after the queue has been changed (it's
triggered by the transaction of the change), and Scrips can't hand data
back to the Messages in the UI.

You'll need to do this with a callback, probably BeforeUpdate in
Update.html.  That callback lets you set a $skip_update boolean as
well as push a message onto @results.  It will also prevent the queue
change, so it won't be a change and a change back.

-kevin


 
 P.S. Here is my global scrip. On queue level (general) it doesn't work
 for me.
 
 
 Description:  Queue Change only if Text1 is set
 Condition:On Queue Change
 Action:   User Defined
 Template: Global template Blank
 Stage:TransactionCreate
 
 
 ---
 Custom action preparation code:   
 
 return 1;
 ---
 Custom action cleanup code:   
 
 my $OV =  
 $self-TransactionObj-OldValue;
 $RT::Logger-crit(The old value is: .$OV);
 if ($OV != 1)
 {
  return 0;
 }
 if (!$self-TicketObj-FirstCustomFieldValue(Text1))
 {
   $self-TicketObj-SetQueue($OV);
 }
 return 1;
 ---
 
 In pricipal


pgpsGCjaO0DXq.pgp
Description: PGP signature


Re: [rt-users] Correction: Re: Incoming mail subject with first word starting with re gets chopped in 3.8.8

2012-08-13 Thread Andy D'Arcy Jewell

On 13/08/12 15:23, Kevin Falcone wrote:
I believe you want to grab a copy of the Admin Comment template from 
3.8.9 or later and update it through the web UI. -kevin 


Thanks, Kevin.

I've had a look at that and it is the culprit! I've modified the scrip 
to use s/^Re[:]*\s// instead, and it now works. Now I'll have a look 
at the 3.8.9 version and see what that does...


--
Andy D'Arcy Jewell

SysMicro Limited
Linux Support
E:  andy.jew...@sysmicro.co.uk
W:  www.sysmicro.co.uk



Re: [rt-users] Relay Access Denied on incoming email postfix. (RT 4.0.6)

2012-08-13 Thread Kevin Falcone
On Mon, Aug 13, 2012 at 03:35:27PM +0100, Hesan D Yousif wrote:
 Getting annoyingly frustrated with relay access denied errors on my
 rt 4.0.6 instllation. Specifically:
 
 NOQUEUE: reject: RCPT
 
 It seems to occur only on incoming emails, not outgoing. I am
 relaying email on all outbound emails, but not when they come into
 the rt server.

This usually points to misconfigured aliases or not listing the
hostname that mail is being delivered to in the list of hostnames
postfix knows about.  However, you've cut all the useful pieces out of
your error message so we're just guessing.

-kevin


pgp4BCRifcEoi.pgp
Description: PGP signature


Re: [rt-users] ldap info update over e-mail

2012-08-13 Thread Kevin Falcone
On Mon, Aug 13, 2012 at 04:08:12PM +0200, Marko Cupać wrote:
 I have rt-4.0.6 with p5-RT-Authen-ExternalAuth-0.11. 100% (~300) of
 my requesters use RT over e-mail, never logging into web interface.
 9 staff members use web interface. This works very nice.
 
 Now, more than 100 requesters are changing e-mail addresses, moving
 from one company within the organization to anther one. I am
 starting to see messages like these:

I suspect you want to use RT-Extension-LDAPImport one-time to update
user information from LDAP keying on usernames (it may be hard if you
only have out-of-date email addresses).  If all you have are emails,
you may need to script the update with some perl.

 -- 
 Aug  9 14:45:53 rsbgyucnix02 RT: RT could not load a valid user, and
 RT's configuration does not allow for the creation of a new user for
 this email (name.surn...@newcompany.tld). You might need to grant
 'Everyone' the right 'CreateTicket' for the queue General.
 (/usr/local/lib/perl5/site_perl/5.12.4/RT/Interface/Email.pm:245)
 -- 
 
 So, what do I do? What is the most convenient way to update their
 e-mails in RT? Do these messages mean that RT is rejecting their
 e-mails at the moment?

Your mail logs will answer this, but most likely yes.

-kevin


pgpDWc835rF9i.pgp
Description: PGP signature


Re: [rt-users] Relay Access Denied on incoming email postfix. (RT 4.0.6)

2012-08-13 Thread Hesan D Yousif

Hi Kevin,

Apologies, its:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = sussexstudent.com, localhost.sussexstudent.com, 
$myhostname, localhost.$mydomain, localhost

mydomain = ussu.susx.ac.uk
myhostname = mail.ussusupport.co.uk
mynetworks = 139.184.150.0/28, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relayhost = [smtp.gmail.com]:587
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_loglevel = 1
smtp_tls_security_level = encrypt
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_recipient_restrictions = 
permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination

smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/pki/tls/certs/rtsu.ussu.susx.ac.uk.crt
smtpd_tls_key_file = /etc/pki/tls/private/rtsu.ussu.susx.ac.uk.key
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 450

I have tried a variety of hostname combinations -but I've been getting 
nowhere for a while now.


Hesan
On 13/08/2012 15:44, Kevin Falcone wrote:

o This usually points to misconfigured aliases or not listing the
hostname that mail is being delivered to in the list of hostnames
postfix knows about.  However, you've cut all the useful pieces out of
your error message so we're just guessing.

-kevin




Re: [rt-users] Correction: Re: Incoming mail subject with first word starting with re gets chopped in 3.8.8

2012-08-13 Thread Andy D'Arcy Jewell

On 13/08/12 15:23, Kevin Falcone wrote:


I believe you want to grab a copy of the Admin Comment template from 3.8.9 or
later and update it through the web UI.

-kevin


I'm not yet that familiar with git or github... could you give me a hint 
of where to find it please? I'm assuming that scrips are stored in the 
database (perhaps I'm wrong!) so I thought it would be part of the 
installer/db init code bundle...


-Andy

--
Andy D'Arcy Jewell

SysMicro Limited
Linux Support
T:  0844 9918804
M:  07961605631
E:  andy.jew...@sysmicro.co.uk
W:  www.sysmicro.co.uk



Re: [rt-users] Extending the RT UI

2012-08-13 Thread Kevin Falcone
On Mon, Aug 13, 2012 at 02:39:19PM +0200, Martin Drasar wrote:
 I have browsed the RT source and it seems to me, that the final
 processing of ticket attachments to display is done in the
 Ticket/Element/ShowMessageStanza component. There is a callback called
 that passes a reference to an attachment content, so it seems to me that
 providing my callback to alter it would be the best way to do it.
 
 My questions are following:
 - Is this the right approach to extend the UI?
 - If not, what would you suggest?
 - If so, how can I create/hook/use the callback?
 According to the documentation of lib/RT/Interface/Web/Request.pm that
 defines the callback function, all callbacks are in
 /Callbacks/any_dir/CallbackPage/CallbackName. Should the /Callbacks
 dir be in main RT directory or could it be somewhere in the
 /rt_dir/local? Also what is the true purpose of any_dir? The
 documentation uses MyExtension as an example, but the name 'MyExtension'
 is apparently not used as a discriminator or anything...

You're on the right track, you may find this useful:
http://requesttracker.wikia.com/wiki/CustomizingWithCallbacks

In general, if you're not writing an extension, your callbacks go in
/opt/rt4/local/html/Callbacks/YourUniqueCallbackName/path/to/callback

As you've noted, YourUniqueCallbackName isn't tied to anything, it's
just there because two extensions can use the same callback, but they
need to be in distinct paths for mason to find them.

-kevin


pgpSBUKeWmqhn.pgp
Description: PGP signature


Re: [rt-users] wrong date/time (export)

2012-08-13 Thread Kevin Falcone
Please reply to the list, there's no need to send me private mail.

On Wed, Aug 08, 2012 at 07:09:25PM +0200, Marcin Łabuz wrote:
 We're using this extensions:
 
 Set(@Plugins,(qw(RTx::Calendar
 RT::Extension::ExtractCustomFieldValues
 RT::Extension::SLA
 RT::Extension::ActivityReports
 RT::Extension::JSGantt)));

None of these should override the spreadsheet download.  I'd go
looking for local customizations, RT4 should obey user timezones when
outputting dates/times.

-kevin


pgpUB0Iymxti1.pgp
Description: PGP signature


Re: [rt-users] Relay Access Denied on incoming email postfix. (RT 4.0.6)

2012-08-13 Thread Hesan D Yousif
BTW, the hostname its currently configured to should actually be: 
rtsu.ussu.susx.ac.uk and not mail.ussusupport.co.uk, (that was for a test).

Hesan
On 13/08/2012 15:44, Kevin Falcone wrote:

On Mon, Aug 13, 2012 at 03:35:27PM +0100, Hesan D Yousif wrote:

Getting annoyingly frustrated with relay access denied errors on my
rt 4.0.6 instllation. Specifically:

NOQUEUE: reject: RCPT

It seems to occur only on incoming emails, not outgoing. I am
relaying email on all outbound emails, but not when they come into
the rt server.

This usually points to misconfigured aliases or not listing the
hostname that mail is being delivered to in the list of hostnames
postfix knows about.  However, you've cut all the useful pieces out of
your error message so we're just guessing.

-kevin




[rt-users] getting a multiple valued custom field

2012-08-13 Thread Gergely Buday
Hi there,

how can I get the values from a select multiple values typed
checkbox in a scrip condition?

If possible, I would be interested in doing the same in a standalone
script. How can I access a user object from a standalone script?

- Gergely


Re: [rt-users] queue disabled but still getting tickets

2012-08-13 Thread Kevin Falcone
On Wed, Aug 08, 2012 at 09:56:50AM -0500, Aaron Zuercher wrote:
I have disabled one of my queues to prevent new ticket submission but new 
 tickets are still
showing up. How to I stop this? I don't want to remove the queue because I 
 want to reopen it
in a month.
 
I disabled it by going to TOOLS  CONFIG  QUEUES and unchecking enabled 
 box.

Currently in RT, disabled queues still allow ticket creation.  This is
because of a historical quirk where the ___Approvals queue is disabled
but still allows ticket creation.

It's likely that this will change in 4.2.

I assume that these new tickets are coming via rt-mailgate?  You can
remove or re-route those aliases or remove the CreateTicket rights on
that queue (although this won't work if you've granted CreateTicket
too widely).

-kevin


pgp2XluGZWkT6.pgp
Description: PGP signature


Re: [rt-users] From address set to Apache

2012-08-13 Thread Kevin Falcone
On Thu, Aug 09, 2012 at 03:13:23AM +0100, Robin Szemeti wrote:
 I'm running RT4 and postfix on Centos, mauils are coming into queues
 fine, but I have an issue with the From address, despite setting
 comment and correspond addresses in my queues, the mails are
 appearing as from Apache apa...@hostname.domain.name reply-to is
 set correctly in the mails, but the From address is being set as the
 process owner ...
 
 I'm using sendmailpipe as the delivery, standard Centos install with
 postfix/ssmtp

You want to read about $SetOutgoingMailFrom in RT_Config.pm (including
the important warning) and then make any changes you want to this or
the config option right after it in your RT_SiteConfig.pm

-kevin


pgph7fMSGGbI3.pgp
Description: PGP signature


Re: [rt-users] Wikitext Formatting Issues

2012-08-13 Thread Kevin Falcone
On Thu, Aug 09, 2012 at 01:33:49PM +0800, Lyka Delgado wrote:
We just started using RT in saving our company information and I was 
 assigned to put all of
our information into Articles. We want the articles to look decent so I 
 used the wikitext
box for our customfield in our articles. I found your wikia for rt, but 
 the RTFM part does
not give complete info of the different formats. Sure you have the basic 
 ones there like
bold, italics and underline but for listing items, it doesnt really work. 
 Ive also used the
listing options in Help:Wikitext Examples, even if there was already a 
 warning that Note
that formatting rules in this full Wiki are NOT the same as the wikitext 
 custom field in
RTFM. but it was not applicable.

RT's WikiText custom fields user Text::WikiFormat - you can read about
the module with perldoc Text::WikiFormat or by looking it up on
http://metacpan.org

-kevin


pgpxvNLK9ySwT.pgp
Description: PGP signature


Re: [rt-users] Extending the RT UI

2012-08-13 Thread Martin Drasar
On 13.8.2012 16:48, Kevin Falcone wrote:
 You're on the right track, you may find this useful:
 http://requesttracker.wikia.com/wiki/CustomizingWithCallbacks
 
 In general, if you're not writing an extension, your callbacks go in
 /opt/rt4/local/html/Callbacks/YourUniqueCallbackName/path/to/callback
 
 As you've noted, YourUniqueCallbackName isn't tied to anything, it's
 just there because two extensions can use the same callback, but they
 need to be in distinct paths for mason to find them.
 
 -kevin

Hi Kevin,

thanks a lot. This is definitely what I was looking for.

Martin


Re: [rt-users] putting a custom field in place

2012-08-13 Thread Kevin Falcone
On Thu, Aug 09, 2012 at 01:25:09PM +0200, Gergely Buday wrote:
 The previous custom field works, it is about choosing languages, so
 the same type. I created a custom field following this working
 example. I set it to Global, following again the example. I put some
 new code into UserPrefs.html:
 
 UserPrefs.html:% my $UserWhenEmail =
 RT::CustomField-new($session{'CurrentUser'});
 UserPrefs.html:% $UserWhenEmail-Load(107);
 
 where 107 is the id for this new custom field. Also I wrote
 
   tr
td class=label|/lWhen to e-mail/: /td
td class=value id=uprefs-intro
  /Elements/EditCustomField, %ARGS, Object = $UserObj, CustomField
 = $UserWhenEmail 
/td
   /tr
 
 I cleared the cache and restarted apache but only the When to e-mail
 label appeared but not the multiple checkboxes. What else should I do
 to make it happen? I filled in the multiple possible options for the
 custom field.

I suggest adding some error checking around your Load and checking the
apache error logs.  Also, ensure that the CF is applied globally and
that rights have been granted to allow editing.

-kevin


pgpy1wFkoYP1Z.pgp
Description: PGP signature


Re: [rt-users] Correction: Re: Incoming mail subject with first word starting with re gets chopped in 3.8.8

2012-08-13 Thread Kevin Falcone
On Mon, Aug 13, 2012 at 03:47:12PM +0100, Andy D'Arcy Jewell wrote:
 On 13/08/12 15:23, Kevin Falcone wrote:
 
 I believe you want to grab a copy of the Admin Comment template from 3.8.9 or
 later and update it through the web UI.
 
 I'm not yet that familiar with git or github... could you give me a
 hint of where to find it please? I'm assuming that scrips are stored
 in the database (perhaps I'm wrong!) so I thought it would be part
 of the installer/db init code bundle...

You can always just download the tarball, we host all the historical
releases.  The data is stored in the etc/initialdata file.  The
version in 4.0 on github will also work just fine, that template
hasn't changed materially for 4.0.

-kevin


pgpf11EGlaLom.pgp
Description: PGP signature


Re: [rt-users] putting a custom field in place

2012-08-13 Thread Gergely Buday
Kevin Falcone wrote:

 I cleared the cache and restarted apache but only the When to e-mail
 label appeared but not the multiple checkboxes. What else should I do
 to make it happen? I filled in the multiple possible options for the
 custom field.

 I suggest adding some error checking around your Load and checking the
 apache error logs.  Also, ensure that the CF is applied globally and
 that rights have been granted to allow editing.

You are right, the rights were missing.

- Gergely


Re: [rt-users] Relay Access Denied on incoming email postfix. (RT 4.0.6)

2012-08-13 Thread Kevin Falcone
On Mon, Aug 13, 2012 at 03:51:39PM +0100, Hesan D Yousif wrote:
 BTW, the hostname its currently configured to should actually be:
 rtsu.ussu.susx.ac.uk and not mail.ussusupport.co.uk, (that was for a
 test).

Unfortunately, you still haven't produced a full error message, which
means even with a full config we're guessing.  Also, check your
aliases file.

 On 13/08/2012 15:44, Kevin Falcone wrote:
 On Mon, Aug 13, 2012 at 03:35:27PM +0100, Hesan D Yousif wrote:
 Getting annoyingly frustrated with relay access denied errors on my
 rt 4.0.6 instllation. Specifically:
 
 NOQUEUE: reject: RCPT
 
 It seems to occur only on incoming emails, not outgoing. I am
 relaying email on all outbound emails, but not when they come into
 the rt server.
 This usually points to misconfigured aliases or not listing the
 hostname that mail is being delivered to in the list of hostnames
 postfix knows about.  However, you've cut all the useful pieces out of
 your error message so we're just guessing.


pgpSbkuonBqUJ.pgp
Description: PGP signature


Re: [rt-users] Correction: Re: Incoming mail subject with first word starting with re gets chopped in 3.8.8

2012-08-13 Thread Andy D'Arcy Jewell



You can always just download the tarball, we host all the historical
releases.  The data is stored in the etc/initialdata file.  The
version in 4.0 on github will also work just fine, that template
hasn't changed materially for 4.0.

-kevin

Thanks! Got it now.

--
Andy D'Arcy Jewell

SysMicro Limited
Linux Support
E:  andy.jew...@sysmicro.co.uk
W:  www.sysmicro.co.uk



Re: [rt-users] Relay Access Denied on incoming email postfix. (RT 4.0.6)

2012-08-13 Thread Hesan D Yousif

/var/log/maillog gives the following response:

Aug 13 15:36:00 rtsu postfix/smtpd[2985]: NOQUEUE: reject: RCPT from 
sivits.uscs.susx.ac.uk[139.184.14.88]: 554 5.7.1 
rt-su-activit...@ussusupport.co.uk: Relay access denied; 
from=h.d.you...@sussex.ac.uk to=rt-su-activit...@ussusupport.co.uk 
proto=ESMTP helo=sivits.uscs.susx.ac.uk
Aug 13 15:36:00 rtsu postfix/smtpd[2985]: disconnect from 
sivits.uscs.susx.ac.uk[139.184.14.88]
Aug 13 15:39:20 rtsu postfix/anvil[2987]: statistics: max connection 
rate 1/60s for (smtp:139.184.14.85) at Aug 13 15:34:36
Aug 13 15:39:20 rtsu postfix/anvil[2987]: statistics: max connection 
count 1 for (smtp:139.184.14.85) at Aug 13 15:34:36
Aug 13 15:39:20 rtsu postfix/anvil[2987]: statistics: max cache size 1 
at Aug 13 15:34:36


output of aliases file is:

#
#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks or from /bin/mail.
#
# The program newaliases must be run after
#NOTE   this file is updated for any changes to
# show through to sendmail.
#

# Basic system aliases -- these MUST be present.
mailer-daemon:  postmaster
postmaster: root

rt-su-activities: |/usr/local/rt/bin/rt-mailgate -- queue 
rt-su-activities --action correspond --url https://rtsu.ussu.susx.ac.uk/rt;
rt-su-activities-comment: |/usr/local/rt/bin/rt-mailgate --queue 
rt-su-activities --action comment --url https://rtsu.ussu.susx.ac.uk/rt;


# General redirections for pseudo accounts.
bin:root
daemon: root
adm:root
lp: root
sync:   root
shutdown:   root
halt:   root
mail:   root
news:   root
uucp:   root
operator:   root
games:  root
gopher: root
ftp:root
nobody: root
radiusd:root
nut:root
dbus:   root
vcsa:   root
canna:  root
wnn:root
rpm:root
nscd:   root
pcap:   root
apache: root
webalizer:  root
dovecot:root
fax:root
quagga: root
radvd:  root
pvm:root
amanda: root
privoxy:root
ident:  root
named:  root
xfs:root
gdm:root
mailnull:   root
postgres:   root
sshd:   root
smmsp:  root
postfix:root
netdump:root
ldap:   root
squid:  root
ntp:root
mysql:  root
desktop:root
rpcuser:root
rpc:root
nfsnobody:  root
ingres: root
system: root
toor:   root
manager:root
dumper: root
abuse:  root
newsadm:news
newsadmin:  news
usenet: news
ftpadm: ftp
ftpadmin:   ftp
ftp-adm:ftp
ftp-admin:  ftp
www:webmaster
webmaster:  root
noc:root
security:   root
hostmaster: root
info:   postmaster
marketing:  postmaster
sales:  postmaster
support:postmaster


# trap decode to catch security attacks
decode: root

# Person who should get root's mail
root:   myem...@email.com

Hesan

On 13/08/2012 16:04, Kevin Falcone wrote:

On Mon, Aug 13, 2012 at 03:51:39PM +0100, Hesan D Yousif wrote:

BTW, the hostname its currently configured to should actually be:
rtsu.ussu.susx.ac.uk and not mail.ussusupport.co.uk, (that was for a
test).

Unfortunately, you still haven't produced a full error message, which
means even with a full config we're guessing.  Also, check your
aliases file.


On 13/08/2012 15:44, Kevin Falcone wrote:

On Mon, Aug 13, 2012 at 03:35:27PM +0100, Hesan D Yousif wrote:

Getting annoyingly frustrated with relay access denied errors on my
rt 4.0.6 instllation. Specifically:

NOQUEUE: reject: RCPT

It seems to occur only on incoming emails, not outgoing. I am
relaying email on all outbound emails, but not when they come into
the rt server.

This usually points to misconfigured aliases or not listing the
hostname that mail is being delivered to in the list of hostnames
postfix knows about.  However, you've cut all the useful pieces out of
your error message so we're just guessing.




[rt-users] scrip not logging

2012-08-13 Thread Gergely Buday
Hi there,

my scrip is logged, but my logging commands do not result in a log
line. Here is the log the system prints upon its start:

Aug 13 17:23:04 dox RT:
rt-4.0.3-25618-1344871384-617.2211-2...@dox.analogydialogue.com
#2211/33968 - Scrip 23 Email dummy
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)

But the following condition does not write the any log:

$RT::Logger-info(Hello RT World!);

my $cf=$self-TransactionObj-CreatorObj-LoadCustomFieldByIdentifier('107');

my $cf2 = $session-{'CurrentUser'}-UserObj-FirstCustomFieldValue('107');

$RT::Logger-info(cf=$cf);
$RT::Logger-info(cf2=$cf2);

return 1;

What is the problem with the above code?

- Gergely


Re: [rt-users] scrip not logging

2012-08-13 Thread Ruslan Zakirov
On Mon, Aug 13, 2012 at 7:28 PM, Gergely Buday gbu...@gmail.com wrote:
 Hi there,

 my scrip is logged, but my logging commands do not result in a log
 line. Here is the log the system prints upon its start:

 Aug 13 17:23:04 dox RT:
 rt-4.0.3-25618-1344871384-617.2211-2...@dox.analogydialogue.com
 #2211/33968 - Scrip 23 Email dummy
 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)

 But the following condition does not write the any log:

 $RT::Logger-info(Hello RT World!);

 my $cf=$self-TransactionObj-CreatorObj-LoadCustomFieldByIdentifier('107');

 my $cf2 = $session-{'CurrentUser'}-UserObj-FirstCustomFieldValue('107');

 $RT::Logger-info(cf=$cf);
 $RT::Logger-info(cf2=$cf2);

 return 1;

 What is the problem with the above code?

Have you picked user defined condition for the scrip? Custom condition
code you write in the UI only works with User Defined.

 - Gergely



-- 
Best regards, Ruslan.


Re: [rt-users] Relay Access Denied on incoming email postfix. (RT 4.0.6)

2012-08-13 Thread Kevin Falcone
On Mon, Aug 13, 2012 at 04:08:46PM +0100, Hesan D Yousif wrote:
 /var/log/maillog gives the following response:
 
 Aug 13 15:36:00 rtsu postfix/smtpd[2985]: NOQUEUE: reject: RCPT from
 sivits.uscs.susx.ac.uk[139.184.14.88]: 554 5.7.1
 rt-su-activit...@ussusupport.co.uk: Relay access denied;
 from=h.d.you...@sussex.ac.uk
 to=rt-su-activit...@ussusupport.co.uk proto=ESMTP
 helo=sivits.uscs.susx.ac.uk

You don't appear to have told postfix that it accepts mail for
ussupport.co.uk.

This makes postfix think that you're asking it to relay, and it's set
up to deny relaying, hence the bounce.

There are a half dozen ways to configure postfix to accept mail for
ussupport.co.uk depending on what you're doing.  The simplest may be
setting mydestination, but review the postfix docs so you know if you
want that vs a virtual host.

-kevin


pgpkMsyeBj47N.pgp
Description: PGP signature