On Sun, 2004-04-25 at 09:59, Tech Info wrote:
> Hello there,
> 
> I have a qmail/vpopmail/mysql set-up running on Redhat 8, I would like 
> to know how I can opt for 'creating user mailbox on the fly' option? Is 
> there anyone who can help me out in this?
> 
> Ansu
> 
> 
Hi, regular "vadduser" from vpopmail takes care of that. But anyway, one
thing you can do is (when using maildrop in .qmail-default) is add such
code on /etc/maildroprc.
For example:

VHOME=`/Appz2/VPopMail/bin/vuserinfo -d [EMAIL PROTECTED]
`test -d $VHOME/Maildir`
                if( $RETURNCODE == 1 )
                {
                        `maildirmake $VHOME/Maildir`
                }
That would create the maildir in case the "test" is failed.
Also you can do this to create ( or re-create ) maildirsize:
`test -s "$VHOME/Maildir/maildirsize"`
if ( $RETURNCODE == 1 )
{
   `/Appz2/VPopMail/bin/vuserinfo -Q [EMAIL PROTECTED]

   `test -s "$VHOME/Maildir/maildirsize"`
   if ( $RETURNCODE == 0 )
   {
      `/bin/chown vpopmail:vchkpw $VHOME/Maildir/maildirsize`
      `/bin/chmod 640 $VHOME/Maildir/maildirsize`
   }
}

In case you're adding users directly to mysql (that could be your case
since the maildir is missing) know there's in development a vpopmaild
daemon, you could access with php, and access vpopmail api from there.

Reply via email to