Auto-generated email response fails with topic not found

email

(Brian Adams) #1

I am trying to get Discourse to engage Zendesk by setting up the support address as an account that people can PM. The PM should shoot an email in to Zendesk. From there I should be able to file responses in Zendesk which generate a response email back to discourse which should get added to the PM topic. Instead, Discourse is rejecting the email from Zendesk with the following error message:

We’re sorry, but your email message to [“forum-replies+0ad32e9acaf9153383d272fb0ab3eca8@openrov.com”] (titled [Request received] [OpenROV Forums] [PM] New test message that should go in zendesk) didn’t work. The topic is not found, it may have been deleted. If you believe this is in error, contact a staff member.

However, If I reply to the reply address from another account, it goes through no problem.

The following is the raw message that was sent from zendesk. Are there some subtle rules that are having an issue with the support+id199@openrov.zendesk.com address? Is it the multipart email?

Delivered-To: forum-replies+0ad32e9acaf9153383d272fb0ab3eca8@openrov.com
Received: by 10.27.91.17 with SMTP id p17csp875057wlb;
        Tue, 10 Feb 2015 13:47:52 -0800 (PST)
X-Received: by 10.194.109.9 with SMTP id ho9mr55544771wjb.29.1423604872331;
        Tue, 10 Feb 2015 13:47:52 -0800 (PST)
Return-Path: <support@openrov.zendesk.com>
Received: from out2.pod4.sac1.zdsys.com (out2.pod4.sac1.zdsys.com. [192.161.146.69])
        by mx.google.com with ESMTPS id o10si31193110wjx.108.2015.02.10.13.47.51
        for <forum-replies+0ad32e9acaf9153383d272fb0ab3eca8@openrov.com>
        (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 10 Feb 2015 13:47:52 -0800 (PST)
Received-SPF: pass (google.com: domain of support@openrov.zendesk.com designates 192.161.146.69 as permitted sender) client-ip=192.161.146.69;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of support@openrov.zendesk.com designates 192.161.146.69 as permitted sender) smtp.mail=support@openrov.zendesk.com;
       dkim=pass header.i=@zendesk.com;
       dmarc=pass (p=NONE dis=NONE) header.from=zendesk.com
Received: from zendesk.com (work4.pod4.sac1.zdsys.com [10.100.5.14])
	by out2.pod4.sac1.zdsys.com (Postfix) with ESMTP id 76694211A7F8
	for <forum-replies+0ad32e9acaf9153383d272fb0ab3eca8@openrov.com>; Tue, 10 Feb 2015 21:47:50 +0000 (UTC)
Date: Tue, 10 Feb 2015 21:47:50 +0000
From: OpenROV <support@openrov.zendesk.com>
Reply-To: OpenROV <support+id199@openrov.zendesk.com>
To: Brian Adams <forum-replies+0ad32e9acaf9153383d272fb0ab3eca8@openrov.com>
Message-ID: <X63A1VDG_54da7c864dda1_3cf53fdd4d0cd338130394_sprut@zendesk.com>
In-Reply-To: <X63A1VDG@zendesk.com>
Subject: [Request received] [OpenROV Forums] [PM] New test message that should
 go in zendesk
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="--==_mimepart_54da7c866f5cb_3cf53fdd4d0cd3381304141";
 charset=utf-8
Content-Transfer-Encoding: 7bit
X-Auto-Response-Suppress: All
Auto-Submitted: auto-generated
X-Mailer: Zendesk Mailer
X-Delivery-Context: event-id-16904952239
DKIM-Signature:  v=1; a=rsa-sha256; c=relaxed/relaxed; d=zendesk.com;
 q=dns/txt; s=zendesk1; t=1423604870;
 bh=F3vbRBniojK4Gs+AEz4TKGIF1VI4FbTXH0KcpetPi7M=;
 h=date:from:reply-to:to:message-id:in-reply-to:subject:mime-version:content-type:content-transfer-encoding;
 b=Mb9AdhS+PmA1fViU6C9JM9TUwZHl5IORj+ru8iT1PJlEzcPegJnc1vbaKQZ7zH2aAxVTUPYdr2Seom7EjpWJthUxPqNQN+4/4KKNyGaii0Xvb2OjfqgUn3Vu1TFcNChLstvydqaW6RkASWMVQiU/nJoTZiVPah1+HqHpG1MsLBc=


----==_mimepart_54da7c866f5cb_3cf53fdd4d0cd3381304141
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

##- Please type your reply above this line -##

[Request received] [OpenROV Forums] [PM] New test message that should go =
in zendesk

Your request, request #(199) has been received. Please allow 24-48 hours =
for a reply.

