Python Forum
Matching emails in outlook 2016
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Matching emails in outlook 2016
#1
Hi there,

As a NOC engineer, every morning my first task is to check the NOC emailbox where over 200 emails are coming to. Emails are automatically being generated by over hundred network devices across the network infrastructure. Every email has got a incident number and associated network device name including date, time etc.... For some reasons if any network device or interface is down or faulty, generated email is coming to NOC emailbox with word of OPENED in the middle of the email subject. After that if the incident resolved, the email's subject is coming with word of CLOSED. This is daily ongoing over hundred and hundred emails dropped into NOC mailbox.

It is really hard to check every single email within hundred and hundred emails in the NOC emailbox whether or not incident CLOSED after seeing OPENED. Is there a possibility of a Python scripting can find and list only emails that have not yet had a word of CLOSED in the email subject.

I really appreciated you guys in advance.
Thanks
ERdix.
Reply
#2
Little more details?

It's not clear if the emails are stored locally or remotely. For example. I did some research and there is a standard module in Python which I think will fit your needs. Take a look: https://docs.python.org/3.6/library/mail...l#examples
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
When I used Outlook, it had filters and folders (or labels or something). I wouldn't use Python for this. I'd create a rule that sorts the relevant emails in the particular categories.
Reply
#4
I do not use email client but web interface. Am I write that Outlook stores emails locally? Or it depends on the settings?
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#5
This is a problem python can help with. But it isn't the right answer to the problem. They're emails, use email filters.


And do it on the server side, not in outlook. Unless you're using an Exchange Server, in which case you can use outlook, but you should check whatever box it is that says the rules run on the server side.
Reply
#6
nilamo, not sure what the OP's experience is but when I was using Outlook for a year or two at my last job, doing it on the server was a lot harder than just doing it in Outlook. One of the reasons I was happy to switch to Gmail :)
Reply
#7
Depends on which server it is. At my current job, we use outlook for the frontend, but it's all gmail in the backend.

The problem with doing it in outlook, is that it doesn't do anything unless outlook is actually running. Which means if you shut your computer off, you might have to sit and wait for a few minutes while it catches up with all your email. If you just start with the filters on the server side, then they're immediately applied as mail arrives, instead of whenever you get around to looking at it lol
Reply
#8
Hi there,

I like to give more explanation......

I can not manipulating NOC emails on the server side. Only What I want to do is on my outlook client side. Some people pointed about leveraging rules in the outlook. Yes, the idea is applicable but it is not matches what I want. Currently I am using a rule to make a narrow down, but it is not what I want. Or may be I should work with rules to make more efficient one. Anyway.

A little bit background of email's subject line:
1- Every single NOC related email have a unique incident number, router/switch hostname, IP address, word of OPENED or CLOSED, description of fault/problem and also date and time etc....

What do I like to have?
It is kind of automation. I believe Python can do this in efficient way. :))

1-) If receiving email have a word of CLOSED in the middle of its subject line, this needs to be matched with already received email that has a word of OPENED in the middle of its subject line. If it is matched, this incidents (one has OPENED another has CLOSED) must be discard. Why because incident resolved itself. Thus I don't need to concerning about it.

2-) If it is not matched, it should be listed where I have to see and immediately evaluate then start to troubleshooting.

Is it clear or?

Many Thanks,
Erdix
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Advent of Code 2016 snippsat 4 6,523 Dec-06-2016, 10:35 PM
Last Post: nilamo
  Complete Python Programming Course 2016: Code using Python 3 free udemy course Yoriz 0 4,219 Oct-17-2016, 05:21 PM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020