$Log$
+ Revision 591.101 2002/08/25 21:23:49 ajc
+ * Hide the SMTP queue and the sysconfig rooms.
+
Revision 591.100 2002/08/24 05:58:53 ajc
* Bugfixes and cosmetic changes to listsub system
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
*/
void master_startup(void) {
struct timeval tv;
-
- time(&server_startup_time);
+ struct quickroom qrbuf;
lprintf(9, "master_startup() started\n");
+ time(&server_startup_time);
+
lprintf(7, "Opening databases\n");
open_databases();
create_room(SYSCONFIGROOM, 3, "", 0, 1, 0);
create_room(config.c_twitroom, 0, "", 0, 1, 0);
+ /* The "Local System Configuration" room doesn't need to be visible */
+ if (lgetroom(&qrbuf, SYSCONFIGROOM) == 0) {
+ qrbuf.QRflags2 |= QR2_SYSTEM;
+ lputroom(&qrbuf);
+ }
+
+
lprintf(7, "Seeding the pseudo-random number generator...\n");
gettimeofday(&tv, NULL);
srand(tv.tv_usec);
}
+/*
+ * Initialize the SMTP outbound queue
+ */
+void smtp_init_spoolout(void) {
+ struct quickroom qrbuf;
+
+ /*
+ * Create the room. This will silently fail if the room already
+ * exists, and that's perfectly ok, because we want it to exist.
+ */
+ create_room(SMTP_SPOOLOUT_ROOM, 3, "", 0, 1, 0);
+
+ /*
+ * Make sure it's set to be a "system room" so it doesn't show up
+ * in the <K>nown rooms list for Aides.
+ */
+ if (lgetroom(&qrbuf, SMTP_SPOOLOUT_ROOM) == 0) {
+ qrbuf.QRflags2 |= QR2_SYSTEM;
+ lputroom(&qrbuf);
+ }
+}
+
+
/*****************************************************************************/
smtp_greeting,
smtp_command_loop);
- create_room(SMTP_SPOOLOUT_ROOM, 3, "", 0, 1, 0);
+ smtp_init_spoolout();
CtdlRegisterSessionHook(smtp_do_queue, EVT_TIMER);
CtdlRegisterProtoHook(cmd_smtp, "SMTP", "SMTP utility commands");
return "$Id$";
int create_user(char *newusername, int become_user)
{
struct usersupp usbuf;
+ struct quickroom qrbuf;
struct passwd *p = NULL;
char username[SIZ];
char mailboxname[ROOMNAMELEN];
/* add user to userlog */
putuser(&usbuf);
- /* give the user a private mailbox and a configuration room */
+ /*
+ * Give the user a private mailbox and a configuration room.
+ * Make the latter an invisible system room.
+ */
MailboxName(mailboxname, sizeof mailboxname, &usbuf, MAILROOM);
create_room(mailboxname, 5, "", 0, 1, 1);
+
MailboxName(mailboxname, sizeof mailboxname, &usbuf, USERCONFIGROOM);
create_room(mailboxname, 5, "", 0, 1, 1);
+ if (lgetroom(&qrbuf, USERCONFIGROOM) == 0) {
+ qrbuf.QRflags2 |= QR2_SYSTEM;
+ lputroom(&qrbuf);
+ }
/* Everything below this line can be bypassed if administratively
creating a user, instead of doing self-service account creation