Hi,
I would like to perform, with a script :
- a logon to an address like this : https//<my_server>/owa with an existing user
- a check for a specific string on the displayed page
- a logout.
The exchange server is IIS 7.5 and it creates cookies marked 'HttpOnly'.
I've tested scripts with webinject, put the logon fails everytime.
Does anyone knows a script which does that ?
I've searched online but I've found nothing to do that ;-(
Thanks by advance !
[Solved] OWA : Test availability of a user's mailbox
[Solved] OWA : Test availability of a user's mailbox
Last edited by philippe on Mon Aug 20, 2012 2:56 am, edited 1 time in total.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: OWA : Test availability of a user's mailbox
You may be able to do this with check_http. There is some details on getting something similar running at
http://www.mail-archive.com/nagios-user ... 27318.html
http://www.mail-archive.com/nagios-user ... 27318.html
Re: OWA : Test availability of a user's mailbox
thank you for your reply 
I've tried your solution, but it doesn't work : I'm always redirecting to the login page.
I've also tried : check_basicauth2.pl, check_basicauth.pl, check_http_ntlm.pl, check_owa.php, owa.py, owa.sh unsuccesfully.
I'm always redirected to the login page.
Found on the net, this code is doing what I want (it displays the inbox of the user)
But my server has no graphical interface and I don't know how to transform it to a webinject script or how to use it with check_http or curl (I'm a newbee !)
I've tried your solution, but it doesn't work : I'm always redirecting to the login page.
I've also tried : check_basicauth2.pl, check_basicauth.pl, check_http_ntlm.pl, check_owa.php, owa.py, owa.sh unsuccesfully.
I'm always redirected to the login page.
Found on the net, this code is doing what I want (it displays the inbox of the user)
Code: Select all
<script>
function LoginToOWA (server,domain,username,password) {
var url = "https://" + server + "/owa/auth/owaauth.dll";
var p = {destination:'https://' + server + '/owa',flags:'0',forcedownlevel:'0',trusted:'0',isutf8:'1',username:domain + '\\' + username,password:password};
var myForm = document.createElement("form");
myForm.method="post" ;
myForm.action = url ;
for (var k in p) {
var myInput = document.createElement("input") ;
myInput.setAttribute("name", k) ;
myInput.setAttribute("value", p[k]);
myForm.appendChild(myInput) ;
}
document.body.appendChild(myForm) ;
myForm.submit() ;
document.body.removeChild(myForm) ;
}
</script>
<body onload="javascript:LoginToOWA('MY_SERVER','DOMAIN\USERNAME','PASSWORD');">
<h3>Please wait while redirecting to OWA...</h3>
</Body>
Re: OWA : Test availability of a user's mailbox
philippe,
Do you know if your IIS configuration is using NTLM authentication?
-Yancy
Do you know if your IIS configuration is using NTLM authentication?
-Yancy
Re: OWA : Test availability of a user's mailbox
yancy,
the server doesn't use the ntlm authentication
philippe
the server doesn't use the ntlm authentication
philippe
Re: OWA : Test availability of a user's mailbox
philippe,
Take a look at:
http://exchange.nagios.org/directory/Pl ... rg/details
http://exchange.nagios.org/directory/Pl ... AS/details
If your looking for something custom.
http://www.howtoforge.com/talking-soap-with-exchange
Take a look at:
http://exchange.nagios.org/directory/Pl ... rg/details
http://exchange.nagios.org/directory/Pl ... AS/details
If your looking for something custom.
http://www.howtoforge.com/talking-soap-with-exchange
Re: OWA : Test availability of a user's mailbox
yancy,
I've tested the script check_owa by Chris Funderburg but it always returns OK even if I wrote a wrong password.
Finally I've used a curl command and I've written a shell script to detect strings when the user is connected to his mailbox.
Now all is OK !
Thank you for your help 
I've tested the script check_owa by Chris Funderburg but it always returns OK even if I wrote a wrong password.
Finally I've used a curl command and I've written a shell script to detect strings when the user is connected to his mailbox.
Now all is OK !
Code: Select all
curl -q -k -d "destination=https://${SERVER}/owa&flags=0&username=${USERNAME}&password=${PASSWORD}&isutf8=1" \
https://${SERVER}/owa/auth/owaauth.dll -L -b cookies.txt
Re: [Solved] OWA : Test availability of a user's mailbox
philippe,
Great news!! Feel free to post your shell script on Nagios Exchange http://exchange.nagios.org/ for others to use
Regards,
-Yancy
Great news!! Feel free to post your shell script on Nagios Exchange http://exchange.nagios.org/ for others to use
Regards,
-Yancy