Theory
एक Email, End to End
Pieces को साथ रखने का time है। जब Riya, Arjun को email करती है, message एक clear sequence of hand-offs से internet cross करता है, और आप अभी मिले हर protocol अपना part play करता है। इस journey को trace करना एक case study है जो पूरे subject को साथ tie करता है।
तीन players involved हैं: mailer (हर person इस्तेमाल करता email program), mail server (जो mail send, relay, और store करता है), और mailbox (जहाँ received mail wait करता है)। देखिए message इनके बीच कैसे move करता है, और हर step पर कौन सा protocol इसे carry करता है।
Follow along
एक Email की Journey
- Mailer में Compose करना Riya अपने mail program (mailer, या mail user agent) में email लिखती है और send hit करती है।
- Mailer से Sender के Server तक (SMTP) Mailer Riya के mail server को message handover करने के लिए SMTP इस्तेमाल करता है।
- Server Internet के Across Relay करता है (SMTP) Riya का server Arjun के mail server तक message relay करने के लिए SMTP इस्तेमाल करता है, networks के across IP से routed।
- Mailbox में Store होता है Arjun का mail server message को Arjun के mailbox में रखता है, जहाँ यह wait करता है।
- Recipient Retrieve करता है (POP3/IMAP) जब Arjun अपना mailer खोलता है, यह POP3 या IMAP इस्तेमाल करके message को उसके mailbox से pull करता है।
Theory
Players और इनके Roles
Mailer (mail user agent) वह program है जो human compose, send, और read करने के लिए इस्तेमाल करता है। Riya का mailer और Arjun का mailer दोनों ends पर बैठते हैं।
Mail server (mail transfer agent) बीच में heavy lifting करता है: यह outgoing mail accept करता है, इसे destination की तरफ़ relay करता है, और अपने users के लिए incoming mail receive करता है। हर side पर एक है।
Mailbox recipient के server पर storage है जहाँ messages जमा होते हैं जब तक recipient इन्हें fetch न करे। यही separation है जो email को काम करने देता है जब Arjun offline होता है भी: message सुरक्षित रूप से उसके mailbox में wait करता है जब तक वह अगली बार connect न हो।
Formula
SMTP Push करता है, POP3/IMAP Pull करते हैं
पूरी journey protocol से neatly split होती है। SMTP sending half handle करता है, mailer से पहले server तक, और server से server तक, यह message को इसके destination की तरफ़ push करता है। POP3 या IMAP receiving half handle करते हैं: recipient का mailer waiting message को mailbox से pull करता है।
तो mail SMTP से पूरी दुनिया के across pushed होता है और फिर आख़िर में POP3/IMAP से pull होता है। और यह सब lower layers पर चलता है: transport (TCP) reliable delivery ensure करता है, और network (IP) इसे servers के बीच route करता है। Layers cooperate करती हैं।
Quiz
Email journey में, Arjun का mail program आख़िर में waiting message को अपने mailbox से download करता है। यह retrieval step कौन सा protocol इस्तेमाल करता है?
- SMTP, वही protocol जिसने इसे भेजा
- POP3 या IMAP, जो recipient के mailbox से mail retrieve करते हैं
- IP, क्योंकि यह message route करता है
- FTP, क्योंकि यह files transfer करता है
Show the answer
POP3 या IMAP, जो recipient के mailbox से mail retrieve करते हैं
Mailbox से received mail retrieve करना POP3 या IMAP से किया जाता है, वे protocols जो messages को recipient के mailer तक pull down करते हैं। Option A ग़लत है: SMTP ने SENDING और relaying handle किया (message को Arjun के server की तरफ़ push किया), पर mailbox से final download एक retrieval job है, जो SMTP नहीं करता। Option C IP नाम देता है, जो नीचे network layer पर packets route करता है, यह वह application-layer protocol नहीं है जिसे mailer mail fetch करने के लिए इस्तेमाल करता है। Option D, FTP, generally files transfer करता है और email retrieval protocol नहीं है। Halves straight रखिए: SMTP mail को बाहर और across push करता है; POP3/IMAP इसे आख़िर में pull down करते हैं।
Think first
Message Recipient के पास सीधे जाने की बजाय एक Mailbox में क्यों बैठता है?
Email को Arjun के personal device तक directly क्यों नहीं deliver करते, इसे एक server पर एक mailbox में store करने की बजाय? फिर tap कीजिए।
Show the answer
क्योंकि recipient अक्सर OFFLINE होता है, और mailbox email को reliably काम करने देता है चाहे recipient currently connected हो या नहीं। अगर delivery के लिए message को सीधे Arjun के personal device पर भेजना ज़रूरी होता, यह हमेशा fail होता जब भी उसका laptop off हो, network से बाहर हो, या sleep में हो, जो ज़्यादातर समय होता है। इसके बजाय, message Arjun के MAIL SERVER तक deliver होता है, जो हमेशा on है, और वहाँ उसके MAILBOX में store होता है। Message उस mailbox में safely wait करता है जितनी देर चाहिए, minutes या weeks, और Arjun इसे retrieve करता है (POP3 या IMAP से) जब भी वह अगली बार अपना mailer खोले, किसी भी device से। यह 'store and forward' design है जो email को इतना robust बनाता है: sender का job message के recipient के server तक पहुँचते ही ख़त्म हो जाता है, और recipient इसे अपने schedule पर collect करता है। इसका मतलब यह भी है Arjun अपना mail अपने phone से पढ़ सकता है, फिर laptop से, फिर एक library computer से, क्योंकि यह server पर रहता है, एक machine से tied नहीं (IMAP especially exactly इसी वजह से server पर सब कुछ synchronised रखता है)। तो mailbox sending को reading से decouple करता है: mail कभी भी arrive हो सकता है और कभी भी collect हो सकता है, एक always-on server gap bridge करते हुए। पहले store, बाद में collect, यही वजह है email दोनों लोगों के एक साथ online होने पर depend नहीं करता।
Summary
Key takeaways
- एक email तीन players से गुज़रता है: mailer (user का program), mail server (relay और store करता है), और mailbox (received mail store करता है)।
- Sender mailer में compose करता है, जो message को sender के server को SMTP से handover करता है।
- Sender का server इसे SMTP से internet के across (IP से routed) recipient के mail server तक relay करता है।
- Recipient का server message को recipient के mailbox में तब तक store करता है जब तक यह fetch न हो।
- Recipient का mailer इसे POP3 या IMAP इस्तेमाल करके mailbox से retrieve करता है।
- SMTP mail को बाहर और across push करता है; POP3/IMAP इसे pull down करते हैं; यह सब transport (TCP) और network (IP) पर चलता है।
- Memory hook: compose, SMTP out, relay, mailbox waits, POP3/IMAP down।