Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76096 - net-mail/vpopmail is not fully compatible with bincimap's IMAPdir
Summary: net-mail/vpopmail is not fully compatible with bincimap's IMAPdir
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Qmail Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-29 17:11 UTC by Silviu Julean
Modified: 2010-05-30 06:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Silviu Julean 2004-12-29 17:11:54 UTC
Using vpopmail with bincimap and IMAPdir is a little bit tricky for me.
(During this report I'll use .maildir and .imapdir as standard Maildir and IMAPdir directory names.)
The problem is that, because of the fact that binc requires .imapdir/INBOX to exist - and to a symlink to ../.maildir for compatibility, it is quite annoying to perform this manually for every new domain and user. Possible automations are:
a) the script from http://www.differentpla.net/node/view/171 - but that would require using config file protection for ~vpopmail/bin just for vadddomain and vadduser
b) the patch from http://www.box-one.org/new-2158299-4555.html - but it's not at all portable (it needs to read some config file and create IMAPdir if and where it is configured to do so)

I'm currently using a couple of wrapper scripts named /usr/local/bin/vadd*.sh (* are user and domain), the real two programs are ~vpopmail/bin/vadd*.real, and ~vpopmail/bin/vadd* are symlinks to /usr/local/bin/vadd*.sh - this allows me to avoid CFP in ~vpopmail/bin and still not lose the scripts when updating.
This approach does NOT work with qmailadmin, which uses the vpopmail libraries directly (it doesn't call vadd* at all).
I don't want to use the patch because I want Portage to manage vpopmail (maybe I trust Portage too much, or maybe I'm lazy to update it at all if if wouldn't be under Portage).

Of course, a permanent fix in vpopmail would be great - but I don't expect that because they (Inter7) have their own IMAP server... why would they support binc? :(

Reproducible: Always
Steps to Reproduce:
1. emerge qmail, vpopmail, bincimap, qmailadmin; set up qmail, qmail-pop3d, bincimap, vpopmail (in this order). useful guides: life with qmail, life with binc imap, the gentoo wiki
2. configure bincimap to use IMAPdirs and use something like ~/.imapdir (that's my case)
[3. OPTIONAL: configure bincimap to auto-create the INBOX]
4. use qmailadmin OR vadddomain to add the new vpopmail domain, let's say "new.domain"
5. access postmaster@new.domain by imap (perhaps copy something to the inbox)
6. send a mail to postmaster@new.domain (by qmail-inject, for example)
7. now read your mail through POP3 and IMAP
Actual Results:  
If bincimap was set to autocreate the INBOX, then two maildirs are created for
the user; one by vpopmail (.maildir) and one by binc (.imapdir/INBOX), and a
user could only check his (received to .maildir) mail by POP3.
Otherwise, bincimap doesn't work at all.

Expected Results:  
vadddomain should have created .imapdir, and inside it a symlink named INBOX and
pointing to ../.maildir - this would have allowed bincimap to access INBOX
correctly. The same behavior should apply to vadduser.

I believe this has nothing to do with anything specific to my system, so I won't
be pasting `emerge info`. If that is really required, please state so.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-04 20:04:52 UTC
isn't it possible to have bincimap treat the INBOX at the root maildir ~/.maildir/ directory instead of ~/.maildir/INBOX ?

This would be an effective workaround for the problem if BINCimap allows that configuration.
Comment 2 Silviu Julean 2005-01-06 12:51:08 UTC
That is the case when using Maildir++, the Maildir extension originally used by bincimap.
However, I'm using the new format, IMAPdir, thus ~/.imapdir must exist, and must contain ~/.imapdir/INBOX as a symlink pointing to ../~.maildir. The problem is that ~/.imapdir is not automatically created.
This is NOT a bincimap problem. bincimap can't and shouldn't be able to automatically create folders and symlinks inside the user's home directory. Of course, it DOES have an option to auto-create the INBOX, but that only happens if .imapdir exists (I think), and that doesn't create a symlink to ../.maildir (it shouldn't).
Instead, vpopmail - with an almost trivial patch - could handle this situation by creating the folder and symlink, ALONG WITH .maildir - not instead of it, whenever a new account is created.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-06 14:38:32 UTC
I was against your original description sounded like you wanted to really pollute the ~/.maildir/ area, which I was against.

Looking at the patch from b) it should be possible to update that for Gentoo, and then conditionally apply it based on a USE flag for imapdir, and that route should be portable.
Comment 4 Jonas Jonsson 2005-11-20 04:56:01 UTC
I had the same problem on my server, running Vpopmail+BincIMAP.... I solved it
by changing the /service/bincimaps/run script to run a script that checks if the
.imapdir exists, if not create. And if the INBOX symlink exists, if not create it.
Here is the changes:
bincimaps/run (The last 3 lines)
    /var/vpopmail/bin/vchkpw                            \
    /usr/bin/linkwrapper                                \ <- THIS LINE
    /usr/bin/bincimapd

/usr/bin/linkwrapper

#!/bin/sh
test -e .imapdir        || mkdir .imapdir
test -e .imapdir/INBOX  || ln -s ../.maildir .imapdir/INBOX
exec $@

I found this hack after googling the web, don't remeber where I found it but
here it is.

Hopes for a solution so I don't need this hack anymore.
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2009-12-29 11:20:26 UTC
I am interested if this issue is still existant in current versions of vpopmail