Page 1 of 1
How to receive a mail on client connection and disconnecti ?
Posted: Wed Apr 20, 2011 7:54 am
by infomax
Hi, i see we can use script, so we would like to receive a mail when a client is connecting to our server, and when he lost the connection?
Can we do that and how?
We are using openvpon 2.1.0 on Linux.
thanks
Re: How to receive a mail on client connection and disconnec
Posted: Wed Apr 20, 2011 8:26 am
by janjust
Use a 'client-connect' and 'client-disconnect' script. The script would do something like
Code: Select all
#!/bin/bash
echo "$script_type $common_name" | mail someuser@somehost
Re: How to receive a mail on client connection and disconnec
Posted: Wed Apr 20, 2011 8:46 am
by infomax
thanks, bu how do i use it? where do i put it?
thanks
Re: How to receive a mail on client connection and disconnec
Posted: Wed Apr 20, 2011 9:08 am
by janjust
some work on your part is required: read the HOWTO and manual page, or buy my book and read chapter 6

Re: How to receive a mail on client connection and disconnec
Posted: Wed Apr 20, 2011 9:15 am
by infomax
haa okay thanks.i will try this.
Re: How to receive a mail on client connection and disconnec
Posted: Sat Apr 23, 2011 8:35 am
by eric66300
#!/bin/bash
echo "$script_type $common_name" | mail someuser@somehost
where can i put that code?
sorry noob question
Re: How to receive a mail on client connection and disconnec
Posted: Sun Apr 24, 2011 11:52 pm
by janjust
use a 'client-connect' script on the server side. Read the manual page or buy my book and read chapter 6

Re: How to receive a mail on client connection and disconnec
Posted: Tue Apr 26, 2011 9:33 am
by infomax
hi janjust, thanks a loy, it works like a charm
