顯示具有 Mail Server 標籤的文章。 顯示所有文章
顯示具有 Mail Server 標籤的文章。 顯示所有文章

2026年9月4日 星期五

[研究]推薦免費、自架 Mail Server 10套,是否有信箱 ? SMTP ? POP3 ? IMAP ? 或其他 ?

[研究]推薦免費、自架 Mail Server 10套,是否有信箱 ? SMTP ? POP3 ? IMAP ? 或其他 ?

2026-09-04

先講結論:如果是你目前要自己架設,我最推薦先看 Stalwart、Mailcow、iRedMail、Mail-in-a-Box。

  • 🥇 Stalwart:現代化、All-in-One、SMTP + IMAP + POP3 + JMAP,值得優先測試。
  • 🥈 Mailcow:功能非常完整,企業/多人使用很適合,但比較吃 RAM。
  • 🥉 iRedMail:經典、成熟,Postfix + Dovecot 架構容易理解。
  • ⭐ Mail-in-a-Box:想快速做出一台個人/小型 Mail Server,很方便。
  • ⭐ docker-mailserver:想自己掌握 Postfix/Dovecot,又希望 Docker 化,非常適合。

# Mail Server 免費/開源 建議 OS 信箱 Mailbox SMTP IMAP POP3 Webmail JMAP Spam/AV Docker 適合度
1 Stalwart Mail Server ✅ Open Source Linux ✅ ✅ ✅ ✅ ⚠️ 管理/服務介面 ⭐⭐⭐ ✅ ✅ ⭐⭐⭐⭐⭐
2 Mailcow ✅ Open Source Linux ✅ ✅ Postfix ✅ Dovecot ✅ ✅ SOGo ⚠️ ✅ Rspamd/ClamAV ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐⭐
3 iRedMail ✅ Open Source Linux ✅ ✅ Postfix ✅ Dovecot ✅ ✅ Roundcube ❌ ✅ ⚠️ ⭐⭐⭐⭐⭐
4 Mail-in-a-Box ✅ Open Source Ubuntu ✅ ✅ Postfix ✅ Dovecot ⚠️ ✅ Roundcube ❌ ✅ ❌ ⭐⭐⭐⭐
5 Mailu ✅ Open Source Linux ✅ ✅ ✅ ✅ ✅ ❌ ✅ ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐
6 docker-mailserver ✅ Open Source Linux ✅ ✅ Postfix ✅ Dovecot ✅ ⚠️ 外接 ❌ ✅ ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐
7 Modoboa ✅ Open Source Linux ✅ ✅ Postfix ✅ Dovecot ✅ ✅ ❌ ✅ ⚠️ ⭐⭐⭐⭐
8 Maddy Mail Server ✅ Open Source Linux/Windows/macOS* ✅ ✅ ✅ ❌/有限 ⚠️ ❌ ⚠️ ✅ ⭐⭐⭐
9 Mox ✅ Open Source Linux ✅ ✅ ✅ ⚠️ ⚠️ ❌ ✅ ⚠️ ⭐⭐⭐
10 Postfix + Dovecot ✅ Open Source Linux/Unix ✅ ✅ ✅ ✅ ❌ ❌ ❌ ⚠️ ⭐⭐⭐⭐

(完)

2026年8月12日 星期三

[研究]供另一台 Web Server 可「高速大量發信」 Mail Server

[研究]供另一台 Web Server 可「高速大量發信」 Mail Server

2026-08-12

ChatGPT

排名 Mail Server / MTA OS 免費 高速大量發信 適合你的程度
🥇 Postfix Linux ✅ 免費/開源 ⭐⭐⭐⭐⭐ ★★★★★
🥈 Haraka Linux / Node.js ✅ 免費/開源 ⭐⭐⭐⭐⭐ ★★★★★
🥉 MailEnable Standard Windows Server ✅ 免費 ⭐⭐⭐⭐ ★★★★☆
4 Stalwart Mail Server Linux / Windows / Docker ✅ 有免費開源版 ⭐⭐⭐⭐ ★★★★☆
5 hMailServer Windows ✅ 免費 ⭐⭐⭐ ★★☆☆☆

詳細比較

Mail Server OS 免費/付費 高速大量發信 主要特點 優點 缺點 適合你的程度
Postfix Linux 🟢 免費 / Open Source ⭐⭐⭐⭐⭐ 專業 MTA、SMTP、Queue、Routing 非常成熟、效能高、穩定、大量發信能力強、資源需求低 Linux 維運門檻較高;GUI 較少,需要自行規劃 DKIM/監控等 ⭐⭐⭐⭐⭐
Haraka Linux / Node.js 🟢 免費 / Open Source ⭐⭐⭐⭐⭐ 高效能 SMTP Server、Plugin 架構 高並發、高吞吐量、可高度客製化、非常適合 SMTP Server 生態及企業管理工具不如 Postfix;需要 Node.js / Linux 技術 ⭐⭐⭐⭐⭐
MailEnable Standard Windows Server 🟢 免費 ⭐⭐⭐⭐ Windows Mail Server、SMTP/POP3/IMAP/Webmail Windows GUI 管理、安裝容易、與你的 Windows/IIS 環境整合方便 極大量發信效能與彈性不如專業 Linux MTA 架構;部分進階功能需付費版 ⭐⭐⭐⭐½
Stalwart Mail Server Linux / Windows / Docker 🟢 有免費 Open Source 版 ⭐⭐⭐⭐ 現代化 Mail Server、SMTP/IMAP/JMAP 現代架構、跨平台、功能完整、效能好 相對較新,企業環境長期維運經驗不如 Postfix ⭐⭐⭐⭐
hMailServer Windows 🟢 免費 / Open Source ⭐⭐⭐ Windows SMTP/POP3/IMAP 簡單、免費、Windows 使用者容易上手 已屬較舊的方案,不建議做新的大型正式系統 ⭐⭐
Microsoft Exchange Server Windows Server 🔴 商業授權 ⭐⭐~⭐⭐⭐ 完整企業 Mail/Calendar/Contacts 企業郵件功能完整、AD/Outlook 整合強 太重、成本高,不適合單純大量 Outbound SMTP;架構及維護複雜 ⭐⭐
Sendmail Linux/Unix 🟢 免費 / Open Source ⭐⭐⭐⭐ 傳統 MTA 歷史悠久、功能完整 設定及維護複雜、較老舊,新系統通常優先 Postfix ⭐⭐½
Exim Linux/Unix 🟢 免費 / Open Source ⭐⭐⭐⭐ 高度可設定的 MTA 彈性非常高、Linux 生態成熟 設定複雜度高;對你的需求 Postfix 通常更容易選 ⭐⭐⭐½

(完)

2025年9月11日 星期四

[研究]查某 DNS Domain 中有哪些 Mail Server

[研究]查某 DNS Domain 中有哪些 Mail Server

2025-09-11

C:\>nslookup -type=mx gmail.com
伺服器:  dns.hinet.net
Address:  168.95.1.1

未經授權的回答:
gmail.com       MX preference = 10, mail exchanger = alt1.gmail-smtp-in.l.google.com   
gmail.com       MX preference = 20, mail exchanger = alt2.gmail-smtp-in.l.google.com
gmail.com       MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l.google.com
gmail.com       MX preference = 40, mail exchanger = alt4.gmail-smtp-in.l.google.com
gmail.com       MX preference = 5, mail exchanger = gmail-smtp-in.l.google.com

C:\>

(完)

相關

2025年5月22日 星期四

[研究]agms v1.0.0.10(ArGoSoft Mail Server 的新一代版本)免費電子郵件伺服器安裝

[研究]agms v1.0.0.10(ArGoSoft Mail Server 的新一代版本)免費電子郵件伺服器安裝

2025-05-22

https://www.argosoft.com/Install/Windows











