|
-
Dec 31st, 2012, 02:54 PM
#1
Thread Starter
Frenzied Member
Planning on writing an emal server software, but need some help how it all works
Ok I understand a VERY BASIC system with SMTP for sending and POP3 for receiving, when the situation is that everyone is using the same service provider (said provider provides the SMTP and POP3 for everyone involved). It would be like this diagram.
http://i.imgur.com/He65h.png
However in real life it is VERY LIKELY that 2 different people are using 2 different email service providers (such as the sender using GMail and the receiver using HotMail). So how does "Provider 1" get the email to "Provider 2"? If I am to write an email server software and be my own provider so that when people send me email they'll be sending it to [email protected] I will want to be able to recieve it from ANYBODY using whatever service they are using (HotMail, GMail, etc). So I'm going to need to know how to get my POP3 server I'm writing to be able to receive email from ANY OTHER PROVIDER. The diagram below shows my situation.
http://i.imgur.com/ZZC2L.png
I'm going to need to know the port number I've marked on my diagram as "Port ?????" and I'm going to need to know the type of software that's shown in my diagram as "Special software on service provider 2's computer that lets service provider 2 get emails from other service providers". Once I can establish these to "unknown" pieces of info, I can successfully finish writing my email server software.
-
Dec 31st, 2012, 04:13 PM
#2
Re: Planning on writing an emal server software, but need some help how it all works
Do you want to write your server using raw SMTP commands and Winsock as the transport layer or are you more likely to use some of Windows APIs?
I think Port ???? should be 25
Port 110 is for email client
Last edited by jmsrickland; Dec 31st, 2012 at 04:26 PM.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Dec 31st, 2012, 11:30 PM
#3
Thread Starter
Frenzied Member
Re: Planning on writing an emal server software, but need some help how it all works
 Originally Posted by jmsrickland
