I am trying to write a function to allow users to have an email account created in PLESK 7.5 Reloaded when they register with one of my websites. However, I can not get this very important line to work. Any help would be appreciated. I set up the public keys and all that jazz, but it just won't work. PHP isn't in safe mode. I have tried system() exec() shell_exec() and passthrough(), no go. I know it is possible, though. I don't care how I get this working, whether with a shell script or php, but I need to get it to work. I am not sure if I can give more than 500 points, but I wish to give a 1000 points if possible.
Here is what I tried, works only from command line when logged in as root, need to send the command as root, but through a browser without giving others root access, of course.
shell_exec("ssh email@example.com -i /root/.ssh/id_rsa /usr/local/psa/bin/mail.sh
--create firstname.lastname@example.org -mailbox true -cp_access true -mailbox true -passwd PASSWORDHERE \n");
AND TRIED VARIATIONS OF:
ail.sh --create email@example.com -mailbox true -cp_access true -mailbox true -passwd PASSWORDHERE");
Here is the command that needs to execute whena user registers. I left the username and password variables out for testing purposes.
--create firstname.lastname@example.org -mailbox true -cp_access true -mailbox true -passwd PASSWORDHERE
It eventually does TRY TO work, it seems that the page hangs and the email is not created. I think that it is a security thing keeping it from executing, but I am not sure. If anyone is a Plesk expert, I could really use assistance ont his one:)
Email: dude (A) freeonlineblogs.com