********************************************************************************

agms 是免費 ? 電子郵件伺服器 ? 有 MailBox ? SMTP ? POP3 ? 帳號管理 ?

ChatGPT 說:

是的,agms(ArGoSoft Mail Server 的新一代版本)是一款免費的電子郵件伺服器,支援多種郵件協定和帳號管理功能,適用於 Windows 和 Linux 系統。

✅ agms 的主要功能包括:

  • 免費使用:agms 提供免費版本,適合個人或小型企業部署。 
  • 支援多種郵件協定:
    • SMTP(發送郵件)
    • POP3 和 IMAP(接收郵件)
    • 支援安全連線(SSL/TLS)
  • 帳號與信箱管理:
    • 帳號資訊儲存在 accounts.json 檔案中
    • 郵件儲存在 mail 資料夾中
    • 設定檔為 serversettings.json
    • 所有資料皆位於 data/ 資料夾中,便於備份與管理 
  • 安全性與防護機制:
    • 內建支援 SPF、DKIM、DMARC 等郵件驗證機制
    • 可整合 AbuseIPDB,提升垃圾郵件防護能力 
  • 輕量化與跨平台:
    • 設計簡潔,資源佔用低
    • 可在 Windows 和 Linux 系統上運行

📌 注意事項

agms 的介面可能不如其前身(ArGoSoft Mail Server)直觀,但功能更為現代化與強大。

(完)

2023年4月13日 星期四

[研究]Postfix 3.5.9郵件伺服器 (Mail Server) 安裝 (CentOS/Rocky Linux 9.1)

[研究]Postfix 3.5.9郵件伺服器 (Mail Server) 安裝 (CentOS/Rocky Linux 9.1)

2023-04-12

官方網站:https://www.postfix.org/
Postfix Documentation:https://www.postfix.org/documentation.html

sudo yum -y update (非必須)

sudo yum -y install postfix

sudo systemctl start postfix

sudo postfix set-permissions

sudo postfix check

sudo systemctl status postfix

實際過程

[user1@localhost ~]$ sudo yum -y install postfix

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for user1: 
Rocky Linux 9 - BaseOS                          1.1 MB/s | 1.8 MB     00:01    
Rocky Linux 9 - AppStream                       1.1 MB/s | 6.6 MB     00:05    
Rocky Linux 9 - Extras                          7.5 kB/s | 8.7 kB     00:01    
Dependencies resolved.
================================================================================
 Package         Architecture   Version                 Repository         Size
================================================================================
Installing:
 postfix         x86_64         2:3.5.9-19.el9          appstream         1.4 M

Transaction Summary
================================================================================
Install  1 Package

Total download size: 1.4 M
Installed size: 4.4 M
Downloading Packages:
postfix-3.5.9-19.el9.x86_64.rpm                 3.1 MB/s | 1.4 MB     00:00    
--------------------------------------------------------------------------------
Total                                           956 kB/s | 1.4 MB     00:01     
Rocky Linux 9 - AppStream                       1.7 MB/s | 1.7 kB     00:00    
Importing GPG key 0x350D275D:
 Userid     : "Rocky Enterprise Software Foundation - Release key 2022 <releng@rockylinux.org>"
 Fingerprint: 21CB 256A E16F C54C 6E65 2949 702D 426D 350D 275D
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Running scriptlet: postfix-2:3.5.9-19.el9.x86_64                          1/1 
  Installing       : postfix-2:3.5.9-19.el9.x86_64                          1/1 
  Running scriptlet: postfix-2:3.5.9-19.el9.x86_64                          1/1 
  Verifying        : postfix-2:3.5.9-19.el9.x86_64                          1/1 

Installed:
  postfix-2:3.5.9-19.el9.x86_64                                                 

Complete!
[user1@localhost ~]$ sudo systemctl start postfix
[user1@localhost ~]$ sudo systemctl enable postfix
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /usr/lib/systemd/system/postfix.service.
[user1@localhost ~]$ sudo systemctl status postfix
● postfix.service - Postfix Mail Transport Agent
     Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor p>
     Active: active (running) since Wed 2023-04-12 07:45:54 CST; 16s ago
   Main PID: 33345 (master)
      Tasks: 3 (limit: 22814)
     Memory: 4.9M
        CPU: 362ms
     CGroup: /system.slice/postfix.service
             ├─33345 /usr/libexec/postfix/master -w
             ├─33346 pickup -l -t unix -u
             └─33347 qmgr -l -t unix -u

Apr 12 07:45:54 localhost.localdomain systemd[1]: Starting Postfix Mail Transpo>
Apr 12 07:45:54 localhost.localdomain restorecon[33271]: /usr/sbin/restorecon: >
Apr 12 07:45:54 localhost.localdomain postfix/master[33345]: daemon started -- >
Apr 12 07:45:54 localhost.localdomain systemd[1]: Started Postfix Mail Transpor>
[user1@localhost ~]$ 
[user1@localhost ~]$ sudo postfix set-permissions
[user1@localhost ~]$ sudo postfix check
[user1@localhost ~]$ sudo systemctl status postfix
● postfix.service - Postfix Mail Transport Agent
     Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor p>
     Active: active (running) since Wed 2023-04-12 07:45:54 CST; 2min 12s ago
   Main PID: 33345 (master)
      Tasks: 3 (limit: 22814)
     Memory: 4.9M
        CPU: 363ms
     CGroup: /system.slice/postfix.service
             ├─33345 /usr/libexec/postfix/master -w
             ├─33346 pickup -l -t unix -u
             └─33347 qmgr -l -t unix -u

Apr 12 07:45:54 localhost.localdomain systemd[1]: Starting Postfix Mail Transpo>
Apr 12 07:45:54 localhost.localdomain restorecon[33271]: /usr/sbin/restorecon: >
Apr 12 07:45:54 localhost.localdomain postfix/master[33345]: daemon started -- >
Apr 12 07:45:54 localhost.localdomain systemd[1]: Started Postfix Mail Transpor>
[user1@localhost ~]$ 


如果Postfix正在運行,系統會顯示"Active (running)"的狀態。

Postfix 還有哪些相關套件

[user1@localhost ~]$ yum list | grep postfix
postfix.x86_64                                       2:3.5.9-19.el9                      @appstream
pcp-pmda-postfix.x86_64                              5.3.7-7.el9                         appstream 
postfix-cdb.x86_64                                   2:3.5.9-19.el9                      appstream 
postfix-ldap.x86_64                                  2:3.5.9-19.el9                      appstream 
postfix-mysql.x86_64                                 2:3.5.9-19.el9                      appstream 
postfix-pcre.x86_64                                  2:3.5.9-19.el9                      appstream 
postfix-perl-scripts.x86_64                          2:3.5.9-19.el9                      appstream 
postfix-pgsql.x86_64                                 2:3.5.9-19.el9                      appstream 
postfix-sqlite.x86_64                                2:3.5.9-19.el9                      appstream 
[user1@localhost ~]$

Postfix 相關程序

[user1@localhost ~]$ ps aux | grep postfix
root       33345  0.0  0.1  38172  4500 ?        Ss   07:45   0:00 /usr/libexec/postfix/master -w
postfix    33346  0.0  0.2  45224  8216 ?        S    07:45   0:00 pickup -l -t unix -u
postfix    33347  0.0  0.2  45268  8316 ?        S    07:45   0:00 qmgr -l -t unix -u
user1      34034  0.0  0.0 221664  2212 pts/0    S+   07:54   0:00 grep --color=auto postfix
[user1@localhost ~]$ 

使用 postconf ( Postfix Configuration Utility ) 組態工具來檢查版本

[user1@localhost ~]$ postconf -d | grep mail_version
mail_version = 3.5.9
milter_macro_v = $mail_name $mail_version
[user1@localhost ~]$  


********************************************************************************

