News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

EMAIL

Started by Robert Collins, August 11, 2005, 03:59:57 PM

Previous topic - Next topic

Robert Collins

Well, as usual, my mind is gone again and I can't for the likes of me get it straight in my head.

What is the difference between the following?

SMTP Server
SMTP Client

POP3 Server
POP3 Client

I want to make my own Email Server, the application that waits for a connection until it receives some mail. in otherwords the opposite of Outlook. I can't remember which one of the above it is. :red

Tedd

(E)SMTP is for sending mail.
POP3 and IMAP4 are for receiving.
:bg

ie. outlook sends out emails using esmtp to give the mails to the server (for it to pass them through the network), and receives them from the (usually same) server with pop3 or imap4.

So your server will probably have to implement both sending and receiving?
imap has much better features and is mostly what's used now, but obviously it's quite a bit more work to program than pop3 :wink
No snowflake in an avalanche feels responsible.

Robert Collins

So, do I conclude from your reply that the server I want to make will be a pop3 server and it sits and listens on port 25? When it gets incoming mail it stores it up in a save area until a pop3 client (such as Outlook) request any mail to be sent to it.

P1

SMTP & POP3 are protocols.  POP3 is a client to Server protocol.  SMTP is server to server protocol.  Thought some clients act like an server and SMTP mail directly to the destination server.

Client usually resides on the local computer of the user.

Server is the gateway MTA ( Message Transfer Agent ) between the client and the destination server / client pair.

Regards,  P1  :8)

P1

Quote from: Robert Collins on August 11, 2005, 04:58:51 PM
So, do I conclude from your reply that the server I want to make will be a pop3 server and it sits and listens on port 25? When it gets incoming mail it stores it up in a save area until a pop3 client (such as Outlook) request any mail to be sent to it.
POP3 gets the e-mail from the client to the Server ( Works in reverse as well. ), then the Server, SMTPs the e-mail to the destination Server, which then POP3 relays the Message to the local client / user.

Port 25 is part of the SMTP protocol for server to server transfer of e-mail.

So you need both protocols on the Server to act as a complete MTA.

( Implied that Software runs on a hardware platform.)
Software        protocol    Software        protocol             Software        protocol         Software     
Local Client <> POP3 <> Local Server <> SMTP <> Destination Server <> POP3 <> Destination Client

Regards,  P1  :8)

Robert Collins

I appreciate your replys but still I seem to be missing the que. I think your replys are more involved than what I am asking for now. I'm not concerned about the theory (not mentally ready for it) because I am not going to get heavy into this at this time. I just want to do a quickie for now and will worry about details later. So, let me ask my question this way:

When someone sends me an email I use Outlook (and I know Outook is a client) to get that message from my email server. Question....What is the type of server where the email is waiting for me to request it?

Is it a pop3 server on port 25
Is it a pop3 server on port 110
Is it a smtp server on port 25
Is it a smtp server on port 110

I only want to know what type of server it is and the port it is listenening on.

Please excuse my ignorance over this but I seem to be in a turmoil. 

P1

Outlook ( Local Client ) talks to ( Sends Mail ) & listens ( Receives Mail ) on the POP3 protocol ( Port 110 ) to the Local Server.
Local Server talks to ( Sends Mail ) & listens ( Receives Mail ) on the SMTP protocol ( Port 25 ) to the Destination Server.

Outlook does not use SMTP protocol ( Port 25 ) to talk to ( Sends Mail ) or listens ( Receives Mail ) to either Local Server or Destination Server.

Quote
Is it a pop3 server on port 25 - No
Is it a pop3 server on port 110 - Yes
Is it a smtp server on port 25 - Yes
Is it a smtp server on port 110 - No

Does the server software use both POP3 and SMTP protocols to act as a MTA?  Yes!  POP3 to communicate to the clients.  SMTP to communicate to the other servers.

POP3 = Local postal carrier from downtown to the house.  Postal carrier ONLY works with their local post office.
SMTP = Mail trucks going from post office to post office.  Truck drivers never go to your house.


