Here is what I've come up with so far for the vpopmaild daemon.
Comments?

I have a working vpopmaild now. If we can work out the details then
I can probably have a version for testing by Monday.

I added file/directory commands so we can manage .qmail files
or create autoresponder directories/files etc.

I'm thinking we should keep the vpopmaild as simple as possible,
and place most of the intelligence for formating these simple commands
into the php module. 

Ken Jones
vpopmaild 

Summary
vpopmaild provides authenticated access via a tcpserver connection to vpopmail based 
commands. Primarily for php programs which can not easily change to the right 
permissions.

How to run:
tcpserver <options> <ip> <port> vpopmaild

example with multlog:
tcpserver -vHRD 0 8989 vpopmaild | \
/usr/local/bin/setuidgid vpopmail \
/usr/local/bin/multilog t n20 s1000000 /var/log/vpopmaild &

Definitions:
SA = system administrator privilages
DA = domain administrator privilages
U = user privilages
<error code> = three digit error number, example: 123

Functions:

adddomain
auth: SA - no restrictions
usage: adddomain <domain name> <postmaster password>
returns:
OK - on success
ERROR <error code> <error message>

example:
client -> adddomain example.com test
vpopmaild -> OK
or
vpopmaild -> ERROR XXX domain exists

deldomain 
auth: SA - no restrictions
usage: deldomain <domain name>
OK - on success
ERROR <error code> <error message>

example:
client -> deldomain example.com
vpopmaild -> OK
or
vpopmaild -> ERROR XXX not authorized

adduser
auth: SA - no restrictions
auth: DA - must match DA domain
usage: adduser <[EMAIL PROTECTED]> <password>
OK - on success
ERROR <error code> <error message>

deluser
auth: SA - no restrictions
auth: DA - must match DA domain
usage:  deluser <[EMAIL PROTECTED]>
OK - on success
ERROR <error code> <error message>

passwd 
auth: SA - unrestricted
auth: DA - restricted to DA domain accounts
auth: U - restricted to users account
usage: passwd <[EMAIL PROTECTED]> <newpassword>

setquota
auth: SA - unrestricted
auth: DA - restricted to DA domain accounts
usage: setquota <[EMAIL PROTECTED]> <quota>

mkdir
auth: SA - restricted to vpopmail domain directories
auth: DA - restricted to DA domain directory
auth: U - restricted to users directory
usage: mkdir <directory>
OK - on success
ERROR <error code> <error message>

rmdir
auth: SA - restricted to vpopmail domain directories
auth: DA - restricted to DA domain directory
auth: U - restricted to users directory
usage: rmdir <directory>
OK - on success
ERROR <error code> <error message>

mkfile
auth: SA - restricted to vpopmail domain directories
auth: DA - restricted to DA domain directory
auth: U - restricted to users directory
usage: mkfile<file> <file contents>
OK - on success
ERROR <error code> <error message>

rmfile
auth: SA - restricted to vpopmail domain directories
auth: DA - restricted to DA domain directory
auth: U - restricted to users directory
usage: rmfile <file>OK - on success
ERROR <error code> <error message>

Error Codes:
Not yet defined

Reply via email to