設定相關資訊

Postfix Documentation:https://www.postfix.org/documentation.html

主要設定文件:/etc/postfix/main.cf

設置郵件域名:在main.cf文件中,您可以設置myhostname和mydomain選項,以指定Postfix伺服器使用的主機名和域名。例如:

myhostname = mail.example.com

mydomain = example.com

設置發送郵件的IP地址:如果您的伺服器有多個IP地址,您可以通過在main.cf文件中設置inet_interfaces選項,指定Postfix伺服器使用哪個IP地址發送郵件。例如:

inet_interfaces = 192.168.1.100

設置接收電子郵件的位置:在main.cf文件中,您可以設置mydestination選項,以指定Postfix郵件伺服器接收郵件的位置。例如:

mydestination = $myhostname, localhost.$mydomain, $mydomain

這個設置可以讓Postfix郵件伺服器接收來自自己主機名、本地主機和所在域的郵件。

設置SMTP服務器:在main.cf文件中,您可以設置smtpd_banner和smtpd_helo_required等選項,來定義SMTP服務器的欄位和要求的EHLO/HELO信息。例如:

smtpd_banner = $myhostname ESMTP

smtpd_helo_required = yes

設置郵件交換方式:在main.cf文件中,您可以設置relayhost和mynetworks等選項,來定義Postfix郵件伺服器的郵件交換方式。例如:

relayhost = smtp.example.com

mynetworks = 192.168.1.0/24, 127.0.0.0/8

這個設置可以讓Postfix郵件伺服器將郵件發送到指定的SMTP主機,並且指定了可以訪問此郵件伺服器的IP地址範圍。

這些是Postfix郵件伺服器的一些常用設置選項,您可以根據您的具體需求和環境進行進一步的設置。

********************************************************************************

(完)

2023年4月5日 星期三

[研究]MTA (Mail Transfer Agent) 和 Mail Server 差別

[研究]MTA (Mail Transfer Agent) 和 Mail Server 差別

2023-04-05

這是和 ChatGPT的對談

********************************************************************************

MTA (Mail Transfer Agent) 和 Mail Server 差別?

MTA 的縮寫是 Mail Transfer Agent,意為郵件傳輸代理。

MTA(郵件傳輸代理)和郵件伺服器(Mail Server)是郵件系統中的兩個重要元素,它們有著不同的功能。

MTA 是一種軟件,它負責將電子郵件從發件人傳送到收件人的郵件伺服器。 MTA 確定收件人的電子郵件地址並確保郵件被正確路由到收件人的郵件伺服器。它通常是一個中央系統,處理所有郵件流量,包括外部和內部郵件。常見的 MTA 軟件包括 Sendmail、Postfix、Exim 等。

郵件伺服器(Mail Server)是一個具有存儲功能的軟件,它負責接收、存儲和傳送電子郵件。當 MTA 確定了郵件應該傳送到哪個郵件伺服器時,郵件伺服器就負責將郵件存儲起來,等待收件人下次登錄郵件帳戶時讀取。一些流行的郵件伺服器軟件包括 Microsoft Exchange、Postfix、Dovecot 等。

簡而言之,MTA 是負責郵件路由的軟件,而郵件伺服器是負責存儲和傳送電子郵件的軟件。MTA 和郵件伺服器通常會一起使用,以實現完整的郵件系統。

********************************************************************************

Sendmail、Postfix、Exim 算 MTA 或  Mail Server ? 為什麼 ?

Sendmail、Postfix 和 Exim 都是 MTA(Mail Transfer Agent),也稱為郵件傳輸代理,因為它們負責將郵件從發件人傳送到收件人。這些軟件可以協助 MTA 完成多種任務,例如通過 SMTP 協議與其他郵件系統通訊,檢查郵件標題和內容是否合法,解析郵件地址以確定郵件應該傳送到哪裡等。

郵件伺服器(Mail Server)則是另一種類型的軟件,它負責接收、存儲和傳送電子郵件。常見的郵件伺服器軟件包括 Microsoft Exchange、Dovecot 等。Sendmail、Postfix 和 Exim 都可以與郵件伺服器配合使用,以實現完整的郵件系統。

********************************************************************************

Sendmail、Postfix、Exim  算 Mail Server ? 不算 ? 為什麼 ?

Sendmail、Postfix、Exim 都是 MTA(Mail Transfer Agent),也就是郵件傳輸代理。它們是負責將郵件從發件人傳送到收件人的軟件,通常與 Mail Server 一起使用,以實現完整的郵件系統。

Mail Server 負責接收、存儲和傳送電子郵件,而 MTA 僅負責郵件的傳輸。因此,Sendmail、Postfix、Exim 都不算是 Mail Server,它們只是郵件系統中的一個組件,負責郵件傳輸的工作。與 Mail Server 一起使用,它們可以協助實現完整的郵件系統。

********************************************************************************

Sendmail 可以沒有 MailBox 而運作?

是的,Sendmail 可以運作而不需要 Mailbox。Sendmail 是一個郵件傳輸代理(MTA),它的主要功能是負責郵件的路由、傳輸和傳遞等任務。Sendmail 可以將郵件傳送到其他郵件伺服器,或者將郵件交給本地的 Mail Delivery Agent(MDA)進行處理。

MDA 負責將郵件存儲到本地的 Mailbox 中,以供使用者查看和管理。但是,Sendmail 本身不需要 Mailbox,因為它只是負責郵件的傳輸,而不是存儲。因此,即使沒有 Mailbox,Sendmail 仍然可以運作,只是無法提供本地郵件存儲的功能。

********************************************************************************

Microsoft Exchange Server 可以沒有 MailBox 而運作?

不完全正確。Microsoft Exchange Server 是一個郵件伺服器軟體,它的主要功能是處理電子郵件,包括郵件的路由、傳輸、傳遞、存儲等。在 Exchange Server 中,Mailbox 是一個重要的概念,它代表了每個使用者的郵件存儲位置。

因此,如果沒有 Mailbox,Exchange Server 就無法提供郵件存儲的功能,也就無法完全運作。但是,Exchange Server 也可以在一些特殊的情況下運作而不需要 Mailbox,例如:

Edge Transport Server:Exchange Server 中的 Edge Transport Server 是一個郵件傳輸代理,它負責郵件的路由、傳輸和傳遞等任務,但不需要 Mailbox。

Exchange Online Protection:Exchange Online Protection 是 Microsoft 提供的一個郵件安全服務,它可以與 Exchange Server 配合使用,提供郵件過濾、反垃圾郵件、反病毒等功能,但不需要 Mailbox。

總之,Exchange Server 在大多數情況下需要 Mailbox 才能完全運作,但在一些特殊的情況下,也可以運作而不需要 Mailbox。

********************************************************************************

Postfix 可以沒有 MailBox 而運作?

是的,Postfix 可以運作而不需要 Mailbox。Postfix 是一個郵件傳輸代理(MTA),它的主要功能是負責郵件的路由、傳輸和傳遞等任務。Postfix 可以將郵件傳送到其他郵件伺服器,或者將郵件交給本地的 Mail Delivery Agent(MDA)進行處理。

MDA 負責將郵件存儲到本地的 Mailbox 中,以供使用者查看和管理。但是,Postfix 本身不需要 Mailbox,因為它只是負責郵件的傳輸,而不是存儲。因此,即使沒有 Mailbox,Postfix 仍然可以運作,只是無法提供本地郵件存儲的功能。

********************************************************************************

請問那些軟體或套件,算 MTA ,但不算 Mail Server ?

以下是一些常見的 MTA 軟體或套件,它們專門負責郵件的路由、傳輸和傳遞等任務,通常不包含 Mail Server 的其他功能:

  • OpenSMTPD:一個安全、簡單的 MTA 軟體,支援多種郵件協定和安全機制,包括 SMTP、TLS、SASL 等。
  • Haraka:一個快速、可擴充的 MTA 軟體,支援多種郵件協定和擴充,包括 SMTP、ESMTP、MIME 等。
  • Exim MTA:Exim 也可以單獨作為 MTA 使用,而不需要安裝整個郵件伺服器軟體。

這些 MTA 軟體或套件通常只負責郵件的路由、傳輸和傳遞等任務,不包含 Mail Server 的其他功能,例如郵件存儲、使用者管理等。

********************************************************************************

請問 IIS SMTP 算 MTA 嗎 ?

是的,IIS SMTP(Internet Information Services Simple Mail Transfer Protocol)可以算作 MTA(Mail Transfer Agent),因為它負責將電子郵件從一個郵件伺服器傳輸到另一個郵件伺服器。IIS SMTP 是 Windows Server 中的一個角色,可以安裝在郵件伺服器上,並提供 SMTP 服務。

IIS SMTP 支援多種郵件協定和安全機制,包括 SMTP、TLS、SASL 等。它可以與其他郵件伺服器軟體或套件配合使用,例如 Exchange Server、Sendmail、Postfix、Exim 等,以實現郵件的路由、傳輸和傳遞等任務。因此,IIS SMTP 可以算作 MTA。

********************************************************************************

Exchange, Sendmail、Postfix、Exim  算 Mail Server ? 算 MTA ? 都算 ? 都不算 ? 算其中一中 ? 為什麼 ?

Exchange、Sendmail、Postfix、Exim 都可以算作 Mail Server,因為它們都是用來處理電子郵件的伺服器軟體。同時,它們也都包含 MTA(Mail Transfer Agent)功能,負責郵件的路由、傳輸和傳遞等任務。

因此,這些軟體或套件既可以算作 Mail Server,也可以算作 MTA。它們的主要功能是處理電子郵件,但其中的 MTA 功能是實現這個目標的重要組成部分。

********************************************************************************

請問那些軟體或套件,算 Mail Server,也算 MTA ?

以下是一些常見的 Mail Server 軟體或套件,它們同時也包含 MTA 功能:

  • Postfix:一個流行的郵件伺服器軟體,支援多種郵件協定和安全機制,包括 SMTP、TLS、SASL 等。
  • Sendmail:一個歷史悠久的郵件伺服器軟體,也是最早的 MTA 之一,支援多種郵件協定和擴充,包括 SMTP、ESMTP、MIME 等。
  • Exim:一個靈活、可擴充的郵件伺服器軟體,支援多種郵件協定和擴充,包括 SMTP、TLS、SASL、DKIM 等。
  • Qmail:一個安全、穩定的郵件伺服器軟體,也是最早的 MTA 之一,支援多種郵件協定和安全機制,包括 SMTP、TLS、SASL 等。

這些 Mail Server 軟體或套件都包含 MTA 功能,可以負責郵件的路由、傳輸和傳遞等任務。

********************************************************************************

Outlook 算 MTA ? Mail Server ? 為什麼 ?

Outlook 不是 MTA(Mail Transfer Agent)或 Mail Server,它是一個郵件客戶端軟件。Outlook 用戶可以使用它來接收、編寫和發送電子郵件,但 Outlook 本身不包含 Mail Server 或 MTA 的功能。

Outlook 通常使用 POP3 或 IMAP 協議與 Mail Server 通信,從而接收和發送電子郵件。Outlook 可以設定用戶的電子郵件帳戶,並通過 SMTP 協議將郵件發送到用戶所使用的 Mail Server。

因此,Outlook 是一個郵件客戶端軟件,它可以與 Mail Server 通信來收發電子郵件,但本身不是 MTA 或 Mail Server。

********************************************************************************

Web Mail 算 MTA ? Mail Server ? 為什麼 ?

Web Mail 不是 MTA(Mail Transfer Agent)或 Mail Server,它是一個基於瀏覽器的郵件客戶端軟件,用戶可以通過網頁來接收、編寫和發送電子郵件。

Web Mail 通常使用 POP3 或 IMAP 協議與 Mail Server 通信,從而接收和發送電子郵件。Web Mail 的後端通常是一個 Mail Server,但 Web Mail 本身不包含 Mail Server 或 MTA 的功能。

因此,Web Mail 是一個基於瀏覽器的郵件客戶端軟件,它可以與 Mail Server 通信來收發電子郵件,但本身不是 MTA 或 Mail Server。

********************************************************************************

Mail Server 包含 MTA ? 或 MTA 包含 Mail Server ? MTA 等於 Mail Server ? MTA 和 Mail Server 互相不包含 ? 

通常情況下,Mail Server 和 MTA 是兩個獨立的元素,它們互相不包含。Mail Server 是負責接收、存儲和傳送電子郵件的軟件,而 MTA 是負責將郵件從發件人傳送到收件人的軟件。Mail Server 需要 MTA 協助傳送和接收電子郵件,而 MTA 則需要 Mail Server 存儲和管理郵件。

然而,在某些情況下,Mail Server 和 MTA 可能會被整合到一個軟件包中。例如,一些郵件伺服器軟件可能包含 MTA 的功能,這樣可以簡化整個郵件系統的架構。但是,在這種情況下,Mail Server 和 MTA 仍然是兩個不同的元素,只是它們被整合到同一個軟件包中。

因此,總的來說,Mail Server 和 MTA 是兩個不同的元素,它們通常是分開使用的。

********************************************************************************

Microsoft Exchange、Dovecot 算 MTA ? 不算 ? 為什麼 ?

Microsoft Exchange 和 Dovecot 都是郵件伺服器(Mail Server)軟件,它們負責接收、存儲和傳送電子郵件。因此,它們不是 MTA(Mail Transfer Agent)。

MTA 是負責將郵件從發件人傳送到收件人的軟件,它們通常與 Mail Server 一起使用,以實現完整的郵件系統。Sendmail、Postfix 和 Exim 等軟件就是常見的 MTA。

總之,Microsoft Exchange 和 Dovecot 是 Mail Server 而非 MTA,它們與 MTA 通常一起使用,以實現完整的郵件系統。

********************************************************************************

Microsoft Exchange Server 是否包含 MTA ?

是的,Microsoft Exchange Server 包含 MTA(Mail Transfer Agent),它負責將電子郵件從一個郵件伺服器傳輸到另一個郵件伺服器。 Exchange Server 中的 MTA 稱為 Transport Service,它處理郵件路由、傳輸和傳遞。

********************************************************************************

請畫一張架構圖,包含 MTA, Mail Server, Mail Client

以下是一個簡單的郵件系統架構圖,包括 MTA、Mail Server 和 Mail Client:

                    ┌───────┐      ┌───────┐      ┌───────┐
               ┌────┤ MTA   ├─────►│ Mail  ├─────►│ Mail  │
               │    └───────┘      │ Server│      │ Client│
               │                     └───────┘      └───────┘
┌──────────┐   │
│ Sender's  ├───── SMTP ──────┐
│ Mail     │   │              ▼
└──────────┘   │        ┌──────────┐
               │        │ Receiver's│
               └────────┤ Mail     │
                        │ Server   │
                        └──────────┘


寄件人的 Mail Client 將郵件通過 SMTP 協議發送給發件人的 Mail Server,然後再由發件人的 Mail Server 使用 SMTP 協議將郵件發送給收件人的 Mail Server。收件人的 Mail Client 通過 POP3 或 IMAP 協議從收件人的 Mail Server 拉取郵件。在這個過程中,MTA 負責郵件的傳輸,而 Mail Server 負責郵件的接收、存儲和轉發,Mail Client 則負責用戶與郵件系統的互動。

********************************************************************************

請畫一張架構圖,包含 MTA, Mail Server, Mail Client, SMTP, POP3, IMAP, Outlook, WebMail ?