Regards,  P1  :8)

Mark Jones

Aaaaha! But what if a truck has to go say, from New York to Sydney?  :green
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Robert Collins

Thanks. I'm a little confused about the following:

Quote
Outlook ( Local Client ) talks to ( Sends Mail ) & listens ( Receives Mail ) on the POP3 protocol ( Port 110 ) to the Local Server.
Local Server talks to ( Sends Mail ) & listens ( Receives Mail ) on the SMTP protocol ( Port 25 ) to the Destination Server.

What is this Local Server and port 110 you mention above?

My understanding of the term listen is when a socket is in the listening mode (just waiting for a connection). But Outlook doesn't sit around and wait in a listen mode to receive mail; it only receives mail (assuming I do not have it auto check for mail) if I request it to do so. This means Outlook initiates the connection(not listening) to a mail server(listening) to see if there is any mail.

If I send mail to someone Outlook sends that mail to my IPS' mail server (SMTP Server listening on port 25).  I know this because I just set up a quickie program listening on port 25 and it got the connection from Outlook. All I had to do was go into Outlook and change the address of the outgoing mail (SMTP) to point to my home made application. This tells me that I can point to any address and so long as there is a program at that address listening on port 25 it will get the mail for Outlook.

If I make a program and have it listen on port 110 that program will receive the email on port 110 from the server if I request the server to send it to me. Now isn't that server the same server that I just sent email to (only on a different port)?

So, where does this Local Server enter into this senario? Is it hidden and I don't see it?

Robert Collins

Outlook: Send email to someone@somewhere.com--->Outlook connects to smtp.email.msn.com on port 25
and sends the email using SMTP protocol. Now, once my email smtp server gets the email from me it then
fowards it on to the destination (someone@somewhere.com).

From the above, does my smtp server connect to another smtp server and how does it know what the name
of that server is? Does it look for the name server(s) that host that domain? Is it like the browser
connecting to www.somewebsite.com and somewhere along the line that name must be resolved to an
address? For example, if you send me mail at robert@futureedge.com where does that email address
get translated into "plus1.host4u.net" because that is where it winds up at? Then I have to use
Outlook and connect to the pop3 server at that location to get the mail.

Here's my situation. I just bought a domain name and got it registered. I am hosting that domain
myself on my home PC. OK so far. When I use IE on another PC and type in www.my_new_domain.com
I get connected to my HTTP server running on my other PC. This I understand.

But now, I want to also have a Mail server so that when you send mail to bob@my_new_domain.com I
want the mail to wind up at my home mail server. So far, that doesn't work. Am I getting into something
that is beyond hope?   

P1

Quote from: Robert Collins on August 11, 2005, 09:31:50 PM
What is this Local Server and port 110 you mention above? 
There are a number of pieces of software that does this.  Exchange, Lotus Notes, etc.

Quote from: Robert Collins on August 11, 2005, 09:31:50 PM
My understanding of the term listen is when a socket is in the listening mode (just waiting for a connection). But Outlook doesn't sit around and wait in a listen mode to receive mail; it only receives mail (assuming I do not have it auto check for mail) if I request it to do so. This means Outlook initiates the connection(not listening) to a mail server(listening) to see if there is any mail.
Your correct!  Listen was a general term in this case.  As far as Port Listening, the server does that.   Outlook technically polls for new mail at the server with the POP3 protocol.

Quote from: Robert Collins on August 11, 2005, 09:31:50 PM
If I send mail to someone Outlook sends that mail to my IPS' mail server (SMTP Server listening on port 25) Not True, POP3 on Port 110, in this case. I know this because I just set up a quickie program listening on port 25 and it got the connection from Outlook. Was it Outlook or your ISP's e-mail server?  You have a full time internet connection.  Check question: What IP address open the connection?  All I had to do was go into Outlook and change the address of the outgoing mail (SMTP) to point to my home made application. This tells me that I can point to any address and so long as there is a program at that address listening on port 25 it will get the mail for Outlook.
Outlook normally uses MAPI(Exchange), POP3, IMAP, HTTP, or other role based protocol, but not SMTP.  It was your ISP's E-Mail server that relay the e-mail back to you/to the other SMTP server, not Outlook.  When Outlook has an open POP3 connection, it looks like real time.  Unplug your computer from the internet and retry your test.  And you will find that Outlook is not the one hooking up.

