Jump to content

Messages Measures (Inbox)


QEHNick

Recommended Posts

Hello, I'm trying to put together some "measures" to record how many emails come through the mailbox from INTERNAL and EXTERNAL sources.

I've tried several different ways, most recently.....

image.png.68411b6400a529791d380c1b30479946.png

...using a "Query where clause" in this vein.

h_msg_rfc822_hdr LIKE '%From%OURDOMAINNAME%' 

..or..

h_msg_rfc822_hdr NOT LIKE '%From%OURDOMAINNAME%' 

The results are incorrect, too low to match what is actually coming through.

Does anyone have a way of doing this?

Link to comment
Share on other sites

@Steve Giller Yeah, I can't find a row which would have what I need to determine it.

Ah! I suppose if h_msg_from had  sender address which had "somethingsomething@DOMAIN.com", that would be my external since internals do not show the email address, just the senders name.

 

So something like...

h_msg_from NOT LIKE '%@%'         for internal emails?

Link to comment
Share on other sites

@Steve Giller yeah, I narrowed it down to the actual domain ('%@domainname.co.uk') however it's producing ridiculously high figures now. We have never had 100+ emails in a week.

So I tried replacing "LIKE" for "=" and "NOT LIKE" for "<>"; this then tells me we had over 4000 emails from external sources and zero from internal in a month. That's nowhere near reality.

Link to comment
Share on other sites

  • 2 weeks later...

Ok, after much fiddling about I have used the following.

For Internal emails - h_msg_rfc822_hdr NOT LIKE '%Return-path% %@OUR_DOMAIN_NAME%' AND h_msg_status = 1

For Internal emails - h_msg_rfc822_hdr LIKE '%Return-path% %@OUR_DOMAIN_NAME%' AND h_msg_status = 1

Since there is no column entry for sender domain I have to look through the HDR content to find the necessary info to filter on.

So far, the output compares to the emails in the Inbox (and other) folders.

Link to comment
Share on other sites

2 hours ago, QEHNick said:

Yeah I think it's h_msg_status code "1" for received.

I think h_msg_status determines whether the email has been read or not. 1 = read, 2 = unread.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...