以下是一個郵件系統架構圖,包括 MTA、Mail Server、Mail Client、SMTP、POP3、IMAP、Outlook 和 WebMail:

                                  ┌───────────────┐
                                  │ Internet      │
                                  │ SMTP, POP3, IMAP  │
                                  └───────────────┘
                                           ▲
                                           │
                             SMTP, POP3, IMAP protocols
                                           │
┌───────────┐      SMTP     ┌───────────────┐     POP3/IMAP     ┌──────────┐
│ Sender's   ├────────────►│ Sender's      ├──────────────────►│Receiver's│
│ Mail      │              │ Mail Server   │                  │ Mail    │
└───────────┘◄───────────┐└───────────────┘◄─────────────────┤ Server  │
                        SMTP, POP3, IMAP protocols            └──────────┘
                                           │
                                           │
                                           ▼
                                ┌───────────────────────┐
                                │ Mail Client (Outlook)  │
                                │ SMTP, POP3, IMAP      │
                                └───────────────────────┘
                                           ▲
                                           │
                                SMTP, POP3, IMAP protocols
                                           │
                                           ▼
                                 ┌───────────────────────┐
                                 │ WebMail               │
                                 │ SMTP, POP3, IMAP      │
                                 └───────────────────────┘


寄件人的 Mail Client(如 Outlook)使用 SMTP 協議將郵件發送到發件人的 Mail Server。Mail Server 然後使用 SMTP 協議將郵件轉發到收件人的 Mail Server。收件人的 Mail Client(如 Outlook 或 WebMail)可以使用 POP3 或 IMAP 協議從收件人的 Mail Server 拉取郵件。

Outlook 和 WebMail 都是郵件客戶端軟件,可以通過瀏覽器或本地應用程序來使用。Outlook 和 WebMail 使用 SMTP、POP3 和 IMAP 協議與 Mail Server 進行通信,從而接收、編寫和發送電子郵件。

因此,MTA 負責郵件的傳輸,Mail Server 負責郵件的接收、存儲和轉發,Mail Client(如 Outlook 和 WebMail)負責用戶與郵件系統的互動,SMTP、POP3 和 IMAP 協議則負責不同組件之間的通信。

********************************************************************************

請問  MTA 誰發明的 ? 年分 ?

MTA(Mail Transfer Agent)最早的實現是由Eric Allman在1981年編寫的郵件傳輸代理Sendmail。 Sendmail是Unix系統上使用最廣泛的郵件傳輸代理之一,也是第一個在互聯網上廣泛使用的郵件服務器軟件。因此,可以認為MTA的概念和實現最早起源於Sendmail。

這個資訊有來源網址 ?

這個信息的來源是來自於Sendmail官方網站的歷史頁面,您可以訪問以下鏈接查看:

https://www.sendmail.com/company/about-sendmail/sendmail-history/
自動轉向
https://www.proofpoint.com/us/products/email-protection/open-source-email-solution

sendmail 和 proofpoint 關係 ?

Sendmail 和 Proofpoint 都是電子郵件相關的軟件或服務,但它們是不同的公司和產品,沒有直接的關係。(因為 ChatGPT資訊庫只到 2021年9月,上面網址自動轉址,疑似有某種關係)

Sendmail 是一個開源的郵件傳輸代理軟件,最初由 Eric Allman 開發,是一個歷史悠久的郵件系統軟件,在 Unix/Linux 系統中被廣泛使用。

Proofpoint 是一家安全軟件公司,提供包括電子郵件安全、數據保護、網絡安全等方面的解決方案和服務。其中,Proofpoint Enterprise Protection 是一款企業級電子郵件安全產品,提供垃圾郵件過濾、惡意軟件防護、數據洩露防護等功能,幫助企業保護電子郵件系統的安全。

雖然 Sendmail 和 Proofpoint 都是與電子郵件有關的軟件或服務,但它們是不同的公司和產品,沒有直接的聯繫或關係。

https://zh.wikipedia.org/zh-tw/%E9%82%AE%E4%BB%B6%E4%BC%A0%E8%BE%93%E4%BB%A3%E7%90%86

********************************************************************************

MTA 一定會有 mailbox ?

MTA(Mail Transfer Agent)是一種負責郵件傳輸的軟件,它主要負責將發件人的郵件從源郵件服務器傳輸到目標郵件服務器,並把郵件存儲到目標服務器上的收件人的mailbox中。因此,MTA 通常不直接涉及 mailbox 的創建和管理,而是通過其他軟件組件(如郵件投遞代理或郵件交付代理)來完成 mailbox 的創建和管理。

在郵件系統中,mailbox 是存儲用戶郵件的一個文件或文件夾,它通常位於郵件服務器上。當用戶收到新郵件時,MTA 會將郵件傳輸到用戶的 mailbox 中。而用戶可以通過郵件客戶端(如 Outlook、Thunderbird、Webmail等)來查看、讀取和管理自己的 mailbox 中的郵件。

因此,MTA 本身並不一定包含 mailbox,但它是郵件系統中重要的組成部分,負責將郵件傳輸到目標服務器和郵箱中。而具體的郵箱管理通常由其他軟件組件或郵件客戶端來完成。

********************************************************************************

Mail Server 一定會有 mailbox ?

Mail Server 是一種負責接收、存儲、發送和投遞郵件的服務器軟件。 Mail Server 通常需要有 Mailbox 功能來存儲郵件,因為當一封郵件到達郵件服務器時,它需要存儲在某個地方等待收件人查收。 Mailbox 就是用來存儲這些郵件的地方。

因此,Mail Server 通常會包含 Mailbox 功能,用於存儲郵件並為用戶提供郵件服務。但是,不是所有 Mail Server 都需要提供 Mailbox 功能,例如 SMTP Relay Server 只負責郵件轉發,不需要存儲郵件。

需要注意的是,Mail Server 的 Mailbox 功能可能由不同的組件實現,例如基於POP3協議的郵件服務器使用單個文件或多個文件夾來存儲郵件,而基於IMAP協議的郵件服務器使用一個統一的文件夾結構來存儲郵件。因此,具體實現方式可能因郵件服務器軟件和使用的協議而異。

********************************************************************************

Mail Server 誰提出 ? 年分 ? 來源網址 ?

Mail Server 的概念很早就出現了,最早的電子郵件系統 ARPANET 中就有 Mail Server 的雛形。在 1980 年代,隨著互聯網的發展,郵件系統變得越來越普及,也出現了很多商業郵件服務器軟件。其中比較知名的有 Microsoft Exchange Server 和 Lotus Notes/Domino 等。

但具體誰提出 Mail Server 這個概念,很難有確切的資料。因為這個概念的提出是隨著電子郵件的發展和應用而逐漸形成的,是由很多人和機構共同推動的。

參考資料:
https://www.lifewire.com/what-is-an-email-server-1171090
https://www.computerhope.com/jargon/m/mail-serv.htm
ChatGPT給的兩個網址都不在了

********************************************************************************

最早 Mail Server 的論文 ? 最早 MTA 的論文 ?

關於最早的電子郵件服務器和MTA的論文,由於互聯網的早期發展歷程已經超過了40年,相關的論文和資料可能已經很難找到或者已經不再存在。但是我們可以簡單回顧一下電子郵件的發展歷程:

  • 1960年代:第一個郵件系統MAILBOX於1965年問世,它只能在同一台計算機上的用戶之間發送郵件。
  • 1970年代:在ARPANET網絡上出現了第一個跨計算機的郵件系統MAIL程序,郵件首次得以在網絡上傳遞。
  • 1980年代:SMTP協議被發明,它是現代郵件系統的基礎協議。 Sendmail是第一個基於SMTP協議實現的MTA,它於1981年發布。
  • 1990年代:隨著互聯網的普及,越來越多的郵件系統和MTA被開發出來,如Postfix、Exim、Qmail等。
  • 2000年代至今:隨著雲計算和移動互聯網的興起,越來越多的郵件服務商如Google、Microsoft等提供了郵件服務和MTA,同時也出現了更多基於雲計算和移動互聯網的郵件系統和MTA。

