userdb-vpopmail.c revision 00bde9ae9eab9e720462bf6ec9a4dd85e88c3bbf
/* Copyright (C) 2002-2003 Timo Sirainen */
/* Thanks to Courier-IMAP for showing how the vpopmail API should be used */
#include "common.h"
#if defined(PASSDB_VPOPMAIL) || defined(USERDB_VPOPMAIL)
#include "userdb.h"
#include "userdb-vpopmail.h"
char vpop_user[VPOPMAIL_LIMIT],
char vpop_domain[VPOPMAIL_LIMIT])
{
/* vpop_user must be zero-filled or parse_email() leaves an
extra character after the user name. we'll fill vpop_domain
as well just to be sure... */
VPOPMAIL_LIMIT-1) < 0) {
"parse_email() failed");
return NULL;
}
"lookup user=%s domain=%s",
return NULL;
}
return vpw;
}
#ifdef USERDB_VPOPMAIL
{
struct auth_stream_reply *reply;
return;
}
struct vqpasswd isn't really gid at all but just some flags... */
"vget_assign(%s) failed", vpop_domain);
return;
}
/* user's homedir doesn't exist yet, create it */
"pw_dir isn't set, creating");
"make_user_dir(%s, %s) failed",
NULL, auth_request);
return;
}
/* get the user again so pw_dir is visible */
NULL, auth_request);
return;
}
}
}
static struct userdb_module *
{
struct userdb_module *module;
}
return module;
}
struct userdb_module_interface userdb_vpopmail = {
"vpopmail",
NULL,
NULL,
};
#endif
#endif