head 1.1; access; symbols; locks; strict; comment @# @; 1.1 date 2003.03.23.18.22.08; author swiergot; state Exp; branches; next ; desc @@ 1.1 log @- Added qmail patch. This patch allows to decide by passing command-line option, whether popa3d should use /var/spool/mail or ~/Mailbox. Originally this choice is being taken before compiling popa3d. The patch has been made against sources modified with the slack patch. @ text @diff -ruN popa3d-0.6.2.orig/params.h popa3d-0.6.2/params.h --- popa3d-0.6.2.orig/params.h 2003-03-23 19:15:01.000000000 +0100 +++ popa3d-0.6.2/params.h 2003-03-23 19:15:50.000000000 +0100 @@@@ -177,16 +177,13 @@@@ * Your mail spool directory. Note: only local (non-NFS) mode 775 mail * spools are currently supported. * - * #undef this for qmail-style $HOME/Mailbox mailboxes. */ #define MAIL_SPOOL_PATH "/var/spool/mail" -#ifndef MAIL_SPOOL_PATH /* - * The mailbox file name relative to the user's home directory. + * The qmail-style mailbox file name relative to the user's home directory. */ #define HOME_MAILBOX_NAME "Mailbox" -#endif #endif diff -ruN popa3d-0.6.2.orig/popa3d.8 popa3d-0.6.2/popa3d.8 --- popa3d-0.6.2.orig/popa3d.8 2003-03-02 04:27:21.000000000 +0100 +++ popa3d-0.6.2/popa3d.8 2003-03-23 19:15:40.000000000 +0100 @@@@ -5,6 +5,7 @@@@ .B popa3d .RB [ -D ] .RB [ -V ] +.RB [ -Q ] .SH DESCRIPTION .B popa3d is a Post Office Protocol version 3 (POP3) server. @@@@ -46,6 +47,9 @@@@ .TP .B -V Print version information and exit. +.TP +.B -Q +Work with qmail-style mailboxes in ~/Mailbox. .SH COMMANDS A normal POP3 session progresses through three states: AUTHORIZATION, TRANSACTION, and UPDATE. diff -ruN popa3d-0.6.2.orig/pop_root.c popa3d-0.6.2/pop_root.c --- popa3d-0.6.2.orig/pop_root.c 2002-03-21 21:15:19.000000000 +0100 +++ popa3d-0.6.2/pop_root.c 2003-03-23 19:15:40.000000000 +0100 @@@@ -37,6 +37,9 @@@@ extern struct passwd *auth_userpass(char *user, char *pass, int *known); #endif +/* startup.c */ +extern int qmailstyle; + /* POP_USER's pw_uid and pw_gid, other fields may not be valid */ static struct passwd pop_pw; @@@@ -171,13 +174,14 @@@@ /* never reached */ return AUTH_FAILED; #else -#ifdef MAIL_SPOOL_PATH - spool = MAIL_SPOOL_PATH; - mailbox = user; -#else - spool = pw->pw_dir; - mailbox = HOME_MAILBOX_NAME; -#endif + if (qmailstyle) + { + spool = pw->pw_dir; + mailbox = HOME_MAILBOX_NAME; + } else { + spool = MAIL_SPOOL_PATH; + mailbox = user; + } return AUTH_OK; #endif diff -ruN popa3d-0.6.2.orig/startup.c popa3d-0.6.2/startup.c --- popa3d-0.6.2.orig/startup.c 2003-03-02 04:38:58.000000000 +0100 +++ popa3d-0.6.2/startup.c 2003-03-23 19:15:40.000000000 +0100 @@@@ -28,9 +28,11 @@@@ static char *progname; #endif +int qmailstyle = 0; + static void usage(void) { - fprintf(stderr, "Usage: %s [-D] [-V]\n", progname); + fprintf(stderr, "Usage: %s [-D] [-V] [-Q]\n", progname); exit(1); } @@@@ -50,12 +52,16 @@@@ progname = POP_SERVER; #endif - while ((c = getopt(argc, argv, "DV")) != -1) { + while ((c = getopt(argc, argv, "DVQ")) != -1) { switch (c) { case 'D': standalone++; break; + case 'Q': + qmailstyle++; + break; + case 'V': version(); @ .