Mark Mackay - Orcon writes:
Hi [EMAIL PROTECTED] -
Thanks for your comments, but I don't know if I explained myself right,
although I'd love alternate ideas for dealing with our complicated needs: To start off with we have a database full of users, including say "mark".
  Mark connects through to pop3.ispa.co.nz and is used to supplying "mark"
as their username.
If we wholesale to another isp or buy an ISP with "mark" in their system, we
want to be able to allow them to connect seamlessly. [At the moment we
import them into our central database as say "mark.ispb" but in the near
future a rewrite will allow them to be imported as simply "mark" with a
different account id].

Well I dont think i understood you properly,i thought you're in control of radius, also I assumed (a very bad thing though) that you're providing the internet. this way you know everything about user mark.
mark is connects through ISPA -> radius update pbsp (add his IP &
his user = mark.ispa)
he connects to dbmail pop3/imap ->
since you know his IP you can simply look for mark.isp coming from that ip,
and then get his idnr.
the whole effort is to change a few sql queries and some code..
and if that's true, that you control the whole isp and your mail clients are
your internet clients, you can even get rid of the . suffix and have 10000 marks usernames.. but if that's not applicable discard it

When it was just 'mark' (no second ISP), we simply had:
  "mark" <-> dbmail daemons [pop3/imap] [logs into db as "mark"] <->
dbmail-database When we add the second ISP we currently proxy-rewrite things: "mark" (from ISPA] <-> dbmail daemons [pop3/imap] (listening on 10.0.0.1) <-> dbmail-database [logs into db as "mark"] "mark" (from ISPB] <-> simple pop3/imap proxy (listening on 10.0.0.2)
 [rewrites pop stream to say "USER mark.ispb" when user enters "USER
mark"]
<-> dbmail-database [logs into db as "mark.ispb"]
Thus we point pop3.ispa.co.nz to 10.0.0.1 and pop3.isbp.co.nz to 10.0.0.2.
This means "mark" from ISPB doesn't notice anything, and can keep using
"mark" as their username.

well that's is the same, except that in my example i dont introduce 3d party
proxy. dont forget that dbmail knows the clients IP, therefor you can fetch
his original idnr off pbps. (that's the extended pbsp, not the way you see it) or if you want dont add anything to pbsp, just use the clientid (if you're not using it) and add the pbsp idnr of your client's IP i.e.
client Joe Shmoe
username; joe
idnr; 1
clientid = pbsp_idnr = 100
[...]
client Foo
username; joe
idnr; 2
clientid = pbsp_idnr = 101
pbsp
idnr; 100 ; 101
since; timestamp; timestampt
ipnumber; 1.1.1.1; 1.1.1.2
status; static
[...]

get his address from pbsp,
select idnr from pbsp where ipnumber=%ip and status='static';
select username, password from users where user=%user and clientid=pbsp_idnr;

somewhere here in the middle the whole thing will work, i'd not have time to rethink the whole implementation, but trust me it's easy.
I don't quite understand the radius/pbsp idea you had below. An in any case
if a user is roaming (currently in the US and wants to check their mail), it
wouldn't work I'm guessing.

no i guess, will yours? or you track your users with gps?;-) j/k
at my work (AFAIK) we do something simple.
pop3 server/smtp.
anyone can connect to the SMTP
for someone to connect to get your email 2 choices:
1 - https webmail
2 - vpn -> pop3

-------------
It would be great to be able to let Dbmail handle the above -- a very simply
idea would be to have two user tables. One for ISPA and one for ISPB I
guess, and then simply configure the daemons bound to 10.0.0.2 to select
from users_ISPB.
In the end it all just ends up with a user_idnr, so I guess I am looking at
ways that could be made more simple -- whilst allowing other people to do
'fancy' things as well. For example, there was discussion ages ago about how
to deal with suspended accounts, etc. -------------
I didn't understand your suggestion so if you're willing to explain it to me
on or off list that would be appreciated, and I'd love to hear from anyone
else out there doing similar things as to what ideas they use in their
system.

There's no much point bloating the list, we can have an offlist discussion and then you/I can post the discussion.
Also -- what are people doing when they have their own, independent user
database for radius/billing?  Are people just running one big database
server and using the dbmail 'users' table with other columns, are they
copying data to and from, updating both databases from the web-apps?
About 6-12 months ago the 'user' table was separated into a different
db-connection, which meant it could be on a different server, and thus be
plugged in with a few hacks of the SQL strings to existing databases. This
was discarded at one point (don't think it was ever posted to the list why).
Maybe this is a good idea for a 2.x release feature now that bigger
installations are starting to use dbmail. /Mark
mark, i think you're over complicating the thing with this
pop3/imap proxy.. hack pbsp(extend it), make your radius write there the clients IP when they log, and their user?ip, then do your select ..
you have so much data for a user.
idnr
name
clientid
and then pbsp
ipnumber
+name
timestamp.. you're already using xxx.isp, at the end of the day success is if you dont have to make your clients change their usernames, just for that.. one optional field more wont be bad.. but why? you dont need proxy to achive that, this is trivial.

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to