Who is reading my email?

Hopefully this will help out those of you with questions regarding this. This is something I cross-posted at my blog - let me know if I missed anything…Chris Whisonant: Who Read Those E-mails? (SnTT)

Lately I’ve replied to a couple of threads here where people have asked how to find out which emails someone with ACL access has read in Lotus Notes. This is not something that is available by default and I have asked the most obvious question at the forum: “First, I guess you should question why the person is in the ACL of the database if he/she shouldn’t be looking at the documents. By granting people a specific ACL level, you are granting them permission to do whatever that ACL level will allow.” The answer is that the person may have authority but is accessing it with no specific reason. I decided to run with my “Who Deleted That Document?” post and port it to log the opening of emails. Upon some further reflection, this may still not be 100% accurate in some scenarios. First of all, the reader would have to have a connection the server where the log database resides. Of course, you could port the code to log the offenses to a document in the current database. Secondly, this is not taking into account that the reader could copy/paste the emails into their own mail file. After brief investigation, all you have to do is modify the ACL for the offender to disable “Replicate or copy documents” in the Attributes section. Also, you could probably go a step further and add code in the “Post Open” option for the ($Inbox) folder to log if someone was looking in the folders but not actually opening the emails. Thirdly, this will not work if the offender is going through the web to open the emails. I can’t think of an easy solution for Domino Web Access use. However, you could temporarily change the mail file to not be based on the DWA template and you could modify the Standard Mail template to do some type of logging via WebQueryOpen on the form (the code below should work that way with minor modifications) or port it to javascript in onLoad.

Here are the steps you may wish to perform:

  1. Create a log database. This can just be based off the log.ntf template.
  2. Set the log database’s ACL for -Default- to be Depositor with nothing checked but “Create documents”. This will prevent the person from seeing the log documents if he somehow figured out something was happening.
  3. Disable copying for the user. On the mail database, modify the ACL for the offender to disable “Replicate or copy documents” in the Attributes section.
  4. Add the following code to the PostOpen event for the Memo, Reply, and Reply with history forms if you are concerned with Calendar or To-Do documents. You could also add it to other forms.

'Generate log event for opening of emails by someone other than the DB owner
If Not source.IsNewDoc Then
'If the user is not the database owner then log the document open
Dim session As New NotesSession
Dim db As NotesDatabase
Dim dbowner As Variant
Dim prodoc As NotesDocument
Set db = session.CurrentDatabase
Set prodoc = db.GetProfileDocument(“calendarprofile”)
dbowner = prodoc.GetItemValue(“Owner”)
If session.UserName <> dbowner(0) Then
Dim delivereditem As NotesItem
Dim delivered As notesdatetime
Set delivereditem = source.document.GetFirstItem(“PostedDate”)
Set delivered = delivereditem.DateTimeValue
Dim OpenLog As New NotesLog(db.FilePath)
Call OpenLog.OpenNotesLog(“HQAPP01/COMPORIUM”, “ChrisDesigns\loggingdb.nsf”)
Call OpenLog.LogAction("Email Opened: " + source.FieldGetText(“Subject”) + " From: " _

  • source.FieldGetText(“From”) + " Received On: " + delivered.LocalTime)
    Call OpenLog.Close
    End If
    End If
    'END logging of email opens

This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.

Chris Whisonant

http://cwhisonant.blogspot.com

Subject: Who is reading my email?

Chris,

Thanks for posting this. Good stuff.

It looks like this process could also get kicked off by non-user signed agents that run through emails in a db.

Jeff Dayton, PCLP, CLI

Subject: Who is reading my email?

While that would detect folks reading your mails by opening your database in the client, adding code to the database elements (forms, views, etc.) will not detect anyone accessing the database documents directly.

Anyone with a bit of knowledge in Lotus Script copy create a new database, and code an agent to copy all (or selected) documents from your mail file into this database. That would not be detected by any logging that you could build into the mail database design, and once there, could be read at the villains leisure.

This activity would of course be detected by the User Tracking logs, but they would only indicate numbers of documents read, and not identify the documents themselves.

Subject: RE: Who is reading my email?

Graham, thanks. I didn’t mention (though I though about it earlier) the fact that this doesn’t/can’t track someone going to Document Properties and looking at the Body field. Good catch. Also, the agent would be a workaround to this as well. My code is moreso an attempt to see what someone like an Admin Assistant would be doing if suspected of looking at emails.

Subject: Who is reading my email?

Another way around this would be to pull down a local replica to your laptop and then disconnect from the network - nobody would have a clue what e-mails were read / unread.

Than again, the above code would fail becuase it could not connect to the log server.

Subject: RE: Who is reading my email?

The ACL setting for disabling replication or copying of documents would prevent creating a replica or new copy of the database.

Subject: RE: Who is reading my email?

Hi Chris,

Great code.

But I think there is still some security hole for “offender”.

What happen if your IT colleague login to Domino Server, and copying your mailbox using windows explorer to his thumbdrive.

Then, from his local PC or from home, either using server ID or any IDs in ACL list that he got, he opens your mailbox?

Cheers,

Ivan.

Subject: RE: Who is reading my email?

If someone really wants to get around this they could. As I have stated, it’s more designed to catch those who may just be snooping around. If the person is an Admin, he might even have access to ID files and could even use an old ID file from that user with a default password or even crack the password.

Thanks!