howdy all-

i have gone through the "skeleton patch" which has been floating around the net for a while, and found it to be rather painful to deal with. the code itself is borderline unreadable, and the recursive "copyskel()" function which creates the new directory calls itself, with its original parameters, leading me to believe that it may not even work correctly. it makes vpopmail not work if the skeleton directory is missing or does not contain the standard Maildir structure, and it also changes some other totally unrelated items- it changes the new domain default delivery target from "bounce-no- mailbox" to "delete", for example. and it also made a lot of insignificant changes to the spacing and indentation of the code, which was totally un-necessary.

i found it easier to start from scratch, using my own code, rather than try to clean up and trim down this other patch.

so i pulled a recursive "copydir()" function, along with a "copyfile ()" and "makedir()" functions, from a program i wrote years ago, and rolled a patch which adds a skeleton functionality to vpopmail.

it's a bit different than the existing patch. basically, after creating the mailbox directory (the parent of "Maildir") vpopmail.c calls the new copydir() function, but it doesn't error out if copydir () fails- which allows ~vpopmail/skel to not exist without making vpopmail barf, or even complain. then, after copying the ~vpopmail/ skel items, it creates the standard Maildir structure as well, just in case the skeleton didn't contain it. this allows system admins to set up skeleton directories, either with or without the Maildir structure, without breaking anything.

i also broke down (finally) and figured out how to make the necessary changes to "configure.in", "config.h.in", and "Makefile.am", to add a "--configure-skeleton" option to the ./configure list. i also ran "automake" and "autoconf" to generate the "Makefile.am" and "configure" files. the patch includes these changes as well.

and i added a README.skel file, with a basic description of what the new code does.

i've done a little bit of testing on my own server, it seems to work, and i am running it with a skeleton containing "Drafts", "Sent", and "Trash" IMAP folders. mailboxes added with "vadddomain" are being created with these folders already in place. however, i would like to see this code tested by several people before i recommend it for the next release of vpopmail. and if anybody has any suggestions for something which needs to go in the README.skel file, i'd like to hear that as well.

        http://qmail.jms1.net/vpopmail/#skel

----------------------------------------------------------------
| John M. Simpson    ---   KG4ZOW   ---    Programmer At Large |
| http://www.jms1.net/                         <[EMAIL PROTECTED]> |
----------------------------------------------------------------
| http://video.google.com/videoplay?docid=-1656880303867390173 |
----------------------------------------------------------------


Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to