[vchkpw] vmoduser

2004-11-28 Thread Andryan
Hello list,
I was playing around with vmoduser today and couldn't figure out some of 
its flags' usage. Could someone tell me what NO_DIALUP (-u), NO_RELAY 
(-r) and V_USER[0-3] (-(0-3)) do? If there's any documentation available 
somewhere, please let me know. :)

When I set some flags on a domain with vmoddomlimits, as per vmoduser 
parameter list says:

vmoduser: usage: [options] email_addr or domain (for the entire domain)
...
 -x ( clear all flags )
I wanted to clear all flags for that entire domain with vmoduser -x 
domain, however the flags remain untouched. The only way I could remove 
the flags is by using vmoddomlimits (for example -D) as well.
Perhaps it should be documented somewhere that: to set/reset/clear 
flags, we need to use the same tool. Otherwise it wouldn't work. Unless 
these flags are merged for both vmoduser and vmoddomlimits so they can 
be complementary to each other. Redundant though.

IMO, vmoduser should follow what vmoddomlimits does when dealing with 
entire domain. If you set flags for entire domain by using vmoduser, 
vuserinfo will NOT show:
smtp access is closed (*)
* = set by domain-wide limits
which I believe to be the proper behaviour for entire domain's flags.

Regards,
Andryan


Re: [vchkpw] Custom Maildir Structure

2004-11-28 Thread Robin Bowes
Tom Collins wrote:
There is a patch on SourceForge to add skel directory support to 
vpopmail, but we decided not to include it since it uses a system call 
to 'cp' to copy the files -- it would be better to do the copying within 
vpopmail itself.
Tom,
Can you you point me to a link to this patch -  I can't seem to find it 
on vpopmail.sf.net.

R.
--
http://robinbowes.com


Re: [vchkpw] Custom Maildir Structure

2004-11-28 Thread Tom Collins
On Nov 28, 2004, at 6:59 AM, Robin Bowes wrote:
Can you you point me to a link to this patch -  I can't seem to find 
it on vpopmail.sf.net.
I guess I was mistaken -- the patch never made it to SourceForge.  Here 
it is.  I declined to add it because it runs cp via a system() call.  
I'd prefer to have vpopmail manage the copying itself.

Patch from David Winkler to copy a set of files into the home directory 
of newly created users.

Index: vpopmail.c
===
RCS file: /cvsroot/vpopmail/vpopmail/vpopmail.c,v
retrieving revision 1.2
diff -u -r1.2 vpopmail.c
--- vpopmail.c  14 Sep 2003 22:17:30 -  1.2
+++ vpopmail.c  23 Sep 2003 19:12:45 -
@@ -1655,6 +1655,7 @@
  struct vqpasswd *mypw;
  char calling_dir[MAX_BUFF];
  char domain_dir[MAX_BUFF];
+ char tmpbuf[MAX_BUFF];
   verrori = 0;
   /* record the dir where the command was run from */
@@ -1701,6 +1702,7 @@
 return(NULL);
   }
