Jump to content
Greg.Buerk

Email Box Monitor Plugin

Recommended Posts

This Plugin will let you setup multiple email addresses you can check. For each Account you can create Rules to use to process the email in the box. The rules when they match raise alert templates and from there you can run scripts or create tickets. Use this to monitor the devices that only report their problems via email.

 

Once the Plugin is installed all configuration is done in the dashboard->Configurations->Integrations tab. When you click on the tab you will see a list of your accounts, the last time it was checked and the number of emails found total.

 

 

To Add a New Account Click the Create Account Button or to edit an existing Account select it and click Load Account.

 

 

Configure The accounts settings and frequency of the email check. IMAP will not work until the next 2013 patch 2. All Email from the account will be processed and deleted.

 

 

Each Rule is processed in order and when a Match is made the rules are stopped and the email is deleted.

The Rules Filters are Regular Expression and if you set multiple filters on a single rule then all of them must match.

When the Rule is matched an Alert Template is called and passed the Script, Message, Ticket Category, Client and Computer. Also provided are MANY new replacements of the email. Use %SHOWVARIABLES% as the message text and it will replace it will ALL variables that are available(This works for any alert in LT)

 

 

Variables Available

%emailfrom%

%emailfromfilter% - If the Rule was set and it matched

"%emailfrom0%, 1,2,3,N - Set for each Group in the match and 0 for the whole match.

 

%emailheader%

%emailheaderfilter% - If the Rule was set and it matched

"%emailheader0%, 1,2,3,N - Set for each Group in the match and 0 for the whole match.

 

%emailsubject%

%emailsubjectfilter% - If the Rule was set and it matched

"%emailsubject0%, 1,2,3,N - Set for each Group in the match and 0 for the whole match.

 

%emailbody%

%emailbodyfilter% - If the Rule was set and it matched

"%emailbody0%, 1,2,3,N - Set for each Group in the match and 0 for the whole match.

 

%header_{HEADERFIELDNAME% - Set for each email header, Replace {HEADERFIELDNAME} with headername.

 

 

 

LabTech v10.5 or Higher.

 

 

 

LabTech v10 or older installer

59ec942e2eead_10-21-20136-43-18PM.png.e145aba6a44c51f01d23af316429b5db.png

59ec942e31c63_10-21-20136-56-38PM.png.7a8101c101a3e5edeb9f2252130280ea.png

EmailSinkInstaller.zip

EmailSinkInstaller10.5.zip

Share this post


Link to post
Share on other sites

So far this is very promising. I would however, like the ability to check SMTP mailbox if possible as well as specify the folder to look at for email. This way I can utilize my Email client to configure basic routing rules and then have the plugin check against those emails. This could simplify how many unique rules in the plugin I would have to create as the basic routing via email client is already done :).

 

Great work Greg. Thanks.

 

-jeff

Share this post


Link to post
Share on other sites

Is there a way to alert if an email was not received? This would be a great way to catch a backup that was hung and never sent the backup report at all (easy to miss an email that never shows up).

 

So Ideally I would want to check the email at say 10am then

1. If no email was received since the previous check create a ticket.

2. If the email did not contain the word "success" create a ticket.

3. Assume it was a success and do nothing.

Share this post


Link to post
Share on other sites
Are you saying you want to check the TO: address? I can do that.

 

 

Greg,

 

No, but I would like to utilize email type SMTP and have the ability with the SMTP Configurations to check a folder other than the inbox for rule creation.

 

Thanks.

 

-jeff

Share this post


Link to post
Share on other sites
Is there a way to alert if an email was not received? This would be a great way to catch a backup that was hung and never sent the backup report at all (easy to miss an email that never shows up).

 

So Ideally I would want to check the email at say 10am then

1. If no email was received since the previous check create a ticket.

2. If the email did not contain the word "success" create a ticket.

3. Assume it was a success and do nothing.

 

 

