How to suppress read receipt via IMAP?
Asked Answered
A

2

6

I want implement a confirmation dialog for sending email read receipts in my application. The application uses IMAP to communicate with the mail server, which is currently restricted to a Microsoft Exchange Server 2010.

The receipt is obviously automatically send by the server when the \Seen flag is sent. So the IMAP commands would look something like this:

c1 LOGIN username password
c2 SELECT mailbox
c3 UID STORE 123 flags \Seen

(Btw. this stands in contrast to the solution found in another stackoverflow question, which said that setting the \Seen flag would not cause the Exchange Server to send receipts.)

Though how to handle the case when the user does not want to send a read receipt?

My initial idea was simply not to set the \Seen flag. Though this causes the server to automatically send a notification to the sender that the email was deleted without being read in case the message is deleted from the server.

Also marking the message with \Deleted and \Seen before expunging didn't help:

c1 UID STORE 123 flags (\Deleted \Seen)
c1 UID EXPUNGE 123

So how to explicitly suppress the read receipt message in case the user doesn't want to send one?

Antoniettaantonin answered 19/5, 2014 at 12:23 Comment(4)
This is non-standard IMAP behavior.Bibbie
I guess you mean that it's non-standard that a read receipt is automatically sent in these cases. So what does that mean for me? Is there a way to circumvent that behavior? Note that I do not have access to the server configuration.Antoniettaantonin
Presumably not. It looks like Exchange has put hooks right into the server portion (normally read receipts are client generated). Perhaps they have a protocol extension to customize it, but I don't know about it.Bibbie
What's very peculiar, is this receipt is sent when marked as read, by Exchange Server, but only when using Thunderbird, not with another IMAP client like K9Mail on the very same inbox. What's options are left to Thunderbird users (without admin rights to the server)?Shivaree
T
3

The only way to resolve this issue is to change the settings on the Exchange server itself. From the Exchange Management Shell, enter the following command:

set-ImapSettings -SuppressReadReceipt $true

You will then get no read receipts at all from Exchange for messages that are read via IMAP. It is then up to your application to generate the read receipts itself.

Technet also has more detailed info about set-ImapSettings.

Tabernacle answered 11/7, 2014 at 19:55 Comment(1)
Thanks, that helps. So I'll need to contact the people that are running the server to change the setting.Antoniettaantonin
W
1

Had the same issue with Exchange Server 2016. In the mailbox I've set not to send read reciepts, but Thunderbird still did it.

You can supress read reciepts for a certain mailbox, not for all IMAP service:

Set-CASMailbox mailboxname -ImapSuppressReadReceipt $true -ImapUseProtocolDefaults $false
Westonwestover answered 12/3, 2018 at 10:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.