Internet-technologies-e-mail-protocols

提供:Dev Guides
移動先:案内検索

電子メールプロトコル

電子メールプロトコルは、クライアントがメールサーバーとの間で情報を適切に送信するのに役立つ一連のルールです。 このチュートリアルでは、* SMTP、POP、 IMAPなどのさまざまなプロトコルについて説明します。

SMPTP

*SMTP* は *Simple Mail Transfer Protocol* の略です。 1982年に初めて提案されました。 これは、インターネットを介して電子メールを効率的かつ確実に送信するために使用される標準プロトコルです。

キーポイント:

  • SMTPはアプリケーションレベルのプロトコルです。
  • SMTPは接続指向のプロトコルです。
  • SMTPはテキストベースのプロトコルです。
  • TCP/IPネットワークを介した電子メールサーバー間のメッセージ交換を処理します。
  • 電子メールの転送とは別に、SMPTは受信メールに関する通知も提供します。
  • 電子メールを送信すると、電子メールクライアントは電子メールサーバーに送信し、SMTPクライアントを使用して受信者のメールサーバーにさらに連絡します。
  • これらのSMTPコマンドは、送信するメッセージとともに、送信者と受信者の電子メールアドレスを指定します。
  • サーバー間のコマンドの交換は、ユーザーの介入なしに実行されます。
  • メッセージを配信できない場合、エラー報告が送信者に送信され、SMTPが信頼できるプロトコルになります。

SMTPコマンド

次の表に、SMTPコマンドの一部を示します。

S.N. Command Description
1 HELLOThis command initiates the SMTP conversation.
2 EHELLOThis is an alternative command to initiate the conversation. ESMTP indicates that the sender server wants to use extended SMTP protocol.
3 MAIL FROMThis indicates the sender’s address.
4 RCPT TOIt identifies the recipient of the mail. In order to deliver similar message to multiple users this command can be repeated multiple times.
5 SIZEThis command let the server know the size of attached message in bytes.
6 DATAThe DATA command signifies that a stream of data will follow. Here stream of data refers to the body of the message.
7 QUITThis commands is used to terminate the SMTP connection.
8 VERFYThis command is used by the receiving server in order to verify whether the given username is valid or not.
9 EXPNIt is same as VRFY, except it will list all the users name when it used with a distribution list.

IMAP

*IMAP* は* Internet Mail Access Protocolの略です。1986年に最初に提案されました。 IMAPには次の5つのバージョンがあります。
  1. 元のIMAP
  2. IMAP2
  3. IMAP3
  4. IMAP2bis
  5. IMAP4

キーポイント:

  • IMAPを使用すると、クライアントプログラムは、ローカルコンピューターにダウンロードせずにサーバー上の電子メールメッセージを操作できます。
  • 電子メールは、リモートサーバーによって保持および維持されます。
  • これにより、ダウンロードなどのアクションを実行したり、メールを読み取らずにメールを削除したり、メールボックスと呼ばれるリモートメッセージフォルダーを作成、操作、削除したりできます。
  • IMAPを使用すると、ユーザーは電子メールを検索できます。
  • 複数のメールサーバー上の複数のメールボックスに同時にアクセスできます。

IMAPコマンド

次の表に、IMAPコマンドの一部を示します。

S.N. Command Description
1 IMAP_LOGINThis command opens the connection.
2 CAPABILITYThis command requests for listing the capabilities that the server supports.
3 NOOPThis command is used as a periodic poll for new messages or message status updates during a period of inactivity.
4 SELECTThis command helps to select a mailbox to access the messages.
5 EXAMINEIt is same as SELECT command except no change to the mailbox is permitted.
6 CREATEIt is used to create mailbox with a specified name.
7 DELETEIt is used to permanently delete a mailbox with a given name.
8 RENAMEIt is used to change the name of a mailbox.
9 LOGOUTThis command informs the server that client is done with the session. The server must send BYE untagged response before the OK response and then close the network connection.

POP

POPはPost Office Protocolの略です。 通常、単一のクライアントをサポートするために使用されます。 POPにはいくつかのバージョンがありますが、POP 3が現在の標準です。

キーポイント

  • POPは、アプリケーション層のインターネット標準プロトコルです。
  • POPはメッセージへのオフラインアクセスをサポートしているため、インターネットの使用時間が短縮されます。
  • POPは検索機能を許可しません。
  • メッセージにアクセスするには、それらをダウンロードする必要があります。
  • サーバー上に作成できるメールボックスは1つだけです。
  • メール以外のデータへのアクセスには適していません。
  • 通常、POPコマンドは3文字または4文字のコードに短縮されます。 Eg. STAT。

POPコマンド

次の表に、POPコマンドの一部を示します。

S.N. Command Description
1 LOGINThis command opens the connection.
2 STATIt is used to display number of messages currently in the mailbox.
3 LISTIt is used to get the summary of messages where each message summary is shown.
4 RETRThis command helps to select a mailbox to access the messages.
5 DELEIt is used to delete a message.
6 RSETIt is used to reset the session to its initial state.
7 QUITIt is used to log off the session.

POPとIMAPの比較

S.N. POP IMAP
1 Generally used to support single client. Designed to handle multiple clients.
2 Messages are accessed offline. Messages are accessed online although it also supports offline mode.
3 POP does not allow search facility. It offers ability to search emails.
4 All the messages have to be downloaded. It allows selective transfer of messages to the client.
5 Only one mailbox can be created on the server. Multiple mailboxes can be created on the server.
6 Not suitable for accessing non-mail data. Suitable for accessing non-mail data i.e. attachment.
7 POP commands are generally abbreviated into codes of three or four letters. Eg. STAT. IMAP commands are not abbreviated, they are full. Eg. STATUS.
8 It requires minimum use of server resources. Clients are totally dependent on server.
9 Mails once downloaded cannot be accessed from some other location. Allows mails to be accessed from multiple locations.
10 The e-mails are not downloaded automatically. Users can view the headings and sender of e-mails and then decide to download.
10 POP requires less internet usage time. IMAP requires more internet usage time.