+#ifndef ENABLE_VPOPMAIL_SKEL
   if (mkdir(Maildir,VPOPMAIL_DIR_MODE) == -1){
 /* back out of changes made above */
 chdir(domain_dir); chdir(user_hash); vdelfiles(username);
@@ -1743,6 +1745,12 @@
   /* set permissions on the user's dir */
   chdir(../..);
+#else
+  sprintf(tmpbuf, cp -rf %s/etc/skel/* %s/%s,
VPOPMAILDIR,domain_dir,username);
+  system(tmpbuf);
+  chdir(../);
+#endif
+
   r_chown(username, uid, gid);
   /* see if the user already exists in the auth backend */
Index: acconfig.h
===
RCS file: /cvsroot/vpopmail/vpopmail/acconfig.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 acconfig.h
--- acconfig.h  10 Sep 2003 20:43:14 -  1.1.1.1
+++ acconfig.h  23 Sep 2003 19:12:45 -
@@ -1,3 +1,5 @@
+#undef ENABLE_VPOPMAIL_SKEL
+
 #undef PS_COMMAND
 #undef ENABLE_PASSWD
Index: Makefile.am
===
RCS file: /cvsroot/vpopmail/vpopmail/Makefile.am,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.am
--- Makefile.am 10 Sep 2003 20:43:12 -  1.1.1.1
+++ Makefile.am 23 Sep 2003 19:12:45 -
@@ -94,6 +94,12 @@
  $(DESTDIR)@vpopmaildir@/@domains_dir@
$(INSTALL) -d $(DESTDIR)@vpopmaildir@/etc
+   $(INSTALL) -d $(DESTDIR)@vpopmaildir@/etc/skel
+   $(INSTALL) -d $(DESTDIR)@vpopmaildir@/etc/skel/Maildir
+   $(INSTALL) -d $(DESTDIR)@vpopmaildir@/etc/skel/Maildir/new
+   $(INSTALL) -d $(DESTDIR)@vpopmaildir@/etc/skel/Maildir/cur
+   $(INSTALL) -d $(DESTDIR)@vpopmaildir@/etc/skel/Maildir/tmp
+
echo [EMAIL PROTECTED]@/include  @vpopmaildir@/etc/inc_deps
echo [EMAIL PROTECTED]@/lib -lvpopmail @auth_libs@ 
@vpopmaildir@/etc/lib_deps
Index: configure.in
===
RCS file: /cvsroot/vpopmail/vpopmail/configure.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 configure.in
--- configure.in10 Sep 2003 20:43:11 -  1.1.1.1
+++ configure.in23 Sep 2003 19:12:45 -
@@ -342,6 +342,23 @@
  ;;
 esac
+AC_ARG_ENABLE(vpopmail-skel,
+ [ --enable-vpopmail-skel=y|nTurn on (y) or off (n,
default) to use
+vpopmail skeleton for new users.],
+ ENABLE_VPOPMAIL_SKEL=$enableval,
+ [
+ ENABLE_VPOPMAIL_SKEL=n
+ ])
+
+case $ENABLE_VPOPMAIL_SKEL in
+1*|y*|Y*)
+  ENABLE_VPOPMAIL_SKEL=1
+
AC_DEFINE_UNQUOTED(ENABLE_VPOPMAIL_SKEL,$ENABLE_VPOPMAIL_SKEL)
+  ;;
+*)
+  ;;
+esac
+
 AC_ARG_ENABLE(md5-passwords,
 [  --enable-md5-passwords=y|n   Turn on (y default ) or off (n)
to store encrypted passwords as md5.],
 ENABLE_MD5_PASSWORDS=$enableval,
@@ -1315,6 +1332,15 @@
  ;;
 esac
+case $ENABLE_VPOPMAIL_SKEL in
+1*|y*|Y*)
+echo  vpop skel = ON  --enable-vpopmail-skel=y
+echo  --enable-vpopmail-skel=y \\  vpopmail.config.sh
+  ;;
+*)
+echo  vpop skel = OFF --enable-vpopmail-skel=n (default)
+  ;;
+esac
 case $ENABLE_LOGGING in
 1*|y*|Y*)

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/


Re: [vchkpw] vmoduser

2004-11-28 Thread Tom Collins
On Nov 27, 2004, at 11:54 PM, Andryan wrote:
I was playing around with vmoduser today and couldn't figure out some 
of its flags' usage. Could someone tell me what NO_DIALUP (-u), 
NO_RELAY (-r) and V_USER[0-3] (-(0-3)) do? If there's any 
documentation available somewhere, please let me know. :)
If you have POP before SMTP set (roaming users), users with NO_RELAY 
will not be able to use POP before SMTP.

The NO_DIALUP flag and V_USER[0-3] flags aren't used anywhere in 
vpopmail -- they're there for other code that uses the vpopmail user 
database.

When I set some flags on a domain with vmoddomlimits, as per vmoduser 
parameter list says:

vmoduser: usage: [options] email_addr or domain (for the entire domain)
...
 -x ( clear all flags )
I wanted to clear all flags for that entire domain with vmoduser -x 
domain, however the flags remain untouched. The only way I could 
remove the flags is by using vmoddomlimits (for example -D) as well.
That's a good point.  vmoduser always modifies the user's flags, so it 
should say something like for all current users in domain instead.

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/