Submitted by bernardo on Thu, 01/03/2013 - 16:06
I think a remote API for Usermin will be very useful.
Making remote authentication with the e-mail and password. as: wget --http-user=love@webmin.com --http-passwd=loveforever 'https://yourserver:20000/usermin/remote.cgi?program=filter&autoreply-add="message"'
Ever thought, control functions of SpamAssassin Mail Filter, auto reply, forwarding. by usermin api? :)
The purpose of this API is to create third-party plugins like Roundcube and User Interface own.
2 days I'm trying to create an auto-reply feature for Roundcube without success.
My attempts. * Remote API, calls the user administrator. * Iframe to usermin Roundube in the works. * Curl, HTTP_Request2 shows error "No cookies"
Sorry an error in words, English is not my official language.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Thu, 01/03/2013 - 23:51 Comment #1
That's a good idea .. I can see how it would be useful to allow apps like Roundcube to setup autoreplies.
However, this would be a lot of work to implement, so probably isn't going to happen any time soon.
Submitted by bernardo on Fri, 01/04/2013 - 05:11 Comment #2
Jamie, know of any alternative. where I can make a remote connection, example Curl or pear HTTP_Request. Do you know if it works?
Submitted by JamieCameron on Fri, 01/04/2013 - 17:14 Comment #3
wget should work - but to bypass Usermin's cookie-based authentication, use the flag
-U Webmin
to force the user agent to be "Webmin"Submitted by bernardo on Sat, 01/05/2013 - 09:26 Comment #4
You have an example with "wget" ?
Submitted by JamieCameron on Sat, 01/05/2013 - 19:19 Comment #5
What operation are you trying to perform?
Submitted by bernardo on Sun, 01/06/2013 - 05:03 Comment #6
It is the operation of auto-reply would be an example. http://192.168.1.66:20000/filter/edit_auto.cgi
Log error: IN: /var/usermin/miniserv.error
"[05/jan/2013:12:31:26 -0200] [192.168.1.64] /session_login.cgi : No cookies : You browser does not support cookies, which are required for this web server to work in session authentication mode."
Submitted by JamieCameron on Mon, 01/07/2013 - 19:09 Comment #7
You could try a command like :
wget -O - -U Webmin "https://user:password@server:20000/file/save_auto.cgi?enabled=1&period_def=1&charset_def=1&reply=Your+message+here
Submitted by bernardo on Wed, 01/09/2013 - 05:58 Comment #8
Let's celebrate. It worked! Laughs
Command: shell_exec("wget -O - -U Webmin --user=user@domain.com.br --password=YourPass --post-data="enabled=1&period_def=1&charset_def=1&reply=YourMessage" http://192.168.1.66:20000/filter/save_auto.cgi")
Soon I will create a plugin for Roundcube and show the community.
Thanks.
Submitted by JamieCameron on Wed, 01/09/2013 - 15:01 Comment #9
Great!
Submitted by Issues on Wed, 01/23/2013 - 15:08 Comment #10
Automatically closed -- issue fixed for 2 weeks with no activity.