To add additional comments, reply to this email.

----------------------------------------------

Brian A, Feb 10, 11:47

Just assign to Brian A so he can test the reply functionality.

Posted by badevguru on 02/10/2015






---
To respond, reply to this email or visit https://forum.openrov.com/t/new-=
test-message-that-should-go-in-zendesk/2239/1 in your browser.

To unsubscribe from these emails, visit your [user preferences](https://f=
orum.openrov.com/my/preferences).

--------------------------------
This email is a service from OpenROV.









[X63A-1VDG]=

----==_mimepart_54da7c866f5cb_3cf53fdd4d0cd3381304141
Content-Type: text/html;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ww=
w.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8=
" />
  <style type=3D"text/css">
    table td {
      border-collapse: collapse;
    }
    =

  </style>
</head>
<body  style=3D"width: 100%!important; margin: 0; padding: 0;">
  <div style=3D"padding: 10px ; line-height: 18px; font-family: 'Lucida G=
rande',Verdana,Arial,sans-serif; font-size: 12px; color:#444444;">
    <div style=3D"color: #b5b5b5;">##- Please type your reply above this =
line -##</div>
    <p>Your request, request #(199) has been received. Please allow 24-48=
 hours for a reply.</p><p>To add additional comments, reply to this email=
.</p><p></p><div style=3D"margin-top: 25px" data-version=3D"2"><table wid=
th=3D"100%" cellpadding=3D"0" cellspacing=3D"0" border=3D"0"><tr><td widt=
h=3D"100%" style=3D"padding: 15px 0; border-top: 1px dotted #c5c5c5;">   =
   <table width=3D"100%" cellpadding=3D"0" cellspacing=3D"0" border=3D"0"=
 style=3D" table-layout:fixed;"><tr><td valign=3D"top" style=3D"padding: =
0 15px 0 0;width: 40px;">              <img alt=3D"Brian Adam" height=3D"=
40" src=3D"http://www.gravatar.com/avatar/dd066e70b85ab560d7517c4afa98147=
4?size=3D40&amp;default=3Dhttps%3A%2F%2Fassets.zendesk.com%2Fimages%2Ffra=
me_user.png&amp;r=3Dg" style=3D"height: auto; line-height: 100%; outline:=
 none; text-decoration: none; -webkit-border-radius: 5px; -moz-border-rad=
ius: 5px; border-radius: 5px;" width=3D"40" /></td>                    <t=
d width=3D"100%" style=3D"padding: 0; margin: 0;" valign=3D"top">        =
    <p style=3D"font-family: 'Lucida Grande','Lucida Sans Unicode','Lucid=
a Sans',Verdana,Tahoma,sans-serif; font-size: 15px; line-height: 18px; ma=
rgin-bottom: 0; margin-top: 0; padding: 0; color:#1b1d1e;">              =
<strong>Brian Adams</strong>             </p>            <p style=3D"font=
-family: 'Lucida Grande','Lucida Sans Unicode','Lucida Sans',Verdana,Taho=
ma,sans-serif; font-size: 13px; line-height: 25px; margin-bottom: 15px; m=
argin-top: 0; padding: 0; color:#bbbbbb;">              Feb 10, 11:47    =
        </p>                                      <p style=3D"line-height=
: 22px; font-family:'Lucida Grande','Lucida Sans Unicode','Lucida Sans',V=
erdana,Tahoma,sans-serif; margin-top: 15px; margin-bottom: 15px; font-siz=
e: 14px; color:#2b2e2f;">    Just assign to Brian A so he can test the re=
ply functionality.  </p>  <p style=3D"line-height: 22px; font-family:'Luc=
ida Grande','Lucida Sans Unicode','Lucida Sans',Verdana,Tahoma,sans-serif=
; margin-top: 15px; margin-bottom: 15px; font-size: 14px; color:#2b2e2f;"=
>    Posted by badevguru on 02/10/2015  </p>  <p style=3D"line-height: 22=
px; font-family:'Lucida Grande','Lucida Sans Unicode','Lucida Sans',Verda=
na,Tahoma,sans-serif; margin-top: 15px; margin-bottom: 15px; font-size: 1=
4px; color:#2b2e2f;">      </p>  <p style=3D"line-height: 22px; font-fami=
ly:'Lucida Grande','Lucida Sans Unicode','Lucida Sans',Verdana,Tahoma,san=
s-serif; margin-top: 15px; margin-bottom: 15px; font-size: 14px; color:#2=
b2e2f;">      </p>  <p style=3D"line-height: 22px; font-family:'Lucida Gr=
ande','Lucida Sans Unicode','Lucida Sans',Verdana,Tahoma,sans-serif; marg=
in-top: 15px; margin-bottom: 15px; font-size: 14px; color:#2b2e2f;">    <=
br />  ---<br />  To respond, reply to this email or visit <a href=3D"htt=
ps://forum.openrov.com/t/new-test-message-that-should-go-in-zendesk/2239/=
1">https://forum.openrov.com/t/new-test-message-that-should-go-in-zendesk=
/2239/1</a> in your browser.  </p>  <p style=3D"line-height: 22px; font-f=
amily:'Lucida Grande','Lucida Sans Unicode','Lucida Sans',Verdana,Tahoma,=
sans-serif; margin-top: 15px; margin-bottom: 15px; font-size: 14px; color=
:#2b2e2f;">    To unsubscribe from these emails, visit your [user prefere=
nces](<a href=3D"https://forum.openrov.com/my/preferences">https://forum.=
openrov.com/my/preferences</a>).  </p>                                  <=
/td>        </tr></table></td>  </tr></table></div>
    <div style=3D"color: #aaaaaa; margin: 10px 0 14px 0; padding-top: 10p=
