Creating tickets on behalf of users via email

Hi all

I’m increasingly finding it desirable to open correspondence with a
client by email and have the conversation tracked in RT. This is
cumbersome enough to do that I wonder if I’m missing something obvious.

I can create a ticket in their name via the web ui, but that results in
an auto-acknowledgement email to them and doesn’t send them a copy of
the request its self since they’re presumed to have sent it.

I can create it with me as requestor, add them as Cc, save, then delete
them from Cc and add them as requestor afterwards. That seems awfully
convoluted, though, and doesn’t allow me to create a ticket in their
name by email.

Essentially I want to be able to email bob@customer.com, Cc RT, set
happening, setting them as requestor instead of me and suppressing the
auto-acknowledgement to them. After having a look at the code, docs and
list archives I suspect that I will need to write my own email gateway
to do this job but I’d like to confirm that. The mail plugin API doesn’t
look flexible enough, it’s really just for authenticating users and
doesn’t give you hooks after ticket creation.

If I was to write something like this would it be useful to others?
Would the RT team be prepared to accept a patch either for the hooks + a
CPAN plugin, or for the whole feature integrated into the RT code?

Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Hi all

I’m increasingly finding it desirable to open correspondence with a
client by email and have the conversation tracked in RT. This is
cumbersome enough to do that I wonder if I’m missing something obvious.

I can create a ticket in their name via the web ui, but that results in
an auto-acknowledgement email to them and doesn’t send them a copy of
the request its self since they’re presumed to have sent it.

I can create it with me as requestor, add them as Cc, save, then delete
them from Cc and add them as requestor afterwards. That seems awfully
convoluted, though, and doesn’t allow me to create a ticket in their
name by email.

Essentially I want to be able to email bob@customer.com, Cc RT, set
happening, setting them as requestor instead of me and suppressing the
auto-acknowledgement to them. After having a look at the code, docs and
list archives I suspect that I will need to write my own email gateway
to do this job but I’d like to confirm that. The mail plugin API doesn’t
look flexible enough, it’s really just for authenticating users and
doesn’t give you hooks after ticket creation.

If I was to write something like this would it be useful to others?
Would the RT team be prepared to accept a patch either for the hooks + a
CPAN plugin, or for the whole feature integrated into the RT code?

BTW, I’ve pushed RT::Extension::CustomerGroups to CPAN:

http://search.cpan.org/~ringerc/RT-Extension-CustomerGroups/

http://search.cpan.org/~ringerc/RT-Extension-CustomerGroups/

as well as an updated RT::Extension::SMSNotify that supports a hookable
phone number lookup/filter function. A demo hook that implements rolling
support shifts for SMS notification is included in the update. See:

http://search.cpan.org/~ringerc/RT-Extension-SMSNotify/

http://search.cpan.org/~ringerc/RT-Extension-SMSNotify/

Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Hi all

I’m increasingly finding it desirable to open correspondence with a client by email and have the conversation tracked in RT. This is cumbersome enough to do that I wonder if I’m missing something obvious.

I can create a ticket in their name via the web ui, but that results in an auto-acknowledgement email to them and doesn’t send them a copy of the request its self since they’re presumed to have sent it.

I can create it with me as requestor, add them as Cc, save, then delete them from Cc and add them as requestor afterwards. That seems awfully convoluted, though, and doesn’t allow me to create a ticket in their name by email.

Remember it’s trivially easy to write scripts which forge email headers, in most environments. All you need to do is set the From: header to the user’s email address, and RT will do the right thing with it. You can do this trivially using sendmail on the UNIX command line:

$ /usr/lib/sendmail -t << EOFFrom: Barack Obama president@whitehouse.gov
To: tim@example.com
Subject: Fake email

This email is not really from Barack Obama…
EOF

Tim

The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.

Have you looked at the CommandbyMail extension? It might have the flexibility you need.

Jim BerryFrom: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Craig Ringer
Sent: Tuesday, April 09, 2013 8:18 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Creating tickets on behalf of users via email

Hi all

I’m increasingly finding it desirable to open correspondence with a client by email and have the conversation tracked in RT. This is cumbersome enough to do that I wonder if I’m missing something obvious.

I can create a ticket in their name via the web ui, but that results in an auto-acknowledgement email to them and doesn’t send them a copy of the request its self since they’re presumed to have sent it.

I can create it with me as requestor, add them as Cc, save, then delete them from Cc and add them as requestor afterwards. That seems awfully convoluted, though, and doesn’t allow me to create a ticket in their name by email.

Essentially I want to be able to email bob@customer.commailto:bob@customer.com, Cc RT, set Reply-To: to the RT address and have RT recognise that’s what’s happening, setting them as requestor instead of me and suppressing the auto-acknowledgement to them. After having a look at the code, docs and list archives I suspect that I will need to write my own email gateway to do this job but I’d like to confirm that. The mail plugin API doesn’t look flexible enough, it’s really just for authenticating users and doesn’t give you hooks after ticket creation.