總之,郵件系統和MTA是一個長期發展的過程,由多個人和組織共同推動,很難具體歸功於某個人或者論文。

********************************************************************************

最早同時提到  Mail Server 和 MTA 的論文 ? 或文章 ? 網址 ?

根據我的搜尋,最早同時提到 Mail Server 和 MTA 的論文好像比較難找到,因為在電子郵件相關技術發展的初期,這些名詞還沒有被普及使用。不過,我找到了一篇 1977 年發表於《Communications of the ACM》期刊的論文,題目為 "A Protocol for Packet Network Intercommunication",這篇論文提出了一個名為 "MSG" 的郵件系統,可能是最早描述郵件伺服器和郵件傳輸代理的論文之一。這個 MSG 系統在很多方面都先進於當時其他的電子郵件系統,並且提供了一些現代郵件系統中常見的功能,如地址解析、訊息排程和傳輸安全等。

不過,需要注意的是,在早期的電子郵件系統中,Mail Server 和 MTA 的功能往往被合併到同一個程式中實現,因此在當時的文獻中可能會看到這兩個名詞被交替使用或混淆。

********************************************************************************

你確定 Mail Server 和 MTA 是不同的 ?

是的,Mail Server和MTA是不同的概念。

Mail Server是一個應用程式,它提供了電子郵件服務,包括管理電子郵件帳戶、存儲和檢索電子郵件等。Mail Server通常包括MTA、MDA、以及MUA等組件。

而MTA是郵件系統中的一個重要組件,負責接收、轉發、發送電子郵件。MTA的主要功能是路由電子郵件和轉發電子郵件到其他MTA或最終的Mail Server。MTA通常運行在郵件交換網絡上,並且通過SMTP協議與其他MTA進行通信。

因此,Mail Server和MTA雖然密切相關,但它們是不同的概念,各自擁有自己的功能和定位。

********************************************************************************

Mail Server 和 MTA 是不同的資訊 的 來源網址 ?

以下是一些關於 Mail Server 和 MTA 是不同的資訊的來源網址:

https://www.quora.com/What-is-the-difference-between-an-email-server-and-an-MTA-Mail-Transfer-Agent
Page not found.

What is an Email Server (MTA)? - Definition from Techopedia
https://www.techopedia.com/definition/28005/email-server

https://searchdatacenter.techtarget.com/definition/Mail-Transport-Agent-MTA
Page not found.

Message transfer agent - Wikipedia
https://en.wikipedia.org/wiki/Mail_transfer_agent

這些來源都強調 Mail Server 和 MTA 是不同的,而且有不同的功能。Mail Server 是用來處理電子郵件的收發和儲存等功能,而 MTA 則是用來將電子郵件從一個郵件伺服器傳送到另一個郵件伺服器的工具。

********************************************************************************

(完)

2023年3月28日 星期二

[研究]Exim 4.96 Free Mail Server 免費郵件伺服器安裝 (Ubuntu 22.04.2 LTS)

[研究]Exim 4.96 Free Mail Server 免費郵件伺服器安裝 (Ubuntu 22.04.2 LTS)

2023-03-28

Exim Internet Mailer 官方網站
https://www.exim.org/

根據這裡資訊,exim 是目前排名第一佔有率的 Mail Server,勝過 Postfix 和 sendmail。

Mail (MX) Server Survey February 1st, 2023
https://secure1.securityspace.com/s_survey/data/man.202301/mxsurvey.html

