文档详情

使用 Ubuntu 安装邮件伺服器.doc

发布:2017-12-18约8.4千字共12页下载文档
文本预览下载声明
2011/12/13 by Eric 使用 Ubuntu 安裝郵件伺服器 (Mail Server):Postfix + Dovecot + Openwebmail架設郵件伺服器 (mail server) 需要 Postfix 和 Dovecot 二個套件。 Postfix 負責 SMTP Dovecot 負責 POP3 和 IMAP 選擇 Dovecot 的理由是 Dovecot 同時支援 Maildir 和 mbox;而 Openwebmail 只支援 mbox。 Ubuntu Server 從 9.10 版開始提供一支套件 Dovecot-postfix,這支套件整合了 Postfix 與 Dovecot 的設定環境,使設定更簡單。 環境 我們希望郵件伺服器 Outlook Express 可以收發郵件,同時也提供網頁郵件服務。以下是我們的假設環境: 郵件伺服器:Postfix POP3 伺服器:Dovecot-pop3d IMAP 伺服器:Dovecot-imapd 信箱格式:mbox 認證:使用 Ubuntu Server 的帳號及密碼 網頁郵件服務:Openwebmail Postfix Ubuntu Server 常用的郵件伺服器是 Postfix。 安裝 安裝 Postfix 的指令如下: sudo apt-get install postfix 安裝過程中,畫面會要求你設定你的環境。 域名(.tw) 啟動停止 Postfix 的指令如下: sudo /etc/init.d/postfix start #啟動 Postfix sudo /etc/init.d/postfix stop #停止 Postfix sudo /etc/init.d/postfix restart #重新啟動 Postfix 組態 後面我們要安裝 dovecot-postfix 套件,安裝 dovecot-postfix 會修改 Postfix 的 main.cf 檔案,這裡的 main.cf 檔案是被 dovecot-postfix 更改後的檔案。 Postfix 主要的組態設定檔是 /etc/postfix/main.cf。vi 編輯 main.cf 的指令如下: sudo vi /etc/postfix/main.cf main.cf 的內容如下: 第 9行 將 (Ubuntu) 拿掉 第21行到第25行 #註記 第34行 新增 第41行 #註記,因為這裡使用 mbox 第54行 #註記 第56行到第61行 #註記 # See /usr/share/postfix/main.cf.dist for a commented, more complete version ? ? # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname ? smtpd_banner = $myhostname ESMTP $mail_name biff = no ? # appending .domain is the MUAs job. append_dot_mydomain = no ? # Uncomment the next line to generate delayed mail warnings #delay_warning_time = 4h ? readme_directory = no ? # TLS parameters #smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem #smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key #smtpd_use_tls = yes #smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache #smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache ? # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. ? myhostname = .
显示全部
相似文档