On 2007-01-06, at 1310, Joshua Megerman wrote:
On Saturday 06 January 2007 12:56, John Simpson wrote:

joshua? if we add an "onauth" hook, how long would it take you to
duplicate what vpopmail already does, using external scripts? i'm
thinking maybe a set of files in a subdirectory under "contrib", and
you would write a README.something file and maybe an external web
site documenting the scripts and how to set them up...

I honestly don't know - I haven't had time to start looking at this (probably won't until sometime next week), but there's 2 separate pieces: 1) the onauth hook itself, which needs to be designed properly (though it's fairly simple, so it shouldn't be too hard), and 2) the actual update functionality, which depends on the different backends - of which I'm really only familiar with 1
(MySQL).  I'll give you a better idea of timeline once I look at it...

you're right, the "onauth" code itself is simple- i could probably write it in about fifteen minutes, and i'm sure several other people could as well.

what we need is to decide exactly what the interface will be when the script when it gets run (i.e. what gets passed on the command line, and what environment variables are passed.) what i see is the following:

command line arguments:
        timestamp               i.e. sprintf("%lu",time())
        service                 pop3, imap, smtp

and when the call_onauth() function builds the command line, it will explicitly put single quotes around each item, so that if (for example) the mailbox name somehow contains a space, the shell which runs the onauth script won't break the address into two or more pieces at the wrong place.

environment variables: as received from parent. this will normally include the environment variables described on "man tcp-environ", which are:

thoughts? would there be cases where vchkpw or vpopmaild might be called when these variables are not present, which would make it necessary to put TCPREMOTEIP on the command line as well?

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

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

Reply via email to