安裝情況
user1@ubuntu22042:~$ sudo apt-get update -y (非必須,敝人省略)
user1@ubuntu22042:~$ sudo apt-get install exim4 -y [sudo] password for user1: Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: bsd-mailx exim4-base exim4-config exim4-daemon-heavy libevent-2.1-7 libgnutls-dane0 liblockfile-bin liblockfile1 libmysqlclient21 libpq5 libunbound8 mysql-common Suggested packages: exim4-doc-html | exim4-doc-info eximon4 spf-tools-perl swaks The following NEW packages will be installed: bsd-mailx exim4 exim4-base exim4-config exim4-daemon-heavy libevent-2.1-7 libgnutls-dane0 liblockfile-bin liblockfile1 libmysqlclient21 libpq5 libunbound8 mysql-common 0 upgraded, 13 newly installed, 0 to remove and 1 not upgraded. Need to get 3976 kB of archives. After this operation, 13.7 MB of additional disk space will be used. Get:1 http://tw.archive.ubuntu.com/ubuntu jammy-updates/main amd64 exim4-config all 4.95-4ubuntu2.2 [252 kB] Get:2 http://tw.archive.ubuntu.com/ubuntu jammy-updates/main amd64 exim4-base amd64 4.95-4ubuntu2.2 [947 kB] Get:3 http://tw.archive.ubuntu.com/ubuntu jammy/main amd64 libevent-2.1-7 amd64 2.1.12-stable-1build3 [148 kB] Get:4 http://tw.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libunbound8 amd64 1.13.1-1ubuntu5.3 [395 kB] Get:5 http://tw.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libgnutls-dane0 amd64 3.7.3-4ubuntu1.2 [22.6 kB] Get:6 http://tw.archive.ubuntu.com/ubuntu jammy/main amd64 mysql-common all 5.8+1.0.8 [7212 B] Get:7 http://tw.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libmysqlclient21 amd64 8.0.32-0ubuntu0.22.04.2 [1299 kB] Get:8 http://tw.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpq5 amd64 14.7-0ubuntu0.22.04.1 [141 kB] Get:9 http://tw.archive.ubuntu.com/ubuntu jammy-updates/main amd64 exim4-daemon-heavy amd64 4.95-4ubuntu2.2 [668 kB] Get:10 http://tw.archive.ubuntu.com/ubuntu jammy/main amd64 liblockfile-bin amd64 1.17-1build2 [11.7 kB] Get:11 http://tw.archive.ubuntu.com/ubuntu jammy/main amd64 liblockfile1 amd64 1.17-1build2 [7058 B] Get:12 http://tw.archive.ubuntu.com/ubuntu jammy/main amd64 bsd-mailx amd64 8.1.2-0.20180807cvs-2build2 [69.6 kB] Get:13 http://tw.archive.ubuntu.com/ubuntu jammy-updates/main amd64 exim4 all 4.95-4ubuntu2.2 [7582 B] Fetched 3976 kB in 1s (4176 kB/s) Preconfiguring packages ... Selecting previously unselected package exim4-config. (Reading database ... 176153 files and directories currently installed.) Preparing to unpack .../00-exim4-config_4.95-4ubuntu2.2_all.deb ... Unpacking exim4-config (4.95-4ubuntu2.2) ... Selecting previously unselected package exim4-base. Preparing to unpack .../01-exim4-base_4.95-4ubuntu2.2_amd64.deb ... Unpacking exim4-base (4.95-4ubuntu2.2) ... Selecting previously unselected package libevent-2.1-7:amd64. Preparing to unpack .../02-libevent-2.1-7_2.1.12-stable-1build3_amd64.deb ... Unpacking libevent-2.1-7:amd64 (2.1.12-stable-1build3) ... Selecting previously unselected package libunbound8:amd64. Preparing to unpack .../03-libunbound8_1.13.1-1ubuntu5.3_amd64.deb ... Unpacking libunbound8:amd64 (1.13.1-1ubuntu5.3) ... Selecting previously unselected package libgnutls-dane0:amd64. Preparing to unpack .../04-libgnutls-dane0_3.7.3-4ubuntu1.2_amd64.deb ... Unpacking libgnutls-dane0:amd64 (3.7.3-4ubuntu1.2) ... Selecting previously unselected package mysql-common. Preparing to unpack .../05-mysql-common_5.8+1.0.8_all.deb ... Unpacking mysql-common (5.8+1.0.8) ... Selecting previously unselected package libmysqlclient21:amd64. Preparing to unpack .../06-libmysqlclient21_8.0.32-0ubuntu0.22.04.2_amd64.deb ... Unpacking libmysqlclient21:amd64 (8.0.32-0ubuntu0.22.04.2) ... Selecting previously unselected package libpq5:amd64. Preparing to unpack .../07-libpq5_14.7-0ubuntu0.22.04.1_amd64.deb ... Unpacking libpq5:amd64 (14.7-0ubuntu0.22.04.1) ... Selecting previously unselected package exim4-daemon-heavy. Preparing to unpack .../08-exim4-daemon-heavy_4.95-4ubuntu2.2_amd64.deb ... Unpacking exim4-daemon-heavy (4.95-4ubuntu2.2) ... Selecting previously unselected package liblockfile-bin. Preparing to unpack .../09-liblockfile-bin_1.17-1build2_amd64.deb ... Unpacking liblockfile-bin (1.17-1build2) ... Selecting previously unselected package liblockfile1:amd64. Preparing to unpack .../10-liblockfile1_1.17-1build2_amd64.deb ... Unpacking liblockfile1:amd64 (1.17-1build2) ... Selecting previously unselected package bsd-mailx. Preparing to unpack .../11-bsd-mailx_8.1.2-0.20180807cvs-2build2_amd64.deb ... Unpacking bsd-mailx (8.1.2-0.20180807cvs-2build2) ... Selecting previously unselected package exim4. Preparing to unpack .../12-exim4_4.95-4ubuntu2.2_all.deb ... Unpacking exim4 (4.95-4ubuntu2.2) ... Setting up mysql-common (5.8+1.0.8) ... update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode Setting up libmysqlclient21:amd64 (8.0.32-0ubuntu0.22.04.2) ... Setting up liblockfile-bin (1.17-1build2) ... Setting up libpq5:amd64 (14.7-0ubuntu0.22.04.1) ... Setting up libevent-2.1-7:amd64 (2.1.12-stable-1build3) ... Setting up exim4-config (4.95-4ubuntu2.2) ... Adding system-user for exim (v4) Setting up liblockfile1:amd64 (1.17-1build2) ... Setting up exim4-base (4.95-4ubuntu2.2) ... exim: DB upgrade, deleting hints-db Created symlink /etc/systemd/system/timers.target.wants/exim4-base.timer → /lib/systemd/system/exim4-base.timer. exim4-base.service is a disabled or a static unit, not starting it. Setting up libunbound8:amd64 (1.13.1-1ubuntu5.3) ... Setting up libgnutls-dane0:amd64 (3.7.3-4ubuntu1.2) ... Setting up exim4-daemon-heavy (4.95-4ubuntu2.2) ... Setting up exim4 (4.95-4ubuntu2.2) ... Setting up bsd-mailx (8.1.2-0.20180807cvs-2build2) ... update-alternatives: using /usr/bin/bsd-mailx to provide /usr/bin/mailx (mailx) in auto mode Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... user1@ubuntu22042:~$ sudo dpkg-reconfigure exim4-config user1@ubuntu22042:~$ sudo service exim4 restart user1@ubuntu22042:~$ sudo service exim4 status ● exim4.service - LSB: exim Mail Transport Agent Loaded: loaded (/etc/init.d/exim4; generated) Active: active (running) since Thu 2023-03-09 09:12:11 CST; 11s ago Docs: man:systemd-sysv-generator(8) Process: 4114 ExecStart=/etc/init.d/exim4 start (code=exited, status=0/SUC> Tasks: 1 (limit: 4573) Memory: 10.9M CPU: 331ms CGroup: /system.slice/exim4.service └─4364 /usr/sbin/exim4 -bd -q30m 三 09 09:12:11 ubuntu22042 systemd[1]: Starting LSB: exim Mail Transport Age> 三 09 09:12:11 ubuntu22042 exim4[4114]: * Starting MTA 三 09 09:12:11 ubuntu22042 exim4[4114]: ...done. 三 09 09:12:11 ubuntu22042 systemd[1]: Started LSB: exim Mail Transport Agen> user1@ubuntu22042:~$ sudo systemctl enable exim4 exim4.service is not a native service, redirecting to systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable exim4 user1@ubuntu22042:~$



其中會有設定畫面
sudo dpkg-reconfigure exim4-config  









********************************************************************************

(完)

2022年12月19日 星期一

