On 2005-09-19, at 1406, Matt Brookings wrote:

I just wanted to follow this posting up with a script that handles
hashed domains directories.  It's a little longer the previous one,
and may be a little fishy on older bash shells, but it should work
on any newer systems.  If you use it, let me know how it goes,
or any changes you feel should be made.

As the comment says at the top, you must name this script gen- hashed.sh
since it calls itself for recursion through the hashed directories,
and the script should be copied to ~vpopmail/domains and executed there.

is there a reason you couldn't have it recursively run itself using "$0" instead of forcing a fixed name? does it not work this way, or is this a testing version and not meant to be a finished product yet?

also, you're hard-coding the numeric uid/gid for the vpopmail user... you can do this at the beginning with

    VU=`id -u vpopmail`
    VG=`id -g vpopmail`

then use ${VU} and ${VG} instead of 89 when generating the assign file.

i've found it dangerous to make too many assumptions about how and where a program is run... i have a queue repair script, and early versions made the assumption that the bucket count was 23- somebody with a different bucket count ran it on their queue without reading the directions, and ended up causing more damage instead of fixing anything. i ended up having it call "qmail-showctl | grep split:" to use the correct count now...

i've run into the same thing with qmailadmin and vqadmin, and even went so far as to write a patch for vqadmin (which has been ignored by inter7 for two years- maybe mentioning it again here will make somebody look at it? visit http://qmail.jms1.net/ and search for "vqadmin" to see the patch.)

| John M. Simpson - KG4ZOW - Programmer At Large |
| http://www.jms1.net/           <[EMAIL PROTECTED]> |
| Mac OS X proves that it's easier to make UNIX  |
| pretty than it is to make Windows secure.      |

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

Reply via email to