|
I figured I'd expand on my original message... I
was working off of memory of code I edited a year ago.
Adding additional accountStatus types was easy as
pie for me:
1.) First, edit qmail-ldap.h and modify the section
about #define ISACTIVE_...
#define ISACTIVE_BOUNCE "disabled"
#define ISACTIVE_BOUNCE2 "delete" #define ISACTIVE_NOPOP "onhold" #define ISACTIVE_ACTIVE "active" You'll note that I added "ISACTIVE_BOUNCE2" which I
defined as "delete". As I mentioned earlier, this is my accountStatus for my
auto delete script. I happened to change the other status lines, but you don't
have too. Only a naming convention.
2.) Second, edit qmail-lspawn.c. I hope over to
about line 586:
/* check if the ldap entry is active
*/
if ( (vals = ldap_get_values(ld,msg,LDAP_ISACTIVE)) != NULL ) { DEBUG("is_active: ", vals[0], "\n", 0); if ( !str_diff(ISACTIVE_BOUNCE, vals[0]) ) _exit(225); if ( !str_diff(ISACTIVE_BOUNCE2, vals[0]) ) _exit(225); } I copied and modified the line ISACTIVE_BOUNCE2 to
mimick that of ISACTIVE_BOUNCE. So, effectivly, I wanted to make my
accountStatus=delete the same as accountStatus=disabled as far as mail delivery
is concerned.
3.) Modify checkpassword.c at around line
279:
/* check if the ldap entry is active
*/
if ( (vals = ldap_get_values(ld,msg,LDAP_ISACTIVE)) != NULL ) { debug_msg(OUTPUT," accountStatus is\t: %s\n", vals[0]); if ( !str_diff(ISACTIVE_BOUNCE, vals[0]) ) _exit(4); if ( !str_diff(ISACTIVE_BOUNCE2, vals[0]) ) _exit(4); if ( !str_diff(ISACTIVE_NOPOP, vals[0]) ) _exit(4); } Again, I added the BOUNCE2 line to reject POP
logins along with the pre-existing BOUNCE and NOPOP
NOW! All that being said. I use a rather old
version of qmail-ldap. Your mileage will vary. checkpassword is now all
but defunct... All that stuff has been moved to auth_*....
Have fun!
-James
---------------------------------------------------------
James Tavares <[EMAIL PROTECTED]> Sr. Data Network Engineer Log On America, Inc.
|
- accountStatus Yim K. F.
- Re: accountStatus Henning Brauer
- Re: accountStatus James Tavares
- James Tavares