[研究][ASP.NET 使用 System.Net.Mail.MailMessage 元件 + MDaemon 22.0.3 郵件伺服器寄非加簽信

[研究][ASP.NET 使用 System.Net.Mail.MailMessage 元件 + MDaemon 22.0.3 郵件伺服器寄非加簽信

2022-12-19

[研究]Alt-N MDaemon Email Server 22.0.3郵件伺服器 30 天試用版安裝 (Windows Server 2022)
http://shaurong.blogspot.com/2022/12/alt-n-mdaemon-email-server-2203-30.html
架設完成後,請允許 relay (預設不允許)

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C#

********************************************************************************

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:Button ID="Button_SendMail" runat="server" Text="Send" OnClick="Button_SendMail_Click" />
            <br />
            <asp:Label ID="Label_MSG1" runat="server"></asp:Label>
        </div>
    </form>
</body>
</html>



下面信件主旨、內容、寄信者、收信者、IP、寄信長號、密碼請依據實際情況修改。

Default.aspx.cs

using System;
//----------------------------------------
//1.先在專案中加入組件參考:System.Security
//2.設定 using 以下兩個命名空間 System.Security 和 System.Net.Mail.MailMessage
//using MailMessage = System.Web.Mail.MailMessage; ///過時
using MailMessage = System.Net.Mail.MailMessage;

namespace WebApplication1
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button_SendMail_Click(object sender, EventArgs e)
        {

            //https://learn.microsoft.com/zh-tw/dotnet/api/system.net.mail.mailmessage?view=netframework-4.8

            // public MailMessage (string from, string to, string subject, string body);
            MailMessage message = new MailMessage(
                "jane@contoso.com",
                "user1@contoso.com",
"Quarterly data report.", "See the attached spreadsheet.");
string smtpServer = "10.3.99.121"; int smtpPort = 25; string mailAccount = "user1"; string mailPwd = "1234"; System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient( smtpServer, smtpPort) { Credentials = new System.Net.NetworkCredential( mailAccount, mailPwd) }; try { // UseDefaultCredentials如果 屬性設定為 false, ,則連接到伺服器時,屬性中所 Credentials 設定的值將會用於認證。 // UseDefaultCredentials如果 屬性設定 false 為 ,而且 Credentials 屬性尚未設定,則郵件會以匿名方式傳送至伺服器。 client.UseDefaultCredentials = true; // 根據驗證程序,遠端憑證是無效的。=> 會出錯,下面這一行必須註解掉 // 原因:mail server和client使用ssl連線,但ssl憑證並沒有經過認證(ex:自簽憑證 Self Signed Certifcate) // client.EnableSsl = true; // 解決「根據驗證程序,遠端憑證是無效的。」,不管驗證結果 true 或 false,都當 true //ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; //ServicePointManager.ServerCertificateValidationCallback += delegate { return true; }; System.Net.ServicePointManager.ServerCertificateValidationCallback += delegate { return true; }; client.EnableSsl = true; // MDaemon 22.0.3 client.Send(message); Label_MSG1.ForeColor = System.Drawing.Color.Green; Label_MSG1.Text = DateTime.Now.ToString() + " 寄信成功。"; } catch (Exception ex) { Label_MSG1.ForeColor = System.Drawing.Color.Red; Label_MSG1.Text = "不明錯誤。"; if (ex != null) Label_MSG1.Text = ex.Message.ToString(); } } } }

Relay 沒有允許 (預設)

From 的 Email 若是 MDaemon 上的,會出現錯誤。

SMTP 伺服器需要安全連接,或用戶端未經驗證。 伺服器回應為: 5.7.0 Authentication required

From 的 Email 若非 MDaemon 上的,會出現錯誤。

無法使用信箱。 伺服器回應為: 5.1.1 Recipient unknown


Relay 允許後

實際測試,client.EnableSsl = false; 也可以。

實際測試,
client.UseDefaultCredentials = false;
client.EnableSsl = true;
也可以。

實際測試,
client.UseDefaultCredentials = false;
client.EnableSsl = false;
也可以。

(完)

相關

2022年12月12日 星期一

[研究] Exchange Server 2019 電子郵件伺服器(Mail Server)安裝(一)(Windows 2022)

[研究] Exchange Server 2019 電子郵件伺服器(Mail Server)安裝(一)(Windows Server 2022)

2022-12-09

Click圖片可以看100%原始圖

Exchange Server檔 | Microsoft Learn

Exchange Server 2019-Step by Step Installation on Windows Server 2019.pdf
https://gallery.technet.microsoft.com/office/Exchange-Server-2019-Step-d6f6fc48/file/205474/1/Exchange%20Server%202019-Step%20by%20Step%20Installation%20on%20Windows%20Server%202019.pdf

Exchange 2019 架構
https://docs.microsoft.com/zh-tw/Exchange/architecture/architecture?view=exchserver-2019

Exchange Server 2019 安裝
https://technet.microsoft.com/zh-tw/library/mt170645(v=exchg.160).aspx
https://docs.microsoft.com/zh-tw/Exchange/exchange-server?view=exchserver-2019
https://gallery.technet.microsoft.com/office/Exchange-Server-2019-Step-d6f6fc48

下載
https://docs.microsoft.com/zh-tw/exchange/exchange-server?view=exchserver-2019

系統需求
https://technet.microsoft.com/zh-tw/library/aa996719(v=exchg.160).aspx
https://docs.microsoft.com/zh-tw/Exchange/plan-and-deploy/system-requirements?view=exchserver-2019
.NET Framework 需要 4.7.2 版
Mailbox: 128GB minimum recommended (系統效能不足時,有時候會出現「要求已經逾時」的畫面,2 vCPU + 10GB vRAM 的 VM 可能會如此)

安裝先決條件
https://technet.microsoft.com/zh-tw/library/bb691354(v=exchg.160).aspx
https://docs.microsoft.com/zh-tw/Exchange/plan-and-deploy/prerequisites?view=exchserver-2019

這裡要注意一下,網頁上說執行 Install-WindowsFeature RSAT-ADDS 安裝 AD,這是在已經有 AD 主機和 AD 環境的情況下

如果目前沒有 AD 環境,測試安裝的這台要當 AD 主機 + Exchange Server 2019,要先在 PowerShell 執行 Install-WindowsFeature  AD-Domain-Services 來安裝 AD,然後再  Install-WindowsFeature RSAT-ADDS。

前一次因此安裝出問題

[研究] Exchange Server 2016 安裝 (Windows 2012 R2)(失敗)
http://shaurong.blogspot.tw/2016/05/exchange-server-2016-windows-2012-r2.html

1.安裝 .NET 4.7.2

Exchange Server 2019 只支援 .NET Framework 4.7.2,不支援更早版本。
Windows Server 2019 預設已經安裝 .NET Framework 4.7.2,所以不用再安裝。

2.安裝 AD

在 PowerShell 執行 Install-WindowsFeature  AD-Domain-Services 來安裝 AD (註1),然後再  Install-WindowsFeature RSAT-ADDS (註2)。

[研究] Install-WindowsFeature RSAT-ADDS 在伺服器管理員安裝畫面勾選了甚麼

(下圖)Windows Server 2022上



(註1) 用圖形介面安裝亦可
[研究] Active Directory 網域服務安裝 (Windows Server 2019)
https://shaurong.blogspot.com/2018/12/active-directory-windows-server-2019.html




(註2)
在 PowerShell 執行下面命令
Install-WindowsFeature RSAT-ADDS





[研究] Install-WindowsFeature RSAT-ADDS 在伺服器管理員安裝畫面勾選了甚麼
http://shaurong.blogspot.com/2016/05/install-windowsfeature-rsat-adds.html

3.安裝信箱伺服器角色

Install-WindowsFeature NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation, RSAT-ADDS


4.安裝 Unified Communications Managed API 4.0 Runtime (UCMA)
https://www.microsoft.com/zh-tw/download/details.aspx?id=34992






下載安裝
Visual C++ Redistributable Packages for Visual Studio 2013
https://www.microsoft.com/en-us/download/details.aspx?id=40784


安裝 IIS URL 重寫模組

6.放入 Exchange Server 2019 iso

6.1 Extend the Active Directory schema 安裝

「系統管理員:命令提示字元」下,執行
Setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms

如果是 Exchange Server 2019 CU12 版 (累績更新 12 版),參數為
Setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms_DiagnosticDataON





電腦必須重新啟動才可以繼續安裝程式
http://technet.microsoft.com/library(EXCHG.150)/ms.exch.setupreadiness.RebootPending.aspx


6.2 Prepare Active Directory 安裝

「系統管理員:命令提示字元」下,執行
Setup.exe /PrepareAD /OrganizationName:”MSTechGuru” /IAcceptExchangeServerLicenseTerms

Exchange Server 2019 CU12 請改執行
Setup.exe /PrepareAD /OrganizationName:"MSTechGuru" /IAcceptExchangeServerLicenseTerms_DiagnosticDataON

未偵測到 Exchange 2013 伺服器 [NoE15ServerWarning]
http://technet.microsoft.com/library(EXCHG.150)/ms.exch.setupreadiness.NoE15ServerWarning.aspx



6.3 Prepare Active Directory domains 安裝

「系統管理員:命令提示字元」下,執行
Setup.exe /PrepareAllDomains /IAcceptExchangeServerLicenseTerms

Exchange Server 2019 CU12版請改用
Setup.exe /PrepareAllDomains /IAcceptExchangeServerLicenseTerms_DiagnosticDataON






6.4 開始安裝 Exchange Server 2019

























**********



Exchange Server 安裝後工作
2022/11/09


**********

建議可直接看這篇,不用 PowerShell

[研究] Exchange Server 2019 v15.2電子郵件伺服器(Mail Server)安裝(二)(Windows 2022)

(完)

相關

[研究]Exchange Server 2019 v15.2電子郵件伺服器(Mail Server)安裝(二)(Windows 2022)

[研究]Exchange Server 2019 電子郵件伺服器(Mail Server)安裝(一)(Windows 2022)

[研究]Exchange Server 2019 v15電子郵件伺服器(Mail Server)安裝必要條件 (Windows 2022)
https://shaurong.blogspot.com/2022/12/exchange-server-2019-v15-mail-server.html

[研究] Exchange Server 2019 郵件伺服器 (Mail Server) 安裝 (Windows Server 2019)
https://shaurong.blogspot.com/2018/12/exchange-server-2019-mail-server.html

[研究] Exchange Server 2016 郵件伺服器 (Mail Server) 安裝 (Windows 2012 R2)
http://shaurong.blogspot.com/2016/05/exchange-server-2016-windows-2012-r2_13.html

[研究 Exchange Server 2013 with Service Pack 1 郵件伺服器 (Mail Server) 安裝 (Windows 2012 R2)
http://shaurong.blogspot.com/2016/05/exchange-server-2013-with-service-pack.html