graga
asked on
Indy: POP3Server
I need a complete code example for a simple POP3 server with following requirements:
- server is installed on a server computer serving 50 workstations
- POP3 server validates users (user name and password are in local database)
- the mail messages are generated by the POP3 server (just a simple 'Hi ' + UserName will do)
thank you
- server is installed on a server computer serving 50 workstations
- POP3 server validates users (user name and password are in local database)
- the mail messages are generated by the POP3 server (just a simple 'Hi ' + UserName will do)
thank you
What backend do you want to use? Where/how do you want to store the user credentials and messages?
ASKER
Jacco,
I will be using MySQL but for this purpose anything will do, MS Access probably will be the simplest for the prototype.
I have put together a prototype, but, being a newbie with Indy, I'm not sure how the threads work and how to make it work under multiuser load.
So, my idea of the prototype whould be something along these lines:
- User checks email from their email client with UserName and Password
- this is done by setting POP3 server to 127.0.0.1 in each user's email client
- The POP3 server checks that UserName and Password exist in the user table
- this is done in CheckUser event evaluating LThread - looking up the table returns some sort of key, let's say User_Number (integer)
- The POP server generates an email to that user but in the Body of the message embeded is UserName - this will ensure that the right message goes to the right recipient.
- this is what I don't know how to do. How do I know in STAT, RETR and other command events what the User_Number is? What happens when all 50 users try to check email at the same time?
graga
I will be using MySQL but for this purpose anything will do, MS Access probably will be the simplest for the prototype.
I have put together a prototype, but, being a newbie with Indy, I'm not sure how the threads work and how to make it work under multiuser load.
So, my idea of the prototype whould be something along these lines:
- User checks email from their email client with UserName and Password
- this is done by setting POP3 server to 127.0.0.1 in each user's email client
- The POP3 server checks that UserName and Password exist in the user table
- this is done in CheckUser event evaluating LThread - looking up the table returns some sort of key, let's say User_Number (integer)
- The POP server generates an email to that user but in the Body of the message embeded is UserName - this will ensure that the right message goes to the right recipient.
- this is what I don't know how to do. How do I know in STAT, RETR and other command events what the User_Number is? What happens when all 50 users try to check email at the same time?
graga
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Messages should be with "txt" extension (its coded that way...)
ASKER
Thank you. Now it's all clear.
I have accepted Nicks answer, but Jacko has also put a lot of work in and I will use his code for other purpose. You guys are champions!
I have accepted Nicks answer, but Jacko has also put a lot of work in and I will use his code for other purpose. You guys are champions!
ASKER
I have also posted another Indy question a couple of days ago which is worth 500 points. You may want to have a look.
Thanks
Thanks