--- popa3d-0.4.orig/INSTALL Tue Feb 1 06:29:02 2000 +++ popa3d-0.4/INSTALL Mon Sep 18 17:58:35 2000 @@ -21,6 +21,13 @@ $ make +If your MTA places mailboxes in users' homes, you can build popa3d with +command-line argument MAILBOX_FILE=mailbox_file_name, e.g.: + + $ make MAILBOX_FILE=Mailbox + +instead of setting definition in params.h. + 5. Install the binary: # cp popa3d /usr/sbin/popa3d --- popa3d-0.4.orig/Makefile Tue Feb 1 03:56:46 2000 +++ popa3d-0.4/Makefile Mon Sep 18 17:59:01 2000 @@ -12,6 +12,10 @@ protocol.o database.o mailbox.o \ misc.o +ifdef MAILBOX_FILE + CFLAGS+= -DMAILBOX_FILE=\"$(MAILBOX_FILE)\" +endif + popa3d: $(OBJS) $(LD) $(LDFLAGS) $(OBJS) -o popa3d --- popa3d-0.4.orig/mailbox.c Thu Mar 25 04:25:55 1999 +++ popa3d-0.4/mailbox.c Mon Sep 18 17:47:31 2000 @@ -12,6 +12,9 @@ #include #include #include +#ifdef MAILBOX_FILE +#include +#endif #include "md5/md5.h" @@ -277,12 +280,22 @@ char *pathname; struct stat stat; int result; +#ifdef MAILBOX_FILE + struct passwd *pw; +#endif mailbox_fd = -1; - - pathname = malloc(strlen(MAIL_SPOOL_PATH) + strlen(mailbox) + 2); +#ifdef MAILBOX_FILE + pw=getpwnam(mailbox); + if (!pw) return 1; +#define MAILBOX_PATH pw->pw_dir +#else +#define MAILBOX_FILE mailbox +#define MAILBOX_PATH MAIL_SPOOL_PATH +#endif + pathname = malloc(strlen(MAILBOX_PATH) + strlen(MAILBOX_FILE) + 2); if (!pathname) return 1; - sprintf(pathname, "%s/%s", MAIL_SPOOL_PATH, mailbox); + sprintf(pathname, "%s/%s", MAILBOX_PATH, MAILBOX_FILE); if (lstat(pathname, &stat)) { free(pathname); --- popa3d-0.4.orig/params.h Tue Feb 1 06:16:24 2000 +++ popa3d-0.4/params.h Mon Sep 18 17:37:57 2000 @@ -84,6 +84,16 @@ #define MAIL_SPOOL_PATH "/var/spool/mail" /* + * Your Mailbox file name. Define ONLY if you have your mailboxes + * placed in users' homes (e.g. qmail Mailbox). The file can + * be placed in home's subdirectory (e.g. ".mail/inbox"). + * The definition causes MAIL_SPOOL_PATH=$HOME. + */ +/* + *#define MAILBOX_FILE "Mailbox" + */ + +/* * How do we talk to syslogd? These should be fine for most systems. */ #define SYSLOG_IDENT "popa3d"