Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 07-24-2005, 12:36 AM   #1
LQ Newbie
Registered: Jul 2005
Location: Bangkok
Distribution: Slackware
Posts: 20

Rep: Reputation: 0
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 (

Fro testing purpose I use procmail to have mail sent to users be stored in 3 places:

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
# Linux with glibc, FreeBSD, NetBSD
-#LIBS += -lcrypt
+LIBS += -lcrypt
# HP-UX trusted system
#LIBS += -lsec
@@ -21,10 +21,10 @@
# libwrap may also want this
#LIBS += -lnsl
-#LIBS += -lcrypto
+LIBS += -lcrypto

-PREFIX = /usr/local
+PREFIX = /usr

--- ./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?


@@ -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"

* 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"

Old 07-24-2005, 07:00 AM   #2
LQ Newbie
Registered: Mar 2003
Posts: 6

Rep: Reputation: 0
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.

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.
Old 07-24-2005, 07:42 AM   #3
LQ Newbie
Registered: Jul 2005
Location: Bangkok
Distribution: Slackware
Posts: 20

Original Poster
Rep: Reputation: 0
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...
Old 07-24-2005, 11:20 AM   #4
LQ Newbie
Registered: Jul 2005
Location: Bangkok
Distribution: Slackware
Posts: 20

Original Poster
Rep: Reputation: 0
and again ... here we go with solutions...

setting my procmailrc to the following:






... >>> ... 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 that case, pls let me know.
Old 07-25-2005, 08:45 AM   #5
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770

Rep: Reputation: 33
courier-imap works native with maildirs and includes both pop3 and imap servers


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to know if I am using mbox-style or maildir-style? Niceman2005 Linux - General 1 09-23-2005 12:08 PM
popa3d maildir??? razor7300 Linux - Software 0 08-31-2004 05:03 AM
maildir and mbox deflin39 Linux - Newbie 1 01-07-2004 10:08 PM
Convert Maildir to Mbox leonardox Linux - Software 2 09-26-2003 11:23 PM
Differences? mbox vs maildir MasterC Linux - General 3 01-31-2003 03:44 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration