activealli
03-23-2004, 11:27 PM
Hello, I run a website on a windows platform, and I want to be able to create vpopmail accounts on my newly set up. qmail-vpopmail-courier-squirelmail debain mailserver.
Do you guys know of any good way to go about this, I wan't to make a 'behind the scenes' HTTP-Request to my mailserver, with the username/password/domain to add (vadduser).
I mocked about with a php script that uses shell_exec on vadduser. and after granting just about everbody all permissions to the /home/vpopmail/domains folder and subfolders I finally came to an error that I couldn't resolve; vadduser returned no auth connection.
<?
foreach($_GET AS $key=>$value){
$_GET[$key] = strip_tags(addslashes($value));
}
if ($secret != 'myBigSecretThatNoOneKnows'){
echo 'noway';
exit;
}
if (strlen($username) > 0 && strlen($password) > 0) {
if (strpos($username, "@mydomain.com") === false) {
$username=$username.'@mydomain.com';
}
$command = '/home/vpopmail/bin/./vadduser -q2097152 '.$username.' '.$password;
$output = shell_exec($command);
if (strlen($output)>0) {
echo $output;
exit;
}else{
echo 'success';
exit;
}
}else{
echo 'missing input error';
exit;
}
?>
Any help on this would be much apreciated.
Do you guys know of any good way to go about this, I wan't to make a 'behind the scenes' HTTP-Request to my mailserver, with the username/password/domain to add (vadduser).
I mocked about with a php script that uses shell_exec on vadduser. and after granting just about everbody all permissions to the /home/vpopmail/domains folder and subfolders I finally came to an error that I couldn't resolve; vadduser returned no auth connection.
<?
foreach($_GET AS $key=>$value){
$_GET[$key] = strip_tags(addslashes($value));
}
if ($secret != 'myBigSecretThatNoOneKnows'){
echo 'noway';
exit;
}
if (strlen($username) > 0 && strlen($password) > 0) {
if (strpos($username, "@mydomain.com") === false) {
$username=$username.'@mydomain.com';
}
$command = '/home/vpopmail/bin/./vadduser -q2097152 '.$username.' '.$password;
$output = shell_exec($command);
if (strlen($output)>0) {
echo $output;
exit;
}else{
echo 'success';
exit;
}
}else{
echo 'missing input error';
exit;
}
?>
Any help on this would be much apreciated.