Do you want to write your server using raw SMTP commands and Winsock as the transport layer or are you more likely to use some of Windows APIs?
I think Port ???? should be 25
Port 110 is for email client
No I'm writing an email server and I am using the Winsock control.
Look at the diagrams (especially the second one, as I am trying to be "service provider 2" in that diagram). I have linked images that are my diagrams in my first post. I need to have you help me figure out the pieces of info that I'm missing.
-
Jan 1st, 2013, 02:34 AM
#4
Re: Planning on writing an emal server software, but need some help how it all works
The explanation of how it all works is something that has been written many times. You should do some research via search engines because nobody can give you a comprehensive answer in a few forum posts.
In the beginning there were no email servers or clients. People had no PCs, only mainframe and minicomputers where an individual had access through batch terminals based on punched cards or paper tape and printers and in rarer cases through CRT terminals and teleprinters. But even then there were email systems of a sort. As terminals became more common these became more sophisticated, handling longer more letter-like messages.
Soon more of these computers were connected by point to point network links based on proprietary protocols. People started to allow email systems to forward email to each other. As the early Internet began, and even before TCP/IP existed as we know it now, an early version of SMTP was developed. This was a computer to computer mail forwarding protocol and was often used along with the older protocols to move mail from system to system.
Only much later as the Internet developed and PCs and Workstations became available to those with a lot of money did we begin to see something like email as the average person knows it now. The Internet was still not public, but those in the inner circle with access to it and even those with access to networked desktop computers began using early "client/server" email. In some cases there still wasn't any TCP/IP used and no SMTP or other protocols we associate with email today used either.
Gradually TCP/IP became more common and early POP and SMTP protocols began being the standards for client to server email transmission. SMTP still was (and is) only for sending an email or bundle of emails from machine to machine. DNS was enhanced with support for MX (mail exchange) records to assist in the development of relay server networks using SMTP to move email around. IMAP came along as a POP alternative, and a few other mail retrieval protocols were developed but most never gained momentum.
PCs finally became cheaper and more common and soon the Internet went public. This is where the average Joe started to come along, and by then everything was pretty much set in concrete. Little has evolved further except for somewhat better security for the SMTP network and more advanced algorithms for routing and relaying mail across the SMTP backbone network.
Email is so high in volume now that many large organizations have to mimic the SMTP/DNS backbone network in house with sub-backbone networks to help keep the traffic away from other business.
Today any small-scale SMTP server or large-scale in house email backbone network get access to the global backbone via SMTP relay service providers. Some ISPs offer this kind of service to commercial customers but seldom to residential customers. You'd need to contract with a service provider specializing in email gateway services.
Look at things like:
http://en.wikipedia.org/wiki/Mail_submission_agent
http://dev.mutt.org/trac/wiki/MailConcept
http://www.ida.liu.se/~TDDI09/lectures/TDDI09-F4.pdf
... to get an idea of how things fit together.
-
Jan 1st, 2013, 02:40 AM
#5
Re: Planning on writing an emal server software, but need some help how it all works
A shorter answer assuming you have the background is that the servers use SMTP over port 25 along with DNS to route and forward mail, except when they use an alternative port or even another entirely different protocol to forward email bundles.
-
Jan 1st, 2013, 07:51 PM
#6
Thread Starter
Frenzied Member
Re: Planning on writing an emal server software, but need some help how it all works
I want to skip GMail etc and be my OWN EMAIL PROVIDER with my OWN SERVER. But I still want to be able to send messages NOT JUST WITHIN MY LAN! I want to be able to send them to others, who are using main services like GMail.I need to know how to forward my SMTP server to GMail's (or MSN's or others) so that other people using their subscribed service can recieve email from me RUNNING MY OWN SERVICE. But Comcast (my ISP) is currently BLOCKING PORT 25 to stop spammers from running their own SMTP servers! I'm not a spammer. But Comcast's blocking of port 25 is keeping me from putting my SMTP server online. HOW DO I GET AROUND THIS?! Is there some sort of "hack" that I can use to BYPASS Comcast's "port 25 firewall"?
-
Jan 2nd, 2013, 03:38 AM
#7
Re: Planning on writing an emal server software, but need some help how it all works
It isn't even just Comcast, but a growing number of ISPs and "entry gateways" to the SMTP Backbone network.
It isn't even just about spam. A lot of newbs (or just plain screw-ups) tried to forward email by sending it directly to the recipient servers. This is costly and inefficient, email servers are expecting to get most mail as bundles that have already been properly routed through the backbone, not individual "single email message" connections from MSAs.
Lots of email gateway hosts only accept connections from a whitelist of trusted servers. Others require advanced authentication techniques. Some require both.
There are only two ways around port 25 blocks:
- Get a commercial account from an ISP, even Comcast. Note that the terms are fairly strict about observing the SMTP "rules of the road" though even then. Accounts get suspended all the time for improperly handling SMTP traffic.
- Get an account with an alternate email relay service. These tend to use a different SMTP port. They also have strict rules about spamming, but at least they prevent you from trying to make SMTP connections directly to recipient MDAs.
Again, you are not supposed to try to connect to a recipient's MDA (the "post office" server found in a mail domain's DNS MX records). You need to use a legitimate gateway (relay) service.
-
Jan 2nd, 2013, 12:33 PM
#8
Re: Planning on writing an emal server software, but need some help how it all works
Is using port 25 on your own PC not same as using port 25 like OP wants?
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jan 2nd, 2013, 01:47 PM
#9
Re: Planning on writing an emal server software, but need some help how it all works
You only use SMTP over port 25 to get to a mail server or relay provided by your ISP. You really aren't ever supposed to try to reach deeper into the mail network using SMTP anyway.
However some 3rd party email providers expect you to do this to get to their own network. In that case you often have to use an alternate port since ISPs will either block port 25 to any other servers or else redirect any port 25 access to their own mail server.
Of course you may have a shakey ISP that doesn't do this. They aren't required to but the cooperative that manages the global email backbone does whatever it can to encourage them to do so.
And nobody really cares what you do within your own network.
-
Jan 2nd, 2013, 02:21 PM
#10
Re: Planning on writing an emal server software, but need some help how it all works
OK, so when we speak of blocking port 25 it means blocking it from the outside trying to connect to it on your PC but doesn't mean blocking it from you connecting to it to a valid email server, is this correct.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jan 2nd, 2013, 03:06 PM
#11
Re: Planning on writing an emal server software, but need some help how it all works
depends on how the block is setup... they could simply be blocking anyone from connecting to port 25 on their own servers... OR... they could block all internet traffic on port 25 that comes through their network - this would prevent you from connecting to ANY server on port 25.
-tg
-
Jan 2nd, 2013, 03:10 PM
#12
Re: Planning on writing an emal server software, but need some help how it all works
Both Verizon and Sudden Link here block port 25 completely. I had to change all my email clients to use a different port because of it. Verizon did say that I could get a different account where the port would be available but it would cost more money. They said it was to cut down on spam ironically I think I get more spam than before
-
Jan 2nd, 2013, 03:16 PM
#13
Re: Planning on writing an emal server software, but need some help how it all works
A little confused. ... they could block all internet traffic on port 25 that comes through their network - this would prevent you from connecting to ANY server on port 25.
If so then how would one get his email. I believe that my Outlook Express connects to port 25 at Verizon.Net But then DM says that Version blocks port 25 completely. Why his Verizon and not mine or am i misunderstanding this.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jan 2nd, 2013, 04:05 PM
#14
Thread Starter
Frenzied Member
Re: Planning on writing an emal server software, but need some help how it all works
I'm interested in sending mail to the destination via an SMTP server hosted on my own computer. Why route it to ANOTHER SMTP server, when I'm running one on my own computer.
Also though any mail sent TO me will ARRIVE at my server via an SMTP relay. which means if I want to recieve email without a 3rd party service like Hotmail or Gmail, I'm gonna need to be my own email service provider. This will not limit usernames to ones that are currently available (as a lot of cool user names have already been taken on 3rd party servers). For example, my email address is [email protected] but I hand WANTED it to be [email protected]. The benefit of running my OWN personal mail server/service and having it internet connected would be that I could actually have WHATEVER ACCOUNT NAME I WANTED without worrying the account name was already in use. For example I could be [email protected] or [email protected] (if I didn't want to pay a DNS server to host MX records, but just have people use my IP address directly, instead of a domain name).
Also if I have my own server I can have UNLIMITED EMAIL ADDRESSES, but I don't want it for spamming. Gmail and other services usually limit the number of email addresses registered at a single IP address within a given amount of time. Now you see, there's a couple other websites I'm member at, but they have me banned for saying stuff the admin didn't like. Since registration at most sites associates your email address with your user account at the site in question, unlimited number of email addresses at my disposal means unlimited number of accounts I can have on a website, which in turn means an unlimited number of times I can perform the action known as "ban dodging". And this can work indefinitely (or until the admin performs an IP addreess ban). So yeah, there is a BIG BENEFIT to literally OWNING AN EMAIL SERVER.
But this port 25 blocking that Comcast is doing is REALLY going to put a damper on this idea I got.
-
Jan 2nd, 2013, 04:43 PM
#15
Re: Planning on writing an emal server software, but need some help how it all works
 Originally Posted by Ben321
.... which in turn means an unlimited number of times I can perform the action known as "ban dodging".
That kind of activity is against our rules (see the Acceptable Use Policy link at the bottom of all VBForums pages), particularly this one:
- You will not use these Posting Features for the purposes of sharing or distributing viruses, licenses, registration information, software keys, "cracks," or other information designed to do harm to or allow unlawful access to any computer hardware, software, networks, or any other systems.
I am therefore closing this thread - do not post any further questions that are related to this thread.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|