patch is included: (patched against vpopmail-5.3.19)

adds two utilities (and a few patches to the vadddomain/vdeldomain functions 
as well as some vlimits stuff)

- vmoddomlimits : sets vlimits for a domain
vmoddomlimits: usage: [options] domain
options: -v ( display the vpopmail version number )
         -S ( show current settings )
         -Q quota ( set domain quota )
         -q quota ( set default user quota )
         -M count ( set domain max msg count )
         -m count ( set default user max msg count )
         -P count ( set max ammount of pop accounts )
         -A count ( set max ammount of aliases )
         -F count ( set max ammount of forwards )
         -R count ( set max ammount of autoresponders )
         -L count ( set max ammount of mailing lists )
the following options are bit flags in the gid int field
         -g "flags"  (set flags, see below)
         gid flags:
            u ( set no dialup flag )
            d ( set no password changing flag )
            p ( set no pop access flag )
            s ( set no smtp access flag )
            w ( set no web mail access flag )
            i ( set no imap access flag )
            r ( set no external relay flag )
the following options are bit flags for non postmaster admins
         -p "flags"  (set pop account flags)
         -a "flags"  (set alias flags)
         -f "flags"  (set forward flags)
         -r "flags"  (set autoresponder flags)
         -l "flags"  (set mailinglist flags)
         -u "flags"  (set mailinglist users flags)
         -o "flags"  (set mailinglist moderators flags)
         -x "flags"  (set quota flags)
         -z "flags"  (set default quota flags)
         perm flags:
            a ( set deny all flag )
            c ( set deny create flag )
            m ( set deny modify flag )
            d ( set deny delete flag )

(sorry, but there _are_ a lot of settings in vlimits)
i have included a default vlimits set  "vlimits.default" which is expected in 
~vpopmail/etc/vlimits.default

i've also included patches to vadddomain/vdeldomain to add/remove limits (the 
default settings are added), as the current vpopmail-5.3.19 breaks popmail 
usage with some email clients, because directly after logging in it says 
"vnysql: no limits found" (or something like that)



- vadmind : some sort of daemon for creating/deleting users/domains/aliases 
(vmailmgr has something very similar)
i wrote vadmind as i needed something in the middle of vpopmail and my php 
frontend for email administration. with vadmind there's no need to have 
vpopmail and apache running on the same server, you won't have to use the 
clumsy vpopmail php modules (which force you to run apache as the vpopmail 
user or root), you can stunnel/tcpserver/systrace vadmind quite easily (at 
least i expect that, haven't tried it yet)

i guess it wouldn't be too hard to update qmailadmin and vqadmin to use 
vadmind.

if you don't need vadmind : don't worry, there are no changes to any other 
parts of vpopmail, so you could just delete vadmind or leave it in place...


there's also a small php example on how to use vadmind  : vadmin-test.php

currently i have 4 auth methods ( yes: vadmind needs authentication before it 
does anything..) email_plain/email_crypt just expects a postmaster account 
(or vlimits.perm* flags set) and then lets you add/delete users/aliases for 
that domain
master_plain/master_crypt enables (alias)domain adding/removing, as well as 
user/alias management for all domains. 

vadmind: usage: [options]
options: -v (print the version)
         -a username (adds user "username" to the master access list)
         -d username (deletes user "username" from the master access list)
         -r (rebuilds cdb password file)


if you start vadmind without any parameters, it expects input from stdin (you 
can run it from tcpserver or ucspi-unix for adding network support)

i'm going to provide a list of all the commands which i have currently 
implemented. by now, i'll include only a very short summary:

vadddomain
vadduser
vaddaliasdomain
vaddalias
vdeldomain
vdelalias
vdeluser
vpasswd
vauth

are the commands

the command array (vadmin-test.php)
may have the following keys set:

Command
Domain
User
Gecos
Dir
Quota
Passwd
AliasDomain
AliasLine
BounceEmail
Uid
Gid
RandomPw
Apop


not all of them are needed, not all of them are yet used: however:
Command takes the command (wow!)
Domain takes the domain (wow again!)
...
e.g. for creating a user  [EMAIL PROTECTED] with random password:
Command=vadduser
Domain=test.com
User=newuser
RandomPw=1

for adding a forward [EMAIL PROTECTED] pointing to [EMAIL PROTECTED]:
Command=vaddalias
Domain=test.com
User=forward
AliasLine=&newusertest.com

an aliasdomain alias.com which is an alias for test.com:
Command=vaddaliasdomain
Domain=test.com
AliasDomain=alias.com


finally: vadmind seems to work for me (i'm still testing and only using 
vadmin-test.php). if this breaks your multi million user vpopmail cluster... 
but you surely won't use vpopmail-dev with user patches on something that 
valuable, will you?


-- 
Mit internetten Grüßen / Best Regards
---------------------------------------------------------------------------
Justin Heesemann                                        ionium Technologies
[EMAIL PROTECTED]                                                www.ionium.org

Attachment: vadmin-vlimits-5.3.19.diff.gz
Description: GNU Zip compressed data

Reply via email to