x; border-top: 1px solid #eeeeee;">
     This email is a service from OpenROV. Delivered by <a href=3D"http:/=
/www.zendesk.com/help-desk-software/?utm_medium=3Dpoweredbyzendesk&utm_so=
urce=3Demail-notification&utm_campaign=3Dtext">Zendesk</a>.
    </div>
  </div>
<span style=3D'color:#FFFFFF'>Message-Id:X63A1VDG_54da7c864dda1_3cf53fdd4=
d0cd338130394_sprut</span></body>
</html>

----==_mimepart_54da7c866f5cb_3cf53fdd4d0cd3381304141--

(Jeff Atwood) #2

As which user? My guess is this user does not have visibility to that PM. Only admins can really view PMs for other users. Mods cannot even do that.


(Brian Adams) #3

Sorry, let me clarify,

This was a user (Brian Adams) who sent a PM to (support@openrov.zendesk.com)
(support@openrov.zendesk.com) then did an email reply back to (Brian Adams) which failed to post to the PM topic.

-Brian


(Jeff Atwood) #4

Sorry, I am not understanding, how can someone send a PM in Discourse to an email address? PMs are sent to users.


(Brian Adams) #5

Ah. I see the disconnect. I created the user OpenRov_Support with the email address (support@openrov.zendesk.com). So that account receives an email notification once the PM is sent to that user account. So yea, it is a standard user to user PM message that I am trying to use the reply by email feature with.


(Jeff Atwood) #6

Hard to say, @techapj can you look at the code path that produces the “topic not found” error? Could this error be improved somehow to provide more info?

It does seem that the “user” who got PMed here should be able to reply to their PM notification email and have it work. Usually all that is needed is the GUID provided in the notification email.

Also any ideas here @riking?


(Kane York) #7

I think that @OpenRov_Support, which has an email address of support@openrov.zendesk.com, which is the From address sent from Zendesk, does not have access to the private message.

You could fix this by making it an admin.

However, If I reply to the reply address from another account, it goes through no problem.

That… may be problematic.


(Brian Adams) #8

As user Brian Adams, I created a PM to OpenROV_Support. So… it seems OpenROV_Support should have access to the PM Topic. Am I missing something here?

I assume you mean problematic that anyone with the reply address can send an email response and have it accepted to the PM Topic… even if they are not invited? Yea, seems like undesired behavior.

Which is why it would seem less a permission issue and something with how zendesk formats its email that triggers the rejection from discourse… unless the security is all jacked up and the only one who can’t respond via email is the one that is part of the PM topic… :see_no_evil: Could this be a side effect of being a SSO installation?


(Arpit Jalan) #9

The email reply is failing because we don’t accept “Auto Generated” email replies. See Auto-Submitted: auto-generated header in the email source.

This change was originally proposed here:

Also, improved the error message to make this clear:

https://github.com/discourse/discourse/pull/3211/


(Kane York) #10

Something feels off about this, but I can’t quite articulate it.

edit: Automatically replying to out-of-office replies. that’s it.


(Jeff Atwood) #11

Great! Better, more descriptive error messages are always a win.


(Brian Adams) #12

Thanks techAPJ, that helps a lot. I actually agree with the filtering of the auto-response emails as the out of office emails would be a drag if they got in. I actually think in this case Zendesk should not be marking the response emails as auto-generated.


(Michael Downey) #13

Definitely feels out-of-sync with the definition: Auto-Submitted Header Field Keywords