/* -*- mode:c -*- * * Hi, * I just hacked a small vmailmgr authenticator, or, more precisely, bincimap- * uidpwd replacement. I now run bincimapd like that: * * /usr/local/bin/bincimapd --conf=/usr/local/etc/bincimap.conf \ * /usr/local/bin/bincimap-auth- * checkpassword /usr/local/bin/checkvpw /usr/local/bin/myauth maildir * * The last parameter is important because of a bug in checkvpw, vmailmgr's * checkpassword authenticator. I'll contact vmailmgr's author soon, I hope * he'llfix it. * I set up binc imap just to test it, and I like the way it's configured. It * waseasy and quick. I'll throw Courier-IMAP away ;) * * Anyway, here goes: */ #include #include #include int main(void) { char cwd[4096]; char *maildir; getcwd(cwd,sizeof(cwd)); if(cwd==NULL) exit(111); maildir=getenv("MAILDIR"); if(maildir==NULL) exit(111); printf("%d.%d\n%s/%s\n",getuid(), getgid(), cwd, maildir); exit(0); }