Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POP3 Internals Question 1

Status
Not open for further replies.

DCCoolBreeze

Programmer
Jul 25, 2001
208
US
I do not know really to post this to find the answer but usually Linux people understand more the internals of systems so here it goes.

What exactly does POP do internally? In other words, what happens when my pop server recieves a file? Does the server listen to port 110 until data arrives? and then what does it do with it? Does it copy it to a directory?

What does it take to create an account? just setup a directory and maybe add a record to some POP configuration file with the username and password?

How do other mail servers know where the POP server is?

If you had to write a POP client/Server app, what types of things would it have to do?

Any help or leads to white papers or links would be greatly appreciated...
 
Your POP3 server doesn't receive files. Your SMTP server receives files. A POP3 server authenticates users and provides access to messages in their mailboxes.

Here's the general order of things (this is a 10000-foot view. A lot of things are going on in each step):

You fire up your user agent and tell it you want to compose an email. You give the UA the address, subject, body, etc of the message and hit send.

Your UA then hands the message off to it's configured SMTP server via IP port 25 for outbound delivery.

That outbound SMTP server then looks at the domain name in the address of the message recipient and performs an "MX" DNS request to get the Mail eXchanger for the destination domain.

The MX record of a domain is the name of the SMTP server which will recieve mail for that domain. The outbound SMTP server then resolves the IP address of the MX server.

The outbound SMTP server then makes an IP port 25 connection to the MX server for the destination domain and hands off the message.

The destination SMTP server then checks its user database to see into which mailbox to deliver the message. Then it places the message in that mailbox.

If any any time, any step of this process fails, the message will be bounced back to you.

Your recipient then fires up his User Agent, and instructs it to check his email. The UA makes a connection to its configured POP3 server via IP port 110.

The UA sends the username and password of the user, which the POP3 server checks against its user base.

When the presented credentials are verified, the POP3 server allows the UA access to the user's mailbox. The US then downloads the messages, deletes the messages from the mailbox, and presents the messages to the user.


The rest of your questions really cannot be answered as asked. There are too many possible answers.

Read the RFC marsd posted, as well as RFC 2821 ( ______________________________________________________________________
TANSTAAFL!
 
Outstanding explaination! The "user database" is that different for different smtp servers? For example sendmail versus exchange or is there a standard.
 
Nevermind. Looks like I will get the information from your link..
 
The internal source of user data is implementation-specific.

Since sendmail is platform agnostic, you have a lot of options on where userdata is stored. I've seen sendmail user information stored in the standard Linux user database, a MySQL database, a PostgreSQL database, and in a flat file.

Exchange only runs on Win32. It maintains its own user database in a proprietary format. You can associate records in that database to defined users on your Microsoft network. ______________________________________________________________________
TANSTAAFL!
 
This is also what I have learned. Thanks so much for the information!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top