メッセージ送信エージェント(MSA)またはメール送信エージェントは、メールユーザーエージェント(MUA)から電子メールメッセージを受信し、メール転送エージェント(MTA)と連携してメールを配信するコンピュータプログラムまたはソフトウェアエージェントです。RFC 6409で規定されているSimple Mail Transfer Protocol(SMTP)の派生プロトコルであるESMTPを使用します。[ 1 ]
多くのMTAはMSAの機能も果たしますが、MTAの機能を完全に備えていないMSAとして特別に設計されたプログラムもあります。[ 2 ]歴史的に、インターネットメールでは、MTAとMSAの両方の機能がポート番号25を使用しますが、MSAの公式ポートは587です。[ 1 ] MTAはユーザーの受信メールを受け入れ、MSAはユーザーの送信メールを受け入れます。

MTAとMSAの機能を分離することで、いくつかの利点が生まれます。
利点の1つは、MSAが作成者のMUAと直接やり取りするため、メッセージ形式の軽微なエラー(日付、メッセージID、宛先フィールドの欠落、ドメイン名が欠落したアドレスなど)を修正したり、エラーを即座に作成者に報告して、受信者に送信される前に修正できるようにできることです。他のサイトからメッセージを受け取るMTAは、このような修正を確実に行うことはできず、そのようなMTAによって生成されたエラー報告は、メッセージが既に送信された後にのみ作成者に届きます(届くとしても)。
もう 1 つの利点は、専用ポート番号 587 を使用することで、ユーザーが常にドメインに接続して新しいメールを送信できることです。スパム (ボットネットの被害者が意図せず送信するスパムを含む) に対処するため、多くのISPや機関ネットワークは、ポート 25 でのリモート MTA への接続を制限しています。ポート 587 [ 3 ]での MSA へのアクセスにより、ノマド ユーザー (たとえば、ラップトップで作業しているユーザー) は、他のネットワーク内からでも、好みの送信サーバー経由でメールを送信し続けることができます。送信者ポリシーや署名慣行が適用される場合、特定の送信サーバーを使用することが必須となります。
Another benefit is that separating the MTA and MSA functions makes it easier for an MTA to deny relaying, that is to refuse any mail that is not addressed to a recipient at a domain that is served locally. This is a strategy used by ISPs to prevent the sending of spam from virus-infected client computers. By contrast, an MSA must generally accept mail for any recipient on the Internet, though it only accepts such mail from authors who are authorized to use that MSA and who have established their identity to the MSA via authentication. In times when both mail submission and acceptance of incoming mail were usually accomplished using the same protocol and the same server, the ability to send mail to arbitrary destinations without authentication allowed spammers to use MTAs as a means of distributing spam (since a single message transaction can request that an MTA relay a message to a large number of recipients), and also made it more difficult to trace a message to its origin.
Moreover, MSAs and MTAs can have different policies for filtering of spam. Most MSAs require authentication in the form of a username and password provided by the author. Any messages received by such an MSA are therefore traceable to an author who has a direct relationship with the MSA, and who can be held accountable for his actions. This allows the MSA to have either no spam filtering, or more permissive spam filtering than an MTA that exists for the purpose of accepting incoming email from other domains. It is difficult to establish trust in mail sent between arbitrary domains, because there is generally no direct relationship between those domains via which trust, or even identity, can be established. In the absence of such trust, an MTA must generally rely on heuristics and third-party reputation services to distinguish spam from legitimate traffic, and both of these mechanisms have a history of being error-prone.[4][5] The separation of MSA and MTA therefore avoids the use of unreliable spam recognition mechanisms during mail submission, and increases the probability for legitimate mail to be delivered successfully.
While recent email clients use port 587 by default, older ones still propose port 25. Users have to change the port number manually in the latter case. It is also possible that the MUA may automatically discover which server provides the MSA for a given domain, looking up the SRV records for that domain. Domain example.com can publish its record like so:[6]
_submission._tcp.example.com. SRV 0 1 587 mail.example.com.
RFC 6409 では、クライアントがメール送信サービスを使用するために認可および認証されている必要があります。たとえば、SMTP-AUTH (ESMTPA) で説明されているように、またはRADIUS、公開鍵証明書、または (ほとんど廃止された) SMTP 以前の POPなどの他の手段によって認可および認証されます。
MSAは、送信されたメールが構文的に有効であり、関連するサイトポリシーに準拠していることを確認する必要があります。RFC 6409には、いくつかのオプション機能が含まれています。
アクセス プロバイダは、SUBMISSION ポート 587 を使用して外部インターネットにアクセスするユーザーをブロックしてはなりません。