> On Thu, May 30, 2002 at 10:35:39AM +0100, James Wilson wrote:
> > Hi ppl,
> > 
> > I have a setup running qmail to deliver mail into the users home
> > directory, and am using dot-qmail files to dump it in a selection
> > of different files ($HOME/Mail/inbox-a, $HOM/Mail/inbox-b etc...)
> > 
> > I don't want to start creating multiple users in /etc/passwd in
> > order to allow multiple pop boxes per user, I'd quite like the
> > ability to setup usernames and passwords that qpopper would use
> > in order to access the mail, assuming it can't be validated from
> > the /etc/passwd file.
> 
> This sounds to me kind of like reinventing IMAP.  Might installing IMAP
> not be easier than trying to add all these features into POP, and then
> trying to get the mail clients to support multiple inboxes?

I already have IMAP installed, and it uses /etc/passwd to do it's checks,
and uses mailbox storage, allowing an actual user to have a mail account
with multiple folders etc... and I want POP to allow them to read their
mail in a similar way.

Beyond that, I want the ability to have a secondary validation on POP
boxes, so that a real user can create a number of pop boxes, which can
be created with a username/password of their own, but happen to fetch
their content from data actually held in the real users home directory.

This is where the issue comes in, to enable a real user with a shell to
setup a range of pop boxes in his account, ie literally specify that
usera should have passworda and should get his mail from a file such as
/home/realuser/Mail/inboxa

> Of course, I don't know the ultimate goal, but that's my first thought.

Ultimate goal is simply that I have a selection of users who have a range
of complex mail delivery instructions. These are handled by a bunch of
.qmail files, looking at the username and domain parts in order to work
out where to forward or deliver to. In the case of deliver, incoming mail
goes into one of 2/3/4 inbox files, and I simply want to be able to add
2/3/4 POP users with names/pwds so that the appropriate inboxes can be
accessed via POP3 clients such as Outlook Express.

The messy thing is of course to add these users via /etc/passwd, as the
files are all inside another users homedir, and are owned by that user
etc... And I'd like the main user (ie real user) to be able to reset
passwords for their virtual users.

My C is very sketchy, it's been years since I've dabbled in anything
except Perl. I guess it shouldn't be too hard to alter the part of
qpopper which does the user/pass checking, to allow checking of a
second auth db (either MySQL or flat file, I'm not fussy), and to set
the --enable-home-dir-file variable on the fly, especially given this
is a compile time option - so it's obviously alterable somewhere...

Any help would be very much appreciated, I don't want to have to return
to qmail-pop3d, as although it provides this facility, it only supports
Maildir format, and great as it may be, we don't pull enough volume to
warrant it, and I'd have a bunch of users screaming at me, as they would
no longer be able to use pico/emacs/elm/mutt to read their email if I
changed it to Maildir format... (although I think mutt supports Maildir?)

Somebody... please help. I'm sure it's only 15 mins work on the C code,
if you're familiar (a) with C, (b) with the qpopper source. Or perhaps
just point out to me what files I'd need to fiddle with, and roughly
what routines are the ones I'd need to alter. I could probably figure
most of the rest out for myself, it's just I have no prior experience
atall with the qpopper source, and with my C being very rusty, it's a
bit hard to follow some of it...

What I really need to know is: the routine which checks the user/pass
combination, and where it returns a result; the bit which sets up the
file to access, ie home dir + compile time switch, as I'd need to make
this login dependent; finally the bit which switches EUID in order to
become the mail owner, as I'd need to use my virtuser/pwd/realuser/inbox
lookup table to find this also. Only 3 routines ?!

Please help 8)

James.

<sigh> If it weren't for the users... I would have no problems in life !

>   -- Clifton
> 
> -- 
>     Clifton Royston  --  LavaNet Systems Architect --  [EMAIL PROTECTED]
> "What do we need to make our world come alive?  
>    What does it take to make us sing?
>  While we're waiting for the next one to arrive..." - Sisters of Mercy
> 

Reply via email to