Quote from: Robert Collins on August 11, 2005, 09:31:50 PM
If I make a program and have it listen on port 110 that program will receive the email on port 110 from the server [ should be client, not server ] if I request the server to send it to me.
Mixed Question.  If your program listens, it's the server.  See above, where I agreed with you.  "I request" is a client initiated action.

Quote from: Robert Collins on August 11, 2005, 09:31:50 PM
Now isn't that server the same server that I just sent email to (only on a different port)?
Yes, but it's not a different port.  Client/Server comunications are over POP3 ( Port 110 ).

Quote from: Robert Collins on August 11, 2005, 09:31:50 PM
So, where does this Local Server enter into this senario? Is it hidden and I don't see it?
In this case, Local means your Local ISP's E-Mail server that queues mail for you, while you are off-line.

Study the RFCs for POP3 and SMTP to understanding the roles and purposes of the e-mail traffic flow we are discussing.

Regards,  P1  :8)

P1

Quote from: Mark Jones on August 11, 2005, 09:18:14 PM
Aaaaha! But what if a truck has to go say, from New York to Sydney?  :green
But the airplane does not land at your house either.   :naughty: 

from New York to Sydney, use planes = Internet routers over fiber optics.

Regards,  P1  :8)

P1

Quote from: Robert Collins on August 11, 2005, 10:26:33 PM
Outlook: Send email to someone@somewhere.com--->Outlook connects to smtp.email.msn.com on port 25
and sends the email using SMTP protocol. Now, once my email smtp server gets the email from me it then
fowards it on to the destination (someone@somewhere.com).

From the above, does my smtp server connect to another smtp server and how does it know what the name
of that server is? Does it look for the name server(s) that host that domain? Is it like the browser
connecting to www.somewebsite.com and somewhere along the line that name must be resolved to an
address? For example, if you send me mail at robert@futureedge.com where does that email address
get translated into "plus1.host4u.net" because that is where it winds up at? Then I have to use
Outlook and connect to the pop3 server at that location to get the mail.

Here's my situation. I just bought a domain name and got it registered. I am hosting that domain
myself on my home PC. OK so far. When I use IE on another PC and type in www.my_new_domain.com
I get connected to my HTTP server running on my other PC. This I understand.

But now, I want to also have a Mail server so that when you send mail to bob@my_new_domain.com I
want the mail to wind up at my home mail server. So far, that doesn't work. Am I getting into something
that is beyond hope?   

I'm out of time for this one.  Will come back answer later, unless someone else chooses to help with this one.

Regards,  P1  :8)

tenkey

Quote from: Robert Collins on August 11, 2005, 09:31:50 PM
If I send mail to someone Outlook sends that mail to my IPS' mail server (SMTP Server listening on port 25).  I know this because I just set up a quickie program listening on port 25 and it got the connection from Outlook. All I had to do was go into Outlook and change the address of the outgoing mail (SMTP) to point to my home made application. This tells me that I can point to any address and so long as there is a program at that address listening on port 25 it will get the mail for Outlook.
Quote from: P1Thought some clients act like an server and SMTP mail directly to the destination server.

That was my impression of how SMTP is used. Why do I need to specify SMTP server names with every e-mail program I use? Because, apparently, my ISPs want me to talk to their SMTP server.

Regardless of the way e-mail is sent...

The (first) e-mail server that will store away your e-mail needs to be an SMTP server. You also need to set up some special DNS records to let other servers know what e-mail servers are available in your domain. Once the e-mail is stored, e-mail "readers" can access the e-mail with any available protocol, POP3 or otherwise.
A programming language is low level when its programs require attention to the irrelevant.
Alan Perlis, Epigram #8

Tedd

No snowflake in an avalanche feels responsible.