*** imapd.c~ Tue Dec 14 18:33:53 1999 --- imapd.c Tue Dec 14 18:43:42 1999 *************** *** 548,553 **** --- 548,556 ---- mailbox_close(imapd_mailbox); } prot_flush(imapd_out); + #ifdef DRAC_AUTH + (void)dracdisc((char **)NULL); + #endif /* DRAC_AUTH */ exit(code); } *************** *** 599,604 **** --- 602,615 ---- close(fd); } + #ifdef DRAC_AUTH + { + char *err; + if (dracconn("localhost", &err) != 0) + syslog(LOG_NOTICE, "dracconn: %s", err); + } + #endif /* DRAC_AUTH */ + for (;;) { if (! imapd_userisadmin && (fd = open(shutdownfilename, O_RDONLY, 0)) != -1) { *************** *** 1297,1302 **** --- 1308,1321 ---- if (!reply) reply = "User logged in"; + #ifdef DRAC_AUTH + { + char *err; + if (dracsend(imapd_remoteaddr.sin_addr.s_addr, &err) != 0) + syslog(LOG_NOTICE, "dracsend: %s", err); + } + #endif /* DRAC_AUTH */ + /* Create telemetry log */ sprintf(buf, "%s%s%s/%u", config_dir, FNAME_LOGDIR, imapd_userid, getpid()); *************** *** 1427,1432 **** --- 1446,1459 ---- prot_setsasl(imapd_in, imapd_saslconn); prot_setsasl(imapd_out, imapd_saslconn); + #ifdef DRAC_AUTH + { + char *err; + if (dracsend(imapd_remoteaddr.sin_addr.s_addr, &err) != 0) + syslog(LOG_NOTICE, "dracsend: %s", err); + } + #endif /* DRAC_AUTH */ + /* Create telemetry log */ sprintf(buf, "%s%s%s/%u", config_dir, FNAME_LOGDIR, imapd_userid, getpid()); *************** *** 1456,1461 **** --- 1483,1497 ---- } prot_printf(imapd_out, "%s OK %s\r\n", tag, error_message(IMAP_OK_COMPLETED)); + + #ifdef DRAC_AUTH + { + char *err; + if (dracsend(imapd_remoteaddr.sin_addr.s_addr, &err) != 0) + syslog(LOG_NOTICE, "dracsend: %s", err); + } + #endif /* DRAC_AUTH */ + } /* *************** *** 1785,1790 **** --- 1821,1835 ---- proc_register("imapd", imapd_clienthost, imapd_userid, mailboxname); syslog(LOG_DEBUG, "open: user %s opened %s", imapd_userid, name); + + #ifdef DRAC_AUTH + { + char *err; + if (dracsend(imapd_remoteaddr.sin_addr.s_addr, &err) != 0) + syslog(LOG_NOTICE, "dracsend: %s", err); + } + #endif /* DRAC_AUTH */ + } /* *** pop3d.c~ Tue Dec 14 18:34:00 1999 --- pop3d.c Tue Dec 14 18:44:38 1999 *************** *** 989,994 **** --- 989,1002 ---- popd_mailbox = &mboxstruct; proc_register("pop3d", popd_clienthost, popd_userid, popd_mailbox->name); + #ifdef DRAC_AUTH + { + char *err; + if (dracauth("localhost", popd_remoteaddr.sin_addr.s_addr, &err) != 0) + syslog(LOG_NOTICE, "dracauth: %s", err); + } + #endif /* DRAC_AUTH */ + /* Create telemetry log */ sprintf(buf, "%s%s%s/%u", config_dir, FNAME_LOGDIR, popd_userid, getpid());