Vmailmgr functions
Vmailmgr
These functions require qmail and the
vmailmgr package by Bruce Guenter.
For all functions, the following two variables are defined as:
string vdomain the domain name of your virtual domain
(vdomain.com) string basepwd the password of the 'real' user that
holds the virtual users
Only up to 8 characters are recognized in passwords for virtual
users
Return status for all functions matches response in response.h
O ok
1 bad
2 error
3 error connecting
Known problems: vm_deluser does not delete
the user directory as it should. vm_addalias
currently does not work correctly.
<?php
dl("php3_vmailmgr.so"); //load the shared library
$vdomain="vdomain.com";
$basepwd="password";
?>
vm_adduser
Add a new virtual user with a password
Description
int vm_adduser
string vdomain
string basepwd
string newusername
string newuserpassword
Add a new virtual user with a
password. newusername is the email login
name and newuserpassword the password for
this user.
vm_addalias
Add an alias to a virtual user
Description
int vm_addalias
string vdomain
string basepwd
string username
string alias
Add an alias to a virtual user. username
is the email login name and alias
is an alias for this vuser.
vm_passwd
Changes a virtual users password
Description
int vm_passwd
string vdomain
string username
string password
string newpassword
Changes a virtual users password. username
is the email login name, password the old
password for the vuser, and newpassword
the new password.
vm_delalias
Removes an alias
Description
int vm_delalias
string vdomain
string basepwd
string alias
Removes an alias.
vm_deluser
Removes a virtual user
Description
int vm_deluser
string vdomain
string username
Removes a virtual user..