PDA

View Full Version : mail managment from my own interface


maxzz
07-15-2005, 12:05 AM
Hi..
I need to copy the part of mail functions from DSM into my scripts
I want to create my own mail interface for my new domain
I need realize next options(create new mail account,delete mail account,set quota etc.)
Does DSM panel has any shell scripts or API for these purposes?
Can i use you DSM's scripts from my scripts
For example Dsm panel has next script-couriermanager
Can i use this script in this manner??
<?php
system("/usr/bin/php -q

/mypath/dsm/couriermanager?sdom=mydmain&email=mynewemail&pass1=mypass&pass2&commit=add");

?>
i know how i can manage accounts from for command line
http://www.courier-mta.org/?userdb.html
http://www.courier-mta.org/?userdbpw.html

etc.
but in this case i couldn't see any modifications in the DSM.
So need integrate courier mail functions with my own interface.
Can i realize it?
thx

LeeJ
07-15-2005, 10:24 AM
There are currently no api hooks so that you can do this outside of dsm. You can although manipulate the templates which use smarty to integrate your own php code. Take a look at the knowledge base as there are detailed instructions on modifying/creating templates.

maxzz
07-15-2005, 11:22 AM
There are currently no api hooks so that you can do this outside of dsm. You can although manipulate the templates which use smarty to integrate your own php code. Take a look at the knowledge base as there are detailed instructions on modifying/creating templates.
No.unfortunately it's impossible for me
I need create interface for 1 domain only
May be you can show to me the source of this functions?

Or tell me next
if i made corrections from my script and then edit DsM's databse
is it enough or i need to do other steps also?

for example(set new password)
<?php
$crypt_pass=`echo $new_password | userdbpw -md5`;
system("userdb users/".$_SESSION['account']['username']." systempw=".$crypt_pass." && makeuserdb ");

//an then
EditDSMDatabaseFunction();
?>

LeeJ
07-16-2005, 07:38 AM
DSM does not use a proprietary database. It uses the Courier database to store data.

LeeJ
07-16-2005, 07:40 AM
If you go with a paid license you can have this functionality with no additional work. You can use the permissions manager to turn off all of the functionality (icons) within the control panel interface for that particular user except for the mail manager interface.