Skip to content
WONGCW 網誌
  • 首頁
  • 論壇
  • 微博
  • 壁紙下載
  • 免費圖床
  • 視頻下載
  • 聊天室
  • SEO工具
  • 支援中心
  • 表格製作
  • More
    • 在線名片
    • 網頁搜索
    • 天氣預報
    • 二維碼生成器
    • WordPress 插件及主題下載
  • Search Icon

WONGCW 網誌

記錄生活經驗與點滴

CentOS7 安裝 iRedMail Mail Server

CentOS7 安裝 iRedMail Mail Server

2018-09-09 Comments 0 Comment
  • 安裝環境 : CentOS Linux release 7.5.1804 (Core)
  • iRedMail 0.9.8
  • IP : 172.21.20.253
  • DN : iredmail.ichiayi.com
  • hostname : iredmail

環境準備

  • 關閉 selinux

    vi /etc/selinux/config
    :
    SELINUX=disabled
  • 設定 /etc/sysconfig/network

    HOSTNAME=iredmail.ichiayi.com
  • 設定 /etc/hosts

    127.0.0.1   iredmail.ichiayi.com iredmail localhost localhost.localdomain
  • 設定 /etc/hostname

    iredmail.ichiayi.com
  • 重新開機

    sync;sync;sync;reboot

下載安裝 iRedMail

su - root
yum install wget bzip2
cd /root/
wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.8.tar.bz2
tar xjf iRedMail-0.9.8.tar.bz2
cd /root/iRedMail-0.9.8/
bash iRedMail.sh
  • 安裝完成最後更新完成掃毒病毒碼 daily.cld 之後, 要重新開機所有服務才能正常啟動

    sync;sync;sync;reboot
  • 如果執行安裝時一直出現 /etc/hosts 的設定錯誤, 請先用

    hostname -f

    是否能夠正確出現標準 FQDN 格式 Exp. iredmai.ichiayi.com

  • 如果是安裝在中國機房, 因為 iredmail.org 被 GFW 封鎖, 所以要改用以下語法

    IREDMAIL_EPEL_MIRROR='http://mirrors.aliyun.com/epel'
    IREDMAIL_MIRROR='https://dl.iredmail.org' bash iRedMail.sh
  • 安裝完成後重要資訊會產生在 /root/iRedMail-0.9.8/iRedMail.tips 檔案內

相關設定與驗證測試

  • DNS : MX / DKIM / SPF 設定
  • IP 反查設定 → 找 ISP 協助
  • 設定 aliases domain 的方式 – https://docs.iredmail.org/sql.add.alias.domain.html SQL 語法
  • 設定 aliases (自動轉寄) 的方式 – https://docs.iredmail.org/user.alias.address.html SQL 語法
  • 設定 greylisting 白名單的方式 – https://docs.iredmail.org/manage.iredapd.html#greylisting
    1. iredapd.greylisting_whitelist 資料表先增加白名單網域 Exp. ik2.com SQL 語法
    2. 執行spf_to_greylist_whitelists.py 讓白名單生效 執行命令
  • 設定多個 domain 的 DKIM – https://docs.iredmail.org/sign.dkim.signature.for.new.domain.html
  • 設定預設 domain 的處理方式 – 主要是修改 dovecot.conf 內的 auth_default_realm
  • 解決 outlook 寄信無法使用 STARTTLS(port:587) 需要設定提供 SMTPS(port:465) – https://docs.iredmail.org/enable.smtps.html
  • 修改主機名稱的處理方式 : 除修改 /etc/hosts 之外還有其他服務設定檔都要一起修改 – https://docs.iredmail.org/change.server.hostname.html
  • 設定 SSL 憑證 : https://docs.iredmail.org/use.a.bought.ssl.certificate.html
    • 取得免費的 LetsEncrypt ssl 憑證 參考 – CentOS 6 + Apache / Nginx 申請設定 Let’s Encrypt 免費網站 SSL 憑證
      • Exp. 取得的憑證存放在 /etc/letsencrypt/archive/mail.ichiayi.com/
    • 設定 Postfix (SMTP server)

      postconf -e smtpd_tls_cert_file='/etc/letsencrypt/archive/mail.ichiayi.com/cert1.pem'
      postconf -e smtpd_tls_key_file='/etc/letsencrypt/archive/mail.ichiayi.com/privkey1.pem'
      postconf -e smtpd_tls_CAfile='/etc/letsencrypt/archive/mail.ichiayi.com/fullchain1.pem'
      systemctl restart postfix
    • 設定 Dovecot (POP3/IMAP server)

      /etc/dovecot/dovecot.conf
      ssl = required
      ssl_cert = </etc/letsencrypt/archive/mail.ichiayi.com/cert1.pem
      ssl_key = </etc/letsencrypt/archive/mail.ichiayi.com/privkey1.pem
      ssl_ca = </etc/letsencrypt/archive/mail.ichiayi.com/fullchain1.pem
      systemctl restart dovecot

郵件移轉 (imapsync)

  • 是透過新舊 Mail Server 的 imap 協定來將舊 Mail Server 內的信件移轉至新 Mail Server 內
  • 安裝 imapsync

    yum install imapsync
  • 假設要移轉 jonathan 的信件, 要知道新舊主機 jonathan 的密碼, 將密碼寫入 /root/sync_info/jonathan 檔案內, 然後執行以下的語法

    imapsync --host1 mail.ichiayi.com --user1 jonathan --passfile1 /root/sync_info/jonathan --host2 192.168.11.236 --user2 jonathan --passfile2 /root/sync_info/jonathan

備份與還原

