Email Notification of web activity

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Email Notification of web activity

Postby tweexter » Jul 24 14 12:11 pm

Hello community -
I'm trying to figure out how in this software do I:
A: set up email notifications to go through my local email server
B: set up notifications to go out when user(s) visit specific web sites.

Any help is much appreciated.
tweexter
 
Posts: 8
Joined: Jul 24 14 12:08 pm

Re: Email Notification of web activity

Postby adrien » Jul 24 14 1:01 pm

Hi

to get email notifications to go to a specific server, you can set a domain in the email settings, and have it deliver to the server. Then use that domain as the target domain for the notification emails.

As for sending an email when something happens, for this you'll need flow-chart policy, so you would check to see who it is, what site etc, whether you wanted to notify, and if so, use a send email item to send an email. You could alternatively report an incident (notification) so that it would suppress duplicate reports (else you can easily get VERY many emails).

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Email Notification of web activity

Postby tweexter » Jul 24 14 1:52 pm

Thank you much for the quick response. I'm trying to make heads or tails of this flowchart policy thing.

I assume I start with [WWW Proxy Server Proxy Request] --->
there I had tried expression evaluator to do a yes/no if a website was visited. On both the yes and no I did an Allow function, but on the yes side I did a notification along the way.
I'm sure I'm doing this very wrong as when I enable the policy ALL internet traffic stops and the expression evaluator turns red and says "unexpected member operator".
What does that mean in english?

Cheers
tweexter
 
Posts: 8
Joined: Jul 24 14 12:08 pm

Re: Email Notification of web activity

Postby adrien » Jul 24 14 4:16 pm

OK

that means there was a '.' somewhere it didn't expect. '.' is used to resolve the next token to a member (like a function etc).

If you post your code from the expression evaluator, I can tell you exactly.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Email Notification of web activity

Postby tweexter » Jul 25 14 12:59 am

Hmmm interesting.
In the expression evaluator I did:
Request.URL.Contains(www.somesite.com)
And checked the box to resolve into a yes/no
I'm guessing there's meant to be much more to the expression than that though?
tweexter
 
Posts: 8
Joined: Jul 24 14 12:08 pm

Re: Email Notification of web activity

Postby adrien » Jul 25 14 10:02 am

need quotes around any strings, otherwise it thinks they are variables you are trying to dereference, so you need to use

Code: Select all
Request.URL.Contains("www.somesite.com")


Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Email Notification of web activity

Postby tweexter » Jul 25 14 11:01 am

Oh excellent!! That works now! Thank you so much.

Now I'm still having a hard time with the email function. I know this software seems to have email functionality built in but I'm trying to bypass all of it so that it will using my local smtp server and send notifications to me.
I went to Mail (on the left side), then settings on the bottom left. Then in the popup I went to servers tab and added the IP and port of my SMTP-SSL, provided a send-from address and a login as well... On the delivery tab I put in a postmaster address, and then added my server info again as a gateway and checked immediate delivery.

I must have configured this wrong as I can trigger the "notification" but I get no email about same. Any idea where I may have gone wrong?

Thanks!!!
tweexter
 
Posts: 8
Joined: Jul 24 14 12:08 pm

Re: Email Notification of web activity

Postby adrien » Jul 25 14 12:16 pm

Hi

so the notification incident shows up in the monitoring > Notifications tab? The log will show which events were triggered associated with this. It's the handlers of these events that do the work (e.g. send the email).

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Email Notification of web activity

Postby tweexter » Jul 26 14 5:53 am

Yes it shows up in the notifications tab. I go as far as looking at the notifications handler policy which looks like

Notifications:Notify Admin -----------v
---->Send Email
Notifications:Notify Manager --------^

The two notifications boxes have multiple "hits" while the Send Email box has 0 hits. Does that help narrow down?
tweexter
 
Posts: 8
Joined: Jul 24 14 12:08 pm

Re: Email Notification of web activity

Postby adrien » Jul 26 14 3:16 pm

Hi

if the event has hits but the policy items don't check that the policy is enabled, and/or that the processing items are actually connected to the event item.

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Email Notification of web activity

Postby tweexter » Jul 27 14 4:18 am

Through a bit of trial and error I got emails to work, by swapping out the Notification item for just Send Email. You were right in your first reply though, I got loads of emails this way. I don't suppose there's a way to limit this to maybe 1 per 10 minutes or anything like that?
tweexter
 
Posts: 8
Joined: Jul 24 14 12:08 pm

Re: Email Notification of web activity

Postby adrien » Jul 27 14 2:44 pm

you could count them, have a scheduler that resets the counter.

then only do the email if the count is 1 or something.

But you should be able to get it working through notifications. It just sounds like you don't have the notification event handled properly to send an email.

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Email Notification of web activity

Postby tweexter » Jul 28 14 4:00 am

Thanks for the counter idea. I'm trying to work with that now. One thing so far that's stumping me is the scheduler. I have it set to run every two minutes, and in the associated policy I have the scheduler event ---> an expression evaluator that reads "Data.GetCounter(Event1).Set(0)" to reset the counter to 0. The counter, Event1, is used in the other policy that actually sends the email. Whenever this scheduler runs the entire wingate service crashes, so I've really gone and made it upset I think. Is there supposed to be anything after the Reset?
tweexter
 
Posts: 8
Joined: Jul 24 14 12:08 pm

Re: Email Notification of web activity

Postby adrien » Jul 28 14 10:59 am

GetCounter takes a text argument, so it needs quotes again around the name.

Is that maybe the issue?

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Email Notification of web activity

Postby tweexter » Jul 28 14 12:23 pm

Ah ha - twice I got hosed by the quotes... That counters idea is working perfectly now. Thanks for all the help!!
tweexter
 
Posts: 8
Joined: Jul 24 14 12:08 pm

Re: Email Notification of web activity

Postby adrien » Jul 28 14 1:03 pm

Yeah, if it doesn't have quotes, it's the name of something - e.g. some variable or object.
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland


Return to WinGate

Who is online

Users browsing this forum: No registered users and 7 guests

cron