Emails to Queue Alias, still merge to other queue

Hello,

We have setup aliases for sendmail that route incoming emails to the
correct queue:
Example:

#RT Mailgate user for “it”
it: “|/opt/rt4/bin/rt-mailgate --queue ‘it’ --action correspond --url
company.net - Diese Website steht zum Verkauf! - Informationen zum Thema company.
it-comment: “|/opt/rt4/bin/rt-mailgate --queue ‘it’ --action comment --url
company.net - Diese Website steht zum Verkauf! - Informationen zum Thema company.

#RT Mailgate user for “production”
production: “|/opt/rt4/bin/rt-mailgate --queue ‘production’ --action
correspond --url company.net - Diese Website steht zum Verkauf! - Informationen zum Thema company.”"
production-comment: “|/opt/rt4/bin/rt-mailgate --queue production --action
comment --url company.net - Diese Website steht zum Verkauf! - Informationen zum Thema company.

We have started having an issue when an internal user forwards an email
with [ company.com #1234] that they have been CCed on, to a production
support queue by changing the To address to the email address for that
queue, but RT is seeing the original ticket number in the subject and is
merging the email with the comment to the original ticket.

This has caused comments meant for internal users, ie: “Is this a bug?” to
be sent to a customer unintentionally.

Is there any way to force RT to respect the incoming email/queue from
rt-mailgate over merging by the ticket numbers (when this type of thing
occurs)?

Thanks!

Kevin

Le 09/10/2014 21:41, Root Kev a �crit :

Hello,

We have setup aliases for sendmail that route incoming emails to the
correct queue:
Example:

#RT Mailgate user for “it”
it: “|/opt/rt4/bin/rt-mailgate --queue ‘it’ --action correspond --url
http://tracker.company.net/rt
it-comment: “|/opt/rt4/bin/rt-mailgate --queue ‘it’ --action comment
–url http://tracker.company.net/rt/

#RT Mailgate user for “production”
production: “|/opt/rt4/bin/rt-mailgate --queue ‘production’ --action
correspond --url http://tracker.company.net/rt”"
production-comment: “|/opt/rt4/bin/rt-mailgate --queue production
–action comment --url http://tracker.company.net/rt/

We have started having an issue when an internal user forwards an email
with [ company.com http://company.com #1234] that they have been CCed
on, to a production support queue by changing the To address to the
email address for that queue, but RT is seeing the original ticket
number in the subject and is merging the email with the comment to the
original ticket.

This has caused comments meant for internal users, ie: “Is this a bug?”
to be sent to a customer unintentionally.

Is there any way to force RT to respect the incoming email/queue from
rt-mailgate over merging by the ticket numbers (when this type of thing
occurs)?

no, you have to patch RT (lib/RT/Interfaces/Email.pm:sub Gateway) or
disallow the user to send a mail to a queue where the ticket doesn’t
belong to, by writing a MailPlugin
(rt-mailgate - RT 4.2.17 Documentation - Best Practical).

Easter-eggs Sp�cialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - M�tro Gait�
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com

This may not be the best solution, but it would be a solution.

If you had each queue in it’s own instance, or at least grouping the queues
into their own instances of RT in which each queue in RTinstance1 would
never have an email forwarded to any other queue in RTinstance1…

Again, probably isn’t what you’d like to do, but it is possible to prevent
the problem you are having by doing this.
Mike.On Wed, Oct 15, 2014 at 4:23 AM, Emmanuel Lacour elacour@easter-eggs.com wrote:

Le 09/10/2014 21:41, Root Kev a écrit :

Hello,

We have setup aliases for sendmail that route incoming emails to the
correct queue:
Example:

#RT Mailgate user for “it”
it: “|/opt/rt4/bin/rt-mailgate --queue ‘it’ --action correspond --url
http://tracker.company.net/rt
it-comment: “|/opt/rt4/bin/rt-mailgate --queue ‘it’ --action comment
–url http://tracker.company.net/rt/

#RT Mailgate user for “production”
production: “|/opt/rt4/bin/rt-mailgate --queue ‘production’ --action
correspond --url http://tracker.company.net/rt”"
production-comment: “|/opt/rt4/bin/rt-mailgate --queue production
–action comment --url http://tracker.company.net/rt/

We have started having an issue when an internal user forwards an email
with [ company.com http://company.com #1234] that they have been CCed
on, to a production support queue by changing the To address to the
email address for that queue, but RT is seeing the original ticket
number in the subject and is merging the email with the comment to the
original ticket.

This has caused comments meant for internal users, ie: “Is this a bug?”
to be sent to a customer unintentionally.

Is there any way to force RT to respect the incoming email/queue from
rt-mailgate over merging by the ticket numbers (when this type of thing
occurs)?

no, you have to patch RT (lib/RT/Interfaces/Email.pm:sub Gateway) or
disallow the user to send a mail to a queue where the ticket doesn’t
belong to, by writing a MailPlugin
(rt-mailgate - RT 4.2.17 Documentation - Best Practical
).


Easter-eggs Spécialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com

RT Training November 4 & 5 Los Angeles
http://bestpractical.com/training

Mike Johnson
Datatel Programmer/Analyst
Northern Ontario School of Medicine
955 Oliver Road
Thunder Bay, ON P7B 5E1
Phone: (807) 766-7331
Email: mike.johnson@nosm.ca

Any chance you could point me in the right direction as to how to patch
Email.pm to do the routing based on recipient email address?

It would be impossible to manually block individual users from each queue
that they are not suppose to email to, especially when we have customer
support type queue.

Thanks,

KevinOn Wed, Oct 15, 2014 at 4:23 AM, Emmanuel Lacour elacour@easter-eggs.com wrote:

Le 09/10/2014 21:41, Root Kev a écrit :

Hello,

We have setup aliases for sendmail that route incoming emails to the
correct queue:
Example:

#RT Mailgate user for “it”
it: “|/opt/rt4/bin/rt-mailgate --queue ‘it’ --action correspond --url
http://tracker.company.net/rt
it-comment: “|/opt/rt4/bin/rt-mailgate --queue ‘it’ --action comment
–url http://tracker.company.net/rt/

#RT Mailgate user for “production”
production: “|/opt/rt4/bin/rt-mailgate --queue ‘production’ --action
correspond --url http://tracker.company.net/rt”"
production-comment: “|/opt/rt4/bin/rt-mailgate --queue production
–action comment --url http://tracker.company.net/rt/

We have started having an issue when an internal user forwards an email
with [ company.com http://company.com #1234] that they have been CCed
on, to a production support queue by changing the To address to the
email address for that queue, but RT is seeing the original ticket
number in the subject and is merging the email with the comment to the
original ticket.

This has caused comments meant for internal users, ie: “Is this a bug?”
to be sent to a customer unintentionally.

Is there any way to force RT to respect the incoming email/queue from
rt-mailgate over merging by the ticket numbers (when this type of thing
occurs)?

no, you have to patch RT (lib/RT/Interfaces/Email.pm:sub Gateway) or
disallow the user to send a mail to a queue where the ticket doesn’t
belong to, by writing a MailPlugin
(rt-mailgate - RT 4.2.17 Documentation - Best Practical
).


Easter-eggs Spécialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com

RT Training November 4 & 5 Los Angeles
http://bestpractical.com/training

Le 15/10/2014 22:59, Root Kev a �crit :

Any chance you could point me in the right direction as to how to patch
Email.pm to do the routing based on recipient email address?

I’m sorry, not until …some months, I’m very busy on many RT projects :frowning:

Easter-eggs Sp�cialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - M�tro Gait�
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com

Is there any way to force RT to respect the incoming email/queue from
rt-mailgate over merging by the ticket numbers (when this type of thing
occurs)?

As I believe has been said, but I’ll repeat it.
Using the ticket id instead of the incoming email is a feature of RT.

For example, it allows me to move a ticket from development to sales
when we need to get something quoted back and a user can email any
address and have it routed.

no, you have to patch RT (lib/RT/Interfaces/Email.pm:sub Gateway) or
disallow the user to send a mail to a queue where the ticket doesn’t
belong to, by writing a MailPlugin
(rt-mailgate - RT 4.2.17 Documentation - Best Practical).

Alternately, you can use the same code used by the RepliesToResolved
plugin which forces new ticket creation if the replied to ticket is in
an inactive state.

http://bestpractical.com/docs/rt/latest/RT/Interface/Email.html#ExtractTicketId

Hopefully soon we’ll release a backport of the new gateway we’re
developing for 4.4 which would also make plugging this in easier.

-kevin

Hello Kevin,

The issue is when some who is an adminCC on a support queue then forwards
the ticket email (without removing the ticket number) to a engineering
queue email, expecting only the engineers to see it, but because it still
has the same ticket ID in the subject RT is merging it back to the original
customer support queue, with embarrassing results (customer gets email
intended for internal only).

Thanks,

KevinOn Thu, Oct 16, 2014 at 12:11 PM, Kevin Falcone falcone@bestpractical.com wrote:

On Wed, Oct 15, 2014 at 10:23:48AM +0200, Emmanuel Lacour wrote:

Is there any way to force RT to respect the incoming email/queue from
rt-mailgate over merging by the ticket numbers (when this type of thing
occurs)?

As I believe has been said, but I’ll repeat it.
Using the ticket id instead of the incoming email is a feature of RT.

For example, it allows me to move a ticket from development to sales
when we need to get something quoted back and a user can email any
address and have it routed.

no, you have to patch RT (lib/RT/Interfaces/Email.pm:sub Gateway) or
disallow the user to send a mail to a queue where the ticket doesn’t
belong to, by writing a MailPlugin
(
rt-mailgate - RT 4.2.17 Documentation - Best Practical
).

Alternately, you can use the same code used by the RepliesToResolved
plugin which forces new ticket creation if the replied to ticket is in
an inactive state.

GitHub - bestpractical/rt-extension-repliestoresolved

RT::Interface::Email - RT 5.0.5 Documentation - Best Practical

Hopefully soon we’ll release a backport of the new gateway we’re
developing for 4.4 which would also make plugging this in easier.

-kevin


RT Training November 4 & 5 Los Angeles
http://bestpractical.com/training

The issue is when some who is an adminCC on a support queue then forwards the
ticket email (without removing the ticket number) to a engineering queue email,

I understand your use case, I was explaining why RT itself has the
behavior it has and why that behavior isn’t likely to change and
suggest a few ways you could implement this local change cleanly.

-kevin