Problem with mail bounce

Hi all,
we have a problem when we need to forward a ticket (or part of it) to someone who is not a requestor or CC of the ticket itself.

RT currently has a limitation on the forward operation, in that it doesn’t allow to add a comment to the forwarded message. This is not acceptable, because the receiving end will not know why he/she receives the message and what we’re talking about.

To overcome this limitation we usually proceed like this:

  1. we copy the text to forward in a new Outlook message
  2. we set the sender as the private email address of who is sending
  3. we mangle the subject so that it contains the magic RT token with the number of the original ticket
  4. we add a special RT adress as BCC; this address is configured so that it triggers a comment action instead of a correspond action

This has always worked well, although it is a bit cumbersome.

But sometimes the receiving end replies, starting a lengthy new thread that needs to be appended to the ticket history. We can do it by forwarding each message to the special RT address (see step 4 above), but this is not optimal.

Instead we thought of modifying the procedure adding a fifth step:

  1. set the Reply-To header with our normal RT address

This way, when the subject receiving the forwarded email replies, it automatically is appended to the ticket and other participants are notified of the reply.

However when we try to do this, RT replies back telling that it cannot record the email, with a permission denied error. The RT log reports that RT believes it got a message from itself and so it did not record it.

Here is one example:

[Mon May 6 09:42:32 2013] [crit]: RT Received mail ( ) from itself. (/opt/rt3/bin/…/lib/RT/Interface/Email.pm:1740)
[Mon May 6 09:42:32 2013] [crit]: RT thinks this message may be a bounce (/opt/rt3/bin/…/lib/RT/Interface/Email.pm:244)
[Mon May 6 09:42:32 2013] [error]: Could not record email: Message Bounced (/opt/rt3/share/html/REST/1.0/NoAuth/mail-gateway:75)

I can’t figure out why RT thinks it is receiving a mail from itself. Is it a bug? Or is there something else that I can’t think of?

Thank you in advance.
Bye
Cris

Cristiano Guadagnino
Servizio Data Administration
Bankadati S.I.
Gruppo Credito Valtellinese
Tel. +39-0342-522172

There definitely is something weird with the way the “reply-to” header is treated from RT.

I did some more tests on a quite clean test system (RT 3.8.10) and I always get a “permission denied” error as soon as I add the reply-to header.

By enabling debug logs I see RT thinks he is receiving the email message from the address in the “reply-to” header instead of the “from” header.
That would also explain why I was getting the “RT Received mail ( ) from itself.” message in my previous experiments.

I know I’m not on the latest release… is this a known problem (already fixed, maybe)?

I also found very old references to this same problem in the mailing list archives (without meaningful replies).

Bye
Cris

Guadagnino Cristiano wrote:
Hi all,
we have a problem when we need to forward a ticket (or part of it) to someone who is not a requestor or CC of the ticket itself.

RT currently has a limitation on the forward operation, in that it doesn’t allow to add a comment to the forwarded message. This is not acceptable, because the receiving end will not know why he/she receives the message and what we’re talking about.

To overcome this limitation we usually proceed like this:

  1. we copy the text to forward in a new Outlook message
  2. we set the sender as the private email address of who is sending
  3. we mangle the subject so that it contains the magic RT token with the number of the original ticket
  4. we add a special RT adress as BCC; this address is configured so that it triggers a comment action instead of a correspond action

This has always worked well, although it is a bit cumbersome.

But sometimes the receiving end replies, starting a lengthy new thread that needs to be appended to the ticket history. We can do it by forwarding each message to the special RT address (see step 4 above), but this is not optimal.

Instead we thought of modifying the procedure adding a fifth step:

  1. set the Reply-To header with our normal RT address

This way, when the subject receiving the forwarded email replies, it automatically is appended to the ticket and other participants are notified of the reply.

However when we try to do this, RT replies back telling that it cannot record the email, with a permission denied error. The RT log reports that RT believes it got a message from itself and so it did not record it.

Here is one example:

[Mon May 6 09:42:32 2013] [crit]: RT Received mail ( ) from itself. (/opt/rt3/bin/…/lib/RT/Interface/Email.pm:1740)
[Mon May 6 09:42:32 2013] [crit]: RT thinks this message may be a bounce (/opt/rt3/bin/…/lib/RT/Interface/Email.pm:244)
[Mon May 6 09:42:32 2013] [error]: Could not record email: Message Bounced (/opt/rt3/share/html/REST/1.0/NoAuth/mail-gateway:75)

I can’t figure out why RT thinks it is receiving a mail from itself. Is it a bug? Or is there something else that I can’t think of?

Thank you in advance.
Bye
Cris

Cristiano Guadagnino
Servizio Data Administration
Bankadati S.I.
Gruppo Credito Valtellinese
Tel. +39-0342-522172

Cristiano Guadagnino
Servizio Data Administration
Bankadati S.I.
Gruppo Credito Valtellinese
Tel. +39-0342-522172

There definitely is something weird with the way the “reply-to” header
is treated from RT.

I did some more tests on a quite clean test system (RT 3.8.10) and I
always get a “permission denied” error as soon as I add the reply-to header.

By enabling debug logs I see RT thinks he is receiving the email message
from the address in the “reply-to” header instead of the “from” header.
That would also explain why I was getting the “RT Received mail ( ) from
itself.” message in my previous experiments.

This is a feature, not a bug. Reply-To: is preferred over From: is
preferred over Sender: when determining the actor via email. Among
other things, this is useful to create tickets on behalf of someone else
via email. The original From: is still visible in the ticket history.

FWIW, we have code to let you include a message when forwarding, and I
hope that it makes it into 4.2.

  1. we copy the text to forward in a new Outlook message
  2. we set the sender as the private email address of who is sending
  3. we mangle the subject so that it contains the magic RT token with the number of the original ticket
  4. we add a special RT adress as BCC; this address is configured so that it triggers a comment action instead of a correspond action
  5. set the Reply-To header with our normal RT address

Instead of doing the above, why don’t you just keep it inside RT all along?

  1. Copy text to forward into a new RT comment
  2. Set the One-time Cc to the person receiving the forward
  3. Uncheck all other recipients from the “Scrips and Recipients” box.
    This should be easier if you enable the $SimplifiedRecipients option.

Then the “forward” will come from RT originally, only go to the one-time
cc, and be recorded on the ticket. Any replies will end up as comments
on the ticket (assuming your queue comment address and /etc/aliases is
setup correctly). Less steps, less needing to go outside RT only to
shove stuff back in.

Thomas,
thank you very much!!! This is exactly what I was looking for.

Also, I am happy to know that this limitation will be removed in 4.2.

Bye
Cris

Thomas Sibley wrote:

Instead of doing the above, why don’t you just keep it inside RT all along?

  1. Copy text to forward into a new RT comment
  2. Set the One-time Cc to the person receiving the forward
  3. Uncheck all other recipients from the “Scrips and Recipients” box.
    This should be easier if you enable the $SimplifiedRecipients option.

Then the “forward” will come from RT originally, only go to the one-time
cc, and be recorded on the ticket. Any replies will end up as comments
on the ticket (assuming your queue comment address and /etc/aliases is
setup correctly). Less steps, less needing to go outside RT only to
shove stuff back in.

Cristiano Guadagnino
Servizio Data Administration
Bankadati S.I.
Gruppo Credito Valtellinese
Tel. +39-0342-522172