參考網址

  • https://docs.iredmail.org/install.iredmail.on.rhel.html
  • https://www.iredmail.org/download.html
  • https://www.digitalocean.com/community/questions/setting-up-iredmail-with-digital-ocean
  • https://serverfault.com/questions/853102/nginx-could-not-build-map-hash-you-should-increase-map-hash-bucket-size-64
  • https://www.howtoforge.com/community/threads/postfix-554-relay-access-denied.55720/
  • https://www.howtoforge.com/postfix-do-not-list-domain-example.com-in-both-mydestination-and-virtual_mailbox_domains#error-postfix-do-not-list-domain-examplecom-in-both-mydestination-and-virtualmailboxdomains
  • http://blog.xuite.net/tolarku/blog/233356505-DNS+%E8%A8%AD%E5%AE%9A+spf+%E8%A8%98%E9%8C%84+-+Sender+Policy+Framework
  • https://forum.iredmail.org/topic4097-iredmail-support-change-default-login-domain.html

分享此文:

  • 分享到 Twitter(在新視窗中開啟)
  • 按一下以分享至 Facebook(在新視窗中開啟)
  • 分享到 WhatsApp(在新視窗中開啟)
  • 按一下以分享到 Telegram(在新視窗中開啟)
  • 分享到 Pinterest(在新視窗中開啟)
  • 分享到 Reddit(在新視窗中開啟)
  • 按一下即可以電子郵件傳送連結給朋友(在新視窗中開啟)
  • 點這裡列印(在新視窗中開啟)

相關


Linux資訊

Post navigation

PREVIOUS
搭建 ShowDoc 文档工具
NEXT
Bash: mail: command not found (CentOS, Redhat, Ubuntu and Debian)

發表迴響取消回覆

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料。

More results...

Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt
Filter by 分類
網站公告
Featured
限時免費
Windows 軟件下載
系統軟件
辦公軟件
圖像處理
影音媒體
網絡軟件
應用軟件
Mac 軟件下載
安卓軟件下載
網絡資訊
Mac資訊
Linux資訊
VPS資訊
NASA資訊
WordPress資訊
WeChat資訊
PHP資訊
教學資源
開源程序
網頁工具
SEO工具
醫療健康
其他資訊
Content from
Content to
2018 年 9 月
一 二 三 四 五 六 日
 12
3456789
10111213141516
17181920212223
24252627282930
« 8 月   10 月 »

分類

  • 網站公告
  • 限時免費
  • Windows 軟件下載
  • 系統軟件
  • 辦公軟件
  • 圖像處理
  • 影音媒體
  • 網絡軟件
  • 應用軟件
  • Mac 軟件下載
  • 安卓軟件下載
  • 網絡資訊
  • Mac資訊
  • Linux資訊
  • VPS資訊
  • NASA資訊
  • WordPress資訊
  • WeChat資訊
  • PHP資訊
  • 教學資源
  • 開源程序
  • 網頁工具
  • SEO工具
  • 醫療健康
  • 其他資訊

彙整

近期文章

  • 三星3nm GAA製程需要70%的良率才能贏得高通訂單進度目前依然舉步維艱 2023-10-04
  • Sage Geosystems發明效率高達200%的“地球電池” 2023-10-04
  • 諾貝爾化學獎得主提早4個多小時曝光?官方回應 2023-10-04
  • Xbox遊戲工作室正在開發兩款基於授權IP遊戲新作 2023-10-04
  • 2023硬碟實測故障率:SSD比機械硬碟可靠 2023-10-04
  • 高端夢不滅一加有望重啟數位Pro系列 2023-10-04
  • 韋伯之謎解開了天文物理學家解釋宇宙黎明時的”不可能”亮度 2023-10-04
  • 高端夢不滅一加有望重啟數位Pro系列 2023-10-04
  • 造訪華強北:iPhone 15發售後蘋果二手舊機價格不降反漲 2023-10-04
  • 客戶拖欠款項把這家成立16年的遊戲工作室拖死了 2023-10-04

熱門文章與頁面︰

  • 完美解碼PureCodec 2019.11.20
  • 打車叫到特斯拉不會開門很尷尬?官方介紹開關門方法
  • 世界上有多少個國家
  • 拆解報告:20000mAh 18W PD雙向快充版小米移動電源3 PLM18ZM
  • 靠養貓養狗年入百萬:寵物博主是門怎樣的生意?
  • QS版ES版的CPU能買嗎?
  • Autodesk AutoCAD 2021 正式版註冊版-簡體/繁體中文/英文版
  • 微信消息撤回也沒用???這些辦法都能查看撤回的內容
  • DP vs HDMI 誰才是遊戲玩家最佳選擇?
  • Windows 10玩遊戲死機重置顯卡驅動的秘籍你知道嗎?

投遞稿件

歡迎各界人士投遞稿件到admin@wongcw.com

請提供以下資料:

1.你的名字

2.你的電郵

3.分類目錄

4.文章標題

5.文章摘要

6.文章內容

7.文章來源

 

聯繫我們

查詢,投稿,商務合作:
​admin@wongcw.com
​技術支援:
​support@wongcw.com
​客户服務:
​cs@wongcw.com

QQ群:833641851

快帆

MALUS

極度掃描

DMCA.com Protection Status

WONGCW 網誌

  • 免責聲明
  • 捐助我們
  • ThemeNcode PDF Viewer
  • ThemeNcode PDF Viewer SC
  • Events

服務器提供

本站使用之服務器由ikoula提供。

聯繫我們

查詢,投稿,商務合作:
​admin@wongcw.com
​技術支援:
​support@wongcw.com
​客户服務:
​cs@wongcw.com

QQ群:833641851

© 2023   All Rights Reserved.