Hi Darek, Did you check open_smtp_relay() function in vpopmail.c
If you use this function also you can also remove the IP address of the user from the tcp.smtp.cdb after a certain time-period (timeout) by modifying the tcp.smtp files (tcp.smtp, open-smtp, tcp.smtp.cdb etc) in clearopensmtp.c /************************************************************************/ #ifdef POP_AUTH_OPEN_RELAY /* This function is used to grab the user's ip address * and add it to the ip's that are allowed to relay mail * through this server. * * For mysql backend, the ip is added to the relay table * For cdb backend, the ip is added to the ~vpopmail/etc/open-smtp file * * Then the update_rules() function is called which * combines the tcp.smtp rules with the relay-table/open-smtp rules * to build a new tcp.smtp.cdb file for tcpserver to use * * This function is called after a successful pop-auth by vchkpw, * (assuming that roaming users are enabled) */ int open_smtp_relay() { ... } Thursday, July 19, 2007, 7:49:25 PM, you wrote: > Hi there, > i'm interested in using the library to write a small app that would add > an IP to the relay list (open-smtp or tcp.smtp.cdb). > The docs are a bit sparse on this. Idid find: > int vauth_addomain( char *domain) > domain = domain name to add to authentication system > But I cannot find any mention of the function in any of the sources in > 5.4.13, nor the library. > # strings ~vpopmail/lib/libvpopmail.a | grep vauth_addomain > # > Doing a grep on the sources, I'm looking at > cdb/cdbmake_add.c : int cdbmake_add(cdbm,h,p,alloc) > cdb/cdbmake_add.c : int cdbmake_split(cdbm,alloc) > Various functions in vauth.c and possibly vcdb.c > int vadd_ip_map( char *ip, char *domain) or > int vauth_adduser_line(FILE *, char *, char *, char *, char *, char *, int); > Anyone have any more insight? I simply want to be able to add an IP to > tcp.smtp.cdb for imap-before-smtp for an imap server that doesn't have > that functionality for vpopmail but has functionality to execute a > program after a successful login. > Thanks, > Darek -- Ismail YENIGUL Tel: +90 533 747 3665 [EMAIL PROTECTED] http://www.endersys.com http://www.endersys.com.tr