popa3d and Maildir or mbox
Hi there,
I'm doing a lot of time to figure out the POP3 client coming with slackware ... popa3d. It works nicely on my slackware-10.1 server. Now I want to change the mail into the user's HOME directories - using Maildir/. There's a patch for popa3d to use it with Maildir (hhg.to/popa3d/maildir.html) Fro testing purpose I use procmail to have mail sent to users be stored in 3 places: /var/spool/mail $HOME/mbox $HOME/Maildir I found a place distributing how slackware alters the params.h and Makefile for popa3d - which is very helpful ... will add it in the end (forgot the URL) I got popa3d source, altered params.h and Makefile, patched it, and make it, make install ... The whole installing process works alright. (/usr/sbin/popa3d (original size 22956) now 27100 bytes). FROM NOW ON I cannot get (retrieve using Thunderbird on my local PC) any mail any more, and in most cases receive an "-ERR" or a "Authentication failed" message. I've tried many varieties, even using the patched popa3d with Option #define POP_MAILDIR 0 (off). It looks to me like the patch doesn't work??? If I rebuild popa3d from source applying belows alterations, I receive mail perfectly from my users boxes living in /var/spool/mail I'VE SPENT several days on this ... and I think I read about ANY post on the net ... cannot find any explanation, solution or _real_ help on the matter. I'd like to use popa3d with Maildir/ (and not switching to for example "qmail"). Any experience, any solutions, any help is most appreciated! Thanks in advance... + + + Slackware popa3d.diff + + + --- ./Makefile.orig 2003-11-16 16:43:35.000000000 -0800 +++ ./Makefile 2005-07-13 22:36:31.000000000 -0700 @@ -5,11 +5,11 @@ INSTALL = install -c CFLAGS = -Wall -O2 -fomit-frame-pointer # You may use OpenSSL's MD5 routines instead of the ones supplied here -#CFLAGS += -DHAVE_OPENSSL +CFLAGS += -DHAVE_OPENSSL LDFLAGS = -s LIBS = # Linux with glibc, FreeBSD, NetBSD -#LIBS += -lcrypt +LIBS += -lcrypt # HP-UX trusted system #LIBS += -lsec # Solaris (POP_STANDALONE, POP_VIRTUAL) @@ -21,10 +21,10 @@ # libwrap may also want this #LIBS += -lnsl # OpenSSL (-DHAVE_OPENSSL) -#LIBS += -lcrypto +LIBS += -lcrypto DESTDIR = -PREFIX = /usr/local +PREFIX = /usr SBINDIR = $(PREFIX)/sbin MANDIR = $(PREFIX)/man --- ./params.h.orig 2005-05-26 08:35:15.000000000 -0700 +++ ./params.h 2005-07-13 22:36:31.000000000 -0700 @@ -13,7 +13,7 @@ /* * Are we going to be a standalone server or start via an inetd clone? */ -#define POP_STANDALONE 0 +#define POP_STANDALONE 1 #if POP_STANDALONE @@ -103,13 +103,13 @@ * A pseudo-user to run as before authentication. The user and its UID * must not be used for any other purpose. */ -#define POP_USER POP_SERVER +#define POP_USER "pop" /* * An empty directory to chroot to before authentication. The directory * and its parent directories must not be writable by anyone but root. */ -#define POP_CHROOT "/var/empty" +#define POP_CHROOT "/var/spool/pop" /* * Sessions will be closed if idle for longer than POP_TIMEOUT seconds. @@ -191,7 +191,7 @@ * * #undef this for qmail-style $HOME/Mailbox mailboxes. */ -#define MAIL_SPOOL_PATH "/var/mail" +#define MAIL_SPOOL_PATH "/var/spool/mail" #ifndef MAIL_SPOOL_PATH /* |
I've had qmail with pop3ad with maildir support installed and running for about 2 years now. Here's what I did to get maildir support for popa3d.
-Makefile in popa3d source all I edited was the line #LIBS += -lcrypt to LIBS += -lcrypt These are my files I've used I put them up here for you to look at hopefully they help. http://slackbox.com/tmp I've always used a stock slackware system. After I patch and make popa3d I just usually copy the popa3d to /usr/local/bin and add a new popa3d line to inetd.conf. I like to keep the slackware existing popa3d intact just for backup. pop3 stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/popa3d Hope this helps if not let me know. |
Hi Pierow,
tx for the fast reply. I'm using sendmali (to receive/send) and procmail to deliver to the Maildir. params.h and Makefile of yours look similar, eventhough I made all the changes of the slackware.diff in Makefile and have a slash in the end of Maildir/. However, if you're using qmail ... do you use popa3d at all? I thought qmail is doing the POP3 too. ANYHOW, as usual ... once posted ... I found out more by myself ... still - not there, yet! In my case, I got rid of a lot of problems by chown and chgrp USER the (mbox or) Maildir (and containing directories new, cur and tmp). One question remains ... how do I get procmail to a) create and b) write Directories and Mail files as Owned and Grouped by USER .... hmmm ... guess I have to dig a bit deeper into procmail... |
and again ... here we go with solutions...
setting my procmailrc to the following: ORGMAIL=/var/spool/mail/ LOGFILE=/var/log/procmail.log LOGNAME=$HOME DROPPRIVS=yes :0Hhb $HOME/Maildir/ ... >>> ... did the trick. -> DROPPRIVS=yes executes everything below on behalf of the USER. That's it.... unless someone see's a security risk in it ...in that case, pls let me know. |
courier-imap works native with maildirs and includes both pop3 and imap servers
|
All times are GMT -5. The time now is 04:43 AM. |