RT customize SendEmail.pm

Hello!

I want to modify the SendEmail.pm module, to disable the
check for RTAdresses, so we want to send emails
even if RT thinks they are RT email adresses.

I would copy the file SendEmail.pm to “SendEmail_Local.pm” and remove
these lines

$self->RecipientFilter(
    Callback => sub {
        return unless RT::EmailParser->IsRTAddress( $_[0] );
        return "$_[0] appears to point to this RT instance. Skipping";
    },
    All => 1,
);

would this work?

regards!

Sven

Sven Sternberger
System Engineer
Tel.: 040/8998-4397
DESY IT

Hello!

I want to modify the SendEmail.pm module, to disable the
check for RTAdresses, so we want to send emails
even if RT thinks they are RT email adresses.

I would copy the file SendEmail.pm to “SendEmail_Local.pm” and remove
these lines

$self->RecipientFilter(
    Callback => sub {
        return unless RT::EmailParser->IsRTAddress( $_[0] );
        return "$_[0] appears to point to this RT instance. Skipping";
    },
    All => 1,
);

would this work?

regards!

Sven

Sven Sternberger
System Engineer
Tel.: 040/8998-4397
DESY IT

Hi Sven,

That sounds like a really, really bad idea. This is a great way to start
a mail loop, having a program Email itself. Why are you trying to do this?

Regards,
Ken

Hello!

----- Ursprüngliche Mail -----

Von: ktm@rice.edu
That sounds like a really, really bad idea. This is a great way to start
a mail loop, having a program Email itself. Why are you trying to do this?

all emails to RT will be filtered with procmail, if the mail is originated
by the RT, we will reroute the mail to the mailadresses of the queue members.
This gives you simple way to send mail from queue_a to all members of queue_b

regards!

Sven

Hello!

----- Urspr�ngliche Mail -----

Von: ktm@rice.edu
That sounds like a really, really bad idea. This is a great way to start
a mail loop, having a program Email itself. Why are you trying to do this?

all emails to RT will be filtered with procmail, if the mail is originated
by the RT, we will reroute the mail to the mailadresses of the queue members.
This gives you simple way to send mail from queue_a to all members of queue_b

regards!

Sven

Hi Sven,

I must have missed your previous Email. I understand your use of procmail on
the inbound path to RT in order to deliver to the appropriate queues based
on message details. I do not understand what you mean by:

if the mail is originated
by the RT, we will reroute the mail to the mailadresses of the queue members.
This gives you simple way to send mail from queue_a to all members of queue_b

What are “members of queue_b”? Would you please explain this a little bit
further.

Regards,
Ken

Hi!

----- Ursprüngliche Mail -----

Von: ktm@rice.edu
on message details. I do not understand what you mean by:

if the mail is originated
by the RT, we will reroute the mail to the mailadresses of the queue members.
This gives you simple way to send mail from queue_a to all members of queue_b

What are “members of queue_b”? Would you please explain this a little bit
further.

We have several queues (about 20) and each queue has a set of people which
work in this queue. (which means they have the right to resolve tickets)

What I do is I create for each queue a list of persons and their email
adresses which work in the queue.

A typical workflow is that in one queue a ticket is created and the requestor
is not a single person but a different queue.
If there is a reply to the ticket a mail is send to the queue. The procmail filter
now don’t start the rt-mailgate but sends the mail to list which I created before.

regards!

Sven

Hello!

just for the records.

To disable the check for outgoing emails if they
contain Adresses RT thinks they will create a loop
you have to create

/opt/rt4/lib/RT/Action/SendEmail_Local.pm

and disable there the check.

To be able to enter a RT adress without error messages in the
WebUI you have to create
/opt/rt4/local/html/Ticket/Update.html
/opt/rt4/local/html/Ticket/Create.html
/opt/rt4/local/html/m/ticket/create
/opt/rt4/local/html/m/ticket/reply

and disable there the check.

I also found the check here:
/opt/rt4/lib/RT/Record/Role/Roles.pm
no idea when this wil be used.

result:

  • In incomming emails, the queue email adress is removed.
  • I can create a ticket in the WebUI set the requestor/cc/admincc to a “RT” mail address.
  • My procmail recipes prevents RT loops but send the mail to the queue staff

regards!

Sven

----- Ursprüngliche Mail -----

For posterity, RT v4.2.10 introduces the ability to add groups as
requestors. If I understand this thread correctly (“a group of people
belonging to another queue are requesting work in this queue”), RT v4.2.10
should allow the desired behaviour without code modifications.On Fri, 20 Feb 2015 at 21:10 Sternberger, Sven sven.sternberger@desy.de wrote:

Hello!

just for the records.

To disable the check for outgoing emails if they
contain Adresses RT thinks they will create a loop
you have to create

/opt/rt4/lib/RT/Action/SendEmail_Local.pm

and disable there the check.

To be able to enter a RT adress without error messages in the
WebUI you have to create
/opt/rt4/local/html/Ticket/Update.html
/opt/rt4/local/html/Ticket/Create.html
/opt/rt4/local/html/m/ticket/create
/opt/rt4/local/html/m/ticket/reply

and disable there the check.

I also found the check here:
/opt/rt4/lib/RT/Record/Role/Roles.pm
no idea when this wil be used.

result:

  • In incomming emails, the queue email adress is removed.
  • I can create a ticket in the WebUI set the requestor/cc/admincc to a
    "RT" mail address.
  • My procmail recipes prevents RT loops but send the mail to the queue
    staff

regards!

Sven

----- Ursprüngliche Mail -----

Von: “Sternberger, Sven” sven.sternberger@desy.de
An: rt-users@lists.bestpractical.com
Gesendet: Mittwoch, 28. Januar 2015 10:40:32
Betreff: RT customize SendEmail.pm

Hello!

I want to modify the SendEmail.pm module, to disable the
check for RTAdresses, so we want to send emails
even if RT thinks they are RT email adresses.

I would copy the file SendEmail.pm to “SendEmail_Local.pm” and remove
these lines

$self->RecipientFilter(
Callback => sub {
return unless RT::EmailParser->IsRTAddress( $[0] );
return "$
[0] appears to point to this RT instance. Skipping";
},
All => 1,
);

would this work?

regards!

Sven

Sven Sternberger
System Engineer
Tel.: 040/8998-4397
DESY IT

Hi!

this sounds good but I can’t find it in the UI. Your are probably not referring
the “rt-email-group-admin” command and a static configuration.

regards!

Sven

Ah ok I finally found it, I have to create the ticket first, and then I
can add the group as requestor in the people tab.

So our user set the requestor when they create the ticket (to
send them the initial ticket description).

So is there a way to put the requestor group field into the create page?

regards!

Sven