bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pop3d virtual domains


From: Jakob 'sparky' Kaivo
Subject: Re: pop3d virtual domains
Date: Thu, 30 Aug 2001 09:20:15 -0700
User-agent: Mutt/1.3.20i

On Wed, Aug 29, 2001 at 10:47:18PM -0400, Alain Magloire wrote:
> > 
> > I just committed support for virtual domains in the pop3d. Take a look
> > at it, it will probably need a bit more testing. It should be fairly
> > easy to apply also to imap4d. Basically, it works this way:
> > 
> > 1) Configure with --enable-virtual-domains
> > 2) For each domain, there is a password file in /etc/domains named for
> >    the domain (eg. domain ndn.net has password file
> >    /etc/domains/ndn.net) which is structered just like /etc/passwd
> > 3) When a user logs in, it first tries other available authentication
> >    methods, and only does virtual as a last resort. If the username
> >    has in it a !, :, or @, the left part is the username and right
> >    part is the domain to use.
> 
> Now why so many choices? the '@' has a nice visual effect: address@hidden
> The ':' is practicle since not login name will ever have ':' in it ...
> at least on Unix machines.

pop3://sparky!ndn.net:address@hidden/

Other servers I've seen supporting "virtual domains" allow the same
options. I think @ is the most aesthetic, but breaks in many mail
clients. A : is also pretty nice, but breaks our extended URL feature,
so we allow ! as a last resort (and little tribute to UUCP ;).

> > 4) Authenticate user vs. /etc/domains/<domain>. If successful, we
> >    append "/INBOX" to the home directory field from
> >    /etc/domains/<domain> and open it (this way, we can add support in
> >    imap4d and will get the same INBOX).
> 
> A few notes, on the pop3d_virtual() code:
> - I would go for some defensive programmin an assume that
>   chdir(/etc/domains) may fail.
> - fgetpwent is not POSIX, so probably on Linux and maybe *BSD only
>   should have a replacement, Probably the one in GLibc will do fine.

Of course it needs work -- "I have only proven it correct, not tried
it." ;) Actually, I have tried it, but only on one machine that is set
up the way I think, and It Works For Me(tm). Please feel free to
correct at your leisure.

> > For those who don't know, I am leaving on Monday for Basic Training in
> > the US Army, so I'll be offline for a few months. Naturally, I feel it
> > necessary to go about messing lots of things up and playing with new
> > code right before I leave, so I'm not around for people to get mad
> > at. ;) Comments are welcome until then, though.
> 
> 8-)
> Thanks for taking the time on your hectic schedule to write this.

Should have been done long ago. C'est la vie.

-- sparky



reply via email to

[Prev in Thread] Current Thread [Next in Thread]