bug-mailutils
[Top][All Lists]
Advanced

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

Re: pop3d virtual domains


From: Alain Magloire
Subject: Re: pop3d virtual domains
Date: Wed, 29 Aug 2001 22:47:18 -0400 (EDT)

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

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

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

--
alain




reply via email to

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