add auto fetch ssl certs

This commit is contained in:
2021-08-26 12:11:25 +08:00
parent 11ca254bed
commit 509ac048fc
237 changed files with 4968 additions and 7406 deletions

View File

@@ -13,7 +13,7 @@
"articleSection" : "post",
"name" : "[筆記] 測試mail server 的SSL憑證的指令 Command to test mailserver SSL",
"headline" : "[筆記] 測試mail server 的SSL憑證的指令 Command to test mailserver SSL",
"description" : "\x3cp\x3e今天老闆出國發slack說手機不能寄信看了一下似乎是因為用GMAIL的APP來收信\x3c\/p\x3e\n\n\x3cp\x3e然後google 不知道跟人家改了什麼,結果不接受原本的認證了\x26hellip; WTF \x26hellip;.\x3c\/p\x3e\n\n\x3cp\x3e然後這問題應該很久了結果現在才在講 \x26hellip;.\x3c\/p\x3e",
"description" : "\x3cp\x3e今天老闆出國發slack說手機不能寄信看了一下似乎是因為用GMAIL的APP來收信\x3c\/p\x3e\n\x3cp\x3e然後google 不知道跟人家改了什麼,結果不接受原本的認證了\x26hellip; WTF \x26hellip;.\x3c\/p\x3e\n\x3cp\x3e然後這問題應該很久了結果現在才在講 \x26hellip;.\x3c\/p\x3e",
"inLanguage" : "en",
"author" : "Eric Chang",
"creator" : "Eric Chang",
@@ -24,7 +24,7 @@
"datePublished": "2019-03-20 11:42:47 \x2b0800 CST",
"dateModified" : "2019-03-20 11:42:47 \x2b0800 CST",
"url" : "https:\/\/h.cowbay.org\/post\/command_to_test_main_ssl\/",
"wordCount" : "665",
"wordCount" : "660",
"image" : "https://h.cowbay.orghttps://h.cowbay.org/images/post-default-10.jpg"",
"keywords" : [ "Blog" ]
}
@@ -45,9 +45,9 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link href="https://h.cowbay.org/css/style.css?v=1626744134" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
<link href="https://h.cowbay.org/css/style.css?v=1629951055" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
<link href="https://h.cowbay.org/css/custom.css?v=1626744134" rel="stylesheet" type='text/css' media='all'>
<link href="https://h.cowbay.org/css/custom.css?v=1629951055" rel="stylesheet" type='text/css' media='all'>
<link rel="shortcut icon" href="https://h.cowbay.org/img/favicon.ico" type="image/x-icon">
<link rel="icon" href="https://h.cowbay.org/img/favicon.ico" type="image/x-icon">
@@ -81,10 +81,6 @@ if (!doNotTrack) {
<ul id="menu-secondary-items" class="menu-secondary-items">
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/"></a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/ansible">ansible</a>
</li>
@@ -303,24 +299,14 @@ if (!doNotTrack) {
<div class="entry-content">
<article>
<p>今天老闆出國發slack說手機不能寄信看了一下似乎是因為用GMAIL的APP來收信</p>
<p>然後google 不知道跟人家改了什麼,結果不接受原本的認證了&hellip; WTF &hellip;.</p>
<p>然後,這問題應該很久了,結果現在才在講 &hellip;.</p>
<p>底下都是用linux 主機來進行測試</p>
<p>windows環境應該也可以只是要自己去安裝 openssl 軟體</p>
<p>To verify SSL, connect to any Linux server via SSH and use the instructions below:</p>
<p><strong>測試 SSL-IMAP 993 port</strong></p>
<pre><code>openssl s_client -showcerts -connect mail.example.com:993
</code></pre>
<p>結果應該會像是這樣</p>
</code></pre><p>結果應該會像是這樣</p>
<pre><code>2019-03-20 11:21:02 [changch@hqdc034 ~]$ openssl s_client -showcerts -connect mail.abc.com:993
CONNECTED(00000003)
depth=0 C = TW, ST = Taipei, L = Taipei, O = iredmail02.abc.com, OU = IT, CN = iredmail02.abc.com, emailAddress = root@iredmail02.abc.com
@@ -401,16 +387,10 @@ SSL-Session:
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready.
2019-03-20 11:21:47 [changch@hqdc034 ~]$
</code></pre>
<p><strong>測試SMTP TLS 587 port</strong></p>
</code></pre><p><strong>測試SMTP TLS 587 port</strong></p>
<pre><code>openssl s_client -starttls smtp -showcerts -connect mail.example.com:587
</code></pre>
<p>指令有點不同,要加上 startls smtp 的參數
</code></pre><p>指令有點不同,要加上 startls smtp 的參數
回應應該會是這樣</p>
<pre><code>2019-03-20 11:50:48 [changch@hqdc034 ~]$ openssl s_client -starttls smtp -showcerts -connect mail.abc.com:587
CONNECTED(00000003)
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
@@ -510,14 +490,10 @@ SSL-Session:
---
250 DSN
</code></pre>
<p><strong>測試 SMTP SSL port 465</strong>
指令
<pre>
openssl s_client -showcerts -connect mail.example.com:465
</pre></p>
</code></pre><p><strong>測試 SMTP SSL port 465</strong>
指令</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>不過因為我沒開這個port ,所以就不測試了</p>
</article>
</div>
@@ -790,7 +766,7 @@ title="pinterest icon"></i>
</ul> <div class="design-credit">
<p>&copy; 2018 Göran Svensson</p>
<p>© 2018 Göran Svensson</p>
<p>Nederburg Hugo Theme by <a href="https://appernetic.io">Appernetic</a>.</p>
@@ -802,7 +778,7 @@ title="pinterest icon"></i>
</div>
<script src="https://h.cowbay.org/js/jquery.min.js"></script>
<script src="https://h.cowbay.org/js/jquerymigrate.js"></script>
<script src="https://h.cowbay.org/js/production.min.js?v=1626744134"></script>
<script src="https://h.cowbay.org/js/production.min.js?v=1629951055"></script>
</body>
</html>