On 2006-04-16, at 1649, Robin Bowes wrote:
John Simpson wrote:
On 2006-04-16, at 0639, Robin Bowes wrote:

It also calls different "scripts" for each hook rather than having one monolithic "something's changed" script. Would that be a better approach
for vpopmail?

i don't think so. if you want to use this kind of approach, you can
create an "onchange" script which looks like this:

    if [ -e ~vpopmail/etc/$1 ]
        exec ~vpopmail/etc/$*
    logger -t onchange ignoring command "$*"
    exit 0

and then create scripts in ~vpopmail/etc with names matching the "cmd"
parameter sent to the "onchange" script.

That will still exec the script for every OnChange event.

exactly. the original concept was to modify vpopmail itself as little as possible, and any customizations would be done by the scripts, outside of vpopmail. besides, i don't really want to hard-code 15 different script names into the source code, and deal with the resulting confusion.

would it be better to use the vpopmail function names for all of the
notifications, so that they are all consistent? if so, now is the
time to make the decision, since nobody (as far as i know) has
written any onchange scripts which would look for specific strings.

I don't really care. Robin - what do you think the names should be?

As far as I'm concerned, all I need is a complete list in front of me
when I sit down to write the script.

I don't really care either, but they should be consistent - add_user or
user_add, but not a mix.

since nobody really cares, i'm just going to leave them the way they are.

Ahem, I said I didn't care as long as they were consistent!

okay... you seem to be the only person with strong feelings about it. cool by me. i'm not doing anything with the messages yet (and for my needs i don't really need to), the "onchange" script on my server is very simple:

        logger -t onchange "$*"
        echo "$*" > /tmp/update-qmail

the list of messages and parameters is on the web. send your changes to me on the vpopmail-devel mailing list and i'll update the code.


| 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