这是本文档旧的修订版!
电子邮件(E-mail)
SMTP
POP
IMAP
Webmail
下载Roundcube https://roundcube.net/download/
浏览器访问http://localhost/webmail/installer.php
sudo apt-get update
sudo apt-get install postfix
sudo vi /etc/postfix/main.cf
我的主机名 = mail.example.com
我的域名 = example.com
我的原产地 = $mydomain
inet_interfaces = 全部
mydestination = $myhostname、localhost.$mydomain、localhost、$mydomain
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
home_mailbox = Maildir/
为确保配置安全,应激活 SMTP 身份验证。为此,请在您的 main.cf 中:
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
激活 TLS 加密
为确保连接安全,应为 Postfix 激活 TLS 加密。在您的 main.cf 中:
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.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