Qsmtp  0.30dev
Functions
vpop.h File Reference

declaration of function for accessing vpopmail data files More...

Go to the source code of this file.

Functions

int vget_dir (const char *, struct userconf *)
 query the users/cdb file for information about this domain More...
 

Detailed Description

declaration of function for accessing vpopmail data files

Function Documentation

int vget_dir ( const char *  domain,
struct userconf ds 
)

query the users/cdb file for information about this domain

Parameters
domainthe domain to query
dspointer to userconf struct holding the domain info
Returns
negative error code or flag if domain was found
Return values
0domain is not in database
1domain was found
<0negative error code
-EDONEthe error was already handled

Function will return 1 on success, memory for domaindir will be malloced. The directory name will always end with a single '/' and be 0-terminated. If the domain does not exist 0 is returned, also if no users/cdb exists. On error a negative error code is returned.

If ds already contains information about the same domain directory then the already existing information is preserved.