Ok cant do it natively, BUT could do it with a script. Set the alert action on the rule to run a script, the script will set a variable(script State, EDF,something) and then at 10 am another script runs and checks if that value was set, and if not it creates and alert.

 

BTW. If you use script state the script and computerid must be the same for both the alert script and the scheduled script.

Share this post


Link to post
Share on other sites
Are you saying you want to check the TO: address? I can do that.

 

 

Greg,

 

No, but I would like to utilize email type SMTP and have the ability with the SMTP Configurations to check a folder other than the inbox for rule creation.

 

Thanks.

 

-jeff

 

I think your confused. I think you mean IMAP, as your talking about a folder other than inbox. And when the next patch for LabTech comes out you will be able to check IMAP mailboxes and set the folder to check. The ability is already there its just the control is not licensed so it will fail.

Share this post


Link to post
Share on other sites

I think this would be a part of the filter, but can we set this up per location? The office manager/rep at each location would get a email when an issue arises?

Share this post


Link to post
Share on other sites

I've not dloaded and tested, I can see in your screenshots that is supports POP and through the comments that you are planning IMAP - Any plans for MAPI (exchange malboxes)

 

Cheers,

Dave

Share this post


Link to post
Share on other sites

I have installed the sink and an email is being pulled via pop, but the following appears in the ltplugin errors log..

 

LTAgent v60.239 - 30/01/2014 12:20:48 AM - Plugin ConnectWise 6.0.0.34:Error in SyncClientInformation:The given key was not present in the dictionary. with combination 49,0:::

LTAgent v60.239 - 30/01/2014 9:56:44 AM - PluginEmail Sink v1 Testing Message Rules:2 MSG:

 

and no ticket is created.

Share this post


Link to post
Share on other sites
I have installed the sink and an email is being pulled via pop, but the following appears in the ltplugin errors log..

 

LTAgent v60.239 - 30/01/2014 12:20:48 AM - Plugin ConnectWise 6.0.0.34:Error in SyncClientInformation:The given key was not present in the dictionary. with combination 49,0:::

LTAgent v60.239 - 30/01/2014 9:56:44 AM - PluginEmail Sink v1 Testing Message Rules:2 MSG:

 

and no ticket is created.

 

Ok this indicates there are 2 rules and there is NO Message Body text.

I would say your rules are NOT matching. Try testing by setting the BODY FILTER to .*

This will match everything.

 

You can use the regular expression helper plugin to test your reg expression. And also remember something MUST be set in one of the FILTERS, they can not be all blank.

Share this post


Link to post
Share on other sites
Greg,

 

Is that LT patch 263? If so, will that be a public or controlled release?

 

Steve.

 

Should be Public and out now.

Share this post


Link to post
Share on other sites
I've not dloaded and tested, I can see in your screenshots that is supports POP and through the comments that you are planning IMAP - Any plans for MAPI (exchange malboxes)

 

Cheers,

Dave

 

When you get the Patch the IMAP will just work, its in the list of selected types.

 

NO I will not add MAPI support. Since you can access a Exchange email box with IMAP.

Share this post


Link to post
Share on other sites

Can you define variables within the alert? For example, I want to get alerted for a vipre alert that comes through but it doesnt tell me the workstation name till the middle of the email. Here is an example email:

 

A threat was found by a scan. To see more information, find computer WORKSTATION NAME in the Protected Computers list in the VIPRE Business console and double click on it.

 

Site: SERVERNAME

Policy: CLIENT NAME

Computer: WORKSTATION NAME

Found at: 2/26/2014 10:39 PM

Threat Name: TrojanDownloader.JS.Quakbot.k (v)

 

 

I would like to define the Workstation name and Client name within the subject of the alert. Is that possible?

Share this post


Link to post
Share on other sites

Yes. All variables are available plus some new ones. Put a %ShowVariables% in the message and it will show you them all.

Share this post


Link to post
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

×