If I was to write something like this would it be useful to others? Would the RT team be prepared to accept a patch either for the hooks + a CPAN plugin, or for the whole feature integrated into the RT code?

BTW, I’ve pushed RT::Extension::CustomerGroups to CPAN:

http://search.cpan.org/~ringerc/RT-Extension-CustomerGroups/<http://search.cpan.org/%7Eringerc/RT-Extension-CustomerGroups/>

as well as an updated RT::Extension::SMSNotify that supports a hookable phone number lookup/filter function. A demo hook that implements rolling support shifts for SMS notification is included in the update. See:

http://search.cpan.org/~ringerc/RT-Extension-SMSNotify/<http://search.cpan.org/%7Eringerc/RT-Extension-SMSNotify/>

Craig Ringer http://www.2ndQuadrant.com/

PostgreSQL Development, 24x7 Support, Training & Services

Just my two cents,

On sendmail when you rewrite you need to setup MASQUERADE and GENERICSTABLE options, some mailservers block when the field “from” mismatch (Gmail doesn’t but Office365 will).

BTW I prefer postfix for this work, you should be good only with smtp_generic_maps.

-----Mensagem original-----De: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] Em nome de Tim Cutts
Enviada em: terça-feira, 9 de abril de 2013 10:03
Para: Craig Ringer
Cc: rt-users@lists.bestpractical.com
Assunto: Re: [rt-users] Creating tickets on behalf of users via email

Hi all

I’m increasingly finding it desirable to open correspondence with a client by email and have the conversation tracked in RT. This is cumbersome enough to do that I wonder if I’m missing something obvious.

I can create a ticket in their name via the web ui, but that results in an auto-acknowledgement email to them and doesn’t send them a copy of the request its self since they’re presumed to have sent it.

I can create it with me as requestor, add them as Cc, save, then delete them from Cc and add them as requestor afterwards. That seems awfully convoluted, though, and doesn’t allow me to create a ticket in their name by email.

Remember it’s trivially easy to write scripts which forge email headers, in most environments. All you need to do is set the From: header to the user’s email address, and RT will do the right thing with it. You can do this trivially using sendmail on the UNIX command line:

$ /usr/lib/sendmail -t << EOF
From: Barack Obama president@whitehouse.gov
To: tim@example.com
Subject: Fake email

This email is not really from Barack Obama…
EOF

Tim

The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

Hi Craig,

Check out our solution on the RT wiki http://requesttracker.wikia.com/wiki/AutoreplyOrCorrespondence, it describes a template you use for an autoreply. The effect of using this template is that if a ticket is created on behalf of a customer they receive the message you create (on ticket creation) as if it is a reply rather than the default cryptic auto-reply.

It works by checking upon ticket creation if the creator is the same as any of the requestors as is the case when a client creates a ticket themselves. If so it loads and processes the Autoreply template searching first in the current queue and if there isn’t one there resorting to the global version.

If the requestor is not the creator (i.e. the case when you create a ticket on behalf of a client) it processes the Correspondence template instead doing the same search for the template as described above.On 10/04/2013, at 12:29 AM, Diaulas Castro diaulas.castro@intersolution.inf.br wrote:

Just my two cents,

On sendmail when you rewrite you need to setup MASQUERADE and GENERICSTABLE options, some mailservers block when the field “from” mismatch (Gmail doesn’t but Office365 will).

BTW I prefer postfix for this work, you should be good only with smtp_generic_maps.

-----Mensagem original-----
De: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] Em nome de Tim Cutts
Enviada em: terça-feira, 9 de abril de 2013 10:03
Para: Craig Ringer
Cc: rt-users@lists.bestpractical.com
Assunto: Re: [rt-users] Creating tickets on behalf of users via email

On 9 Apr 2013, at 08:18, Craig Ringer craig@2ndquadrant.com wrote:

Hi all

I’m increasingly finding it desirable to open correspondence with a client by email and have the conversation tracked in RT. This is cumbersome enough to do that I wonder if I’m missing something obvious.

I can create a ticket in their name via the web ui, but that results in an auto-acknowledgement email to them and doesn’t send them a copy of the request its self since they’re presumed to have sent it.

I can create it with me as requestor, add them as Cc, save, then delete them from Cc and add them as requestor afterwards. That seems awfully convoluted, though, and doesn’t allow me to create a ticket in their name by email.

Remember it’s trivially easy to write scripts which forge email headers, in most environments. All you need to do is set the From: header to the user’s email address, and RT will do the right thing with it. You can do this trivially using sendmail on the UNIX command line:

$ /usr/lib/sendmail -t << EOF
From: Barack Obama president@whitehouse.gov
To: tim@example.com
Subject: Fake email

This email is not really from Barack Obama…
EOF

Tim


The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.