[tpop3d-discuss] maildir support broken on 1.3.5 (or is it just me that's broken)?

Chris Lightfoot chris at ex-parrot.com
Wed, 7 Nov 2001 00:46:29 +0000

On Tue, Nov 06, 2001 at 04:37:29PM -0800, Kevin Brokaw wrote:
> Chris Lightfoot wrote:

> > For MySQL, the mailbox type is determined from the
> > database (this is new in 1.3.5 -- previously it used the
> > default, first mailbox type which was BSD unless the
> > source was modified or BSD mailspool support was removed).
> > 
> > Could you tell me the output of tpop3d -h?
> Perhaps I didn't look closely enough at the changes for 1.3.5. 
> Currently I specify the mailbox type in the tpop3d.conf thusly:
> mailbox: maildir:/var/spool/mail/$(domain)/$(user)
> Rereading README.auth_mysql , I see 
> there's a sample SQL query construct:
>    SELECT CONCAT(domain.path, '/', popbox.mbox_name),
>           popbox.password_hash, domain.unix_user, 'mailspool'
>       FROM popbox, domain
>       WHERE popbox.local_part = $(local_part)
>       AND popbox.domain_name = $(domain)
>       AND popbox.domain_name = domain.domain_name
> The statement following this indicates:
>  The trailing field, `mailspool' is the mailbox type
>    to use. Alternative schemes may have mailbox types specified in the
>    database.
> I'm deducing now that this is what you allude to above (ie, the mailspool
> type being taken from MySQL) There isn't any reference as to the format
> of the entry... is it simply "maildir" or "bsd", and is it set in the
> "domain" 

The documentation above is in error -- the name is `bsd'
not mailspool. Thank you for pointing this out. TBH the
use of the terms `mailspool' and `BSD mailspool' is not
consistent in the code and documentation. I should
probably note this properly in the docs somewhere....

> table or the "popbox" table (can't tell from the README, since the SELECT
> example 
> addresses both tables concurrently). If I'm on the right track now, that 
> may be my answer, although it's a bit obscure, seeing as how it represents a
> logic change
> for the (admittedly small) number of users employing maildirs and MySQL.

In 1.3.5., you can specify an SQL statement for auth-mysql
to use. You can select the mailbox type from any table or
specify it as a constant as in the above example. If you
wanted to have different mailbox types for different
users, you'd presumably want the type to be column in the
popbox table.

> I would suggest for future revisions that the default mailspool format should be 
> first what is coded in the tpop3d.conf file (for the sake of backwards
> compatability),
> since in prior versions the config file overrode the internal core logic. Only
> if it's not specifically overridden in the config file should it revert to 
> compiled-in support in the order which it was compiled.

Hmm. I think that now it can be specified in the config
file it's probably OK as it is.

> At least I think I'm on the right track now... thanks much! 

I still don't understand why you're getting the problem
you indicate with Unix logins....

 ``The peak years of our intellectual development are between the
   ages of four and eighteen. At age four, we knew all the questions;
   at eighteen, all the answers.''