- 1. 概要
- 2. 送信
- 3. 参考サイト
1. 概要
前ページでは、「25」番ポートを用いて、平文で配送テストをする方法について、記述しました。
2. 送信
下記のように実行します。
swaks --server mx.example.com:465 --tlsc --to user1@example.com --from user1@example.com
前ページと異なるのは。
「--server」の定義に、「:465」を書くことで、「465」番ポートを使用します。
「--tlsc」をつけることで、「TLS」を使用しています。
実行すると、下記のような出力が得られます。
=== Trying mx.example.com:465...
=== Connected to mx.example.com.
=== TLS started with cipher TLSv1.3:TLS_AES_256_GCM_SHA384:256
=== TLS client certificate not requested and not sent
=== TLS no client certificate set
=== TLS peer[0] subject=[/CN=mx.example.com]
=== commonName=[mx.example.com], subjectAltName=[DNS:mx.example.com] notAfter=[2026-10-28T21:21:45Z]
=== TLS peer[1] subject=[/C=US/O=Let's Encrypt/CN=YR1]
=== commonName=[YR1], subjectAltName=[] notAfter=[2028-09-02T23:59:59Z]
=== TLS peer[2] subject=[/C=US/O=ISRG/CN=Root YR]
=== commonName=[Root YR], subjectAltName=[] notAfter=[2032-09-02T23:59:59Z]
=== TLS peer certificate failed CA verification (unable to get local issuer certificate), passed host verification (using host mx.example.com to verify)
<~ 220 mx.example.com ESMTP
~> EHLO mx.example.com
<~ 250-mx.example.com
<~ 250-PIPELINING
<~ 250-SIZE 10240000
<~ 250-ETRN
<~ 250-AUTH PLAIN LOGIN
<~ 250-ENHANCEDSTATUSCODES
<~ 250-8BITMIME
<~ 250-DSN
<~ 250-SMTPUTF8
<~ 250-CHUNKING
<~ 250 REQUIRETLS
~> MAIL FROM:<user1@example.com>
<~ 250 2.1.0 Ok
~> RCPT TO:<user1@example.com>
<~ 250 2.1.5 Ok
~> DATA
<~ 354 End data with <CR><LF>.<CR><LF>
~> Date: Thu, 06 Aug 2026 15:43:47 +0900
~> To: user1@example.com
~> From: user1@example.com
~> Subject: test Thu, 06 Aug 2026 15:43:47 +0900
~> Message-Id: <20260806154347.076059@mx.example.com>
~> X-Mailer: swaks v20240103.0 jetmore.org/john/code/swaks/
~>
~> This is a test mailing
~>
~>
~> .
<~ 250 2.0.0 Ok: queued as AD0F3A7D845
~> QUIT
<~ 221 2.0.0 Bye
=== Connection closed with remote host.
3. 参考サイト
本ページは、「Gemini」伍長を参考にさせていただきました。
|
|