差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
| 软件:email [2025/12/07 14:03] – admin | 软件:email [2026/01/02 00:57] (当前版本) – 外部编辑 127.0.0.1 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | ====== EMail ====== | ||
| + | |||
| 电子邮件(E-mail) | 电子邮件(E-mail) | ||
| 行 19: | 行 21: | ||
| 浏览器访问[[http:// | 浏览器访问[[http:// | ||
| - | postfix | + | ====== |
| <code -> | <code -> | ||
| - | sudo apt-get update | + | sudo apt update |
| - | sudo apt-get install postfix | + | sudo apt install postfix |
| sudo dpkg-reconfigure postfix | sudo dpkg-reconfigure postfix | ||
| General type of mail configuration: | General type of mail configuration: | ||
| 行 36: | 行 38: | ||
| Local address extension character: + | Local address extension character: + | ||
| Internet protocols to use: all | Internet protocols to use: all | ||
| + | |||
| + | #方法二 | ||
| + | sudo vi / | ||
| + | myhostname = example.com | ||
| + | alias_maps = hash:/ | ||
| </ | </ | ||
| - | dovecot | + | ====== |
| <code -> | <code -> | ||
| 行 45: | 行 52: | ||
| sudo vi / | sudo vi / | ||
| protocols = imap pop3 | protocols = imap pop3 | ||
| - | sudo nano / | + | sudo vi / |
| mail_location = maildir: | mail_location = maildir: | ||
| - | sudo nano / | + | sudo vi / |
| disable_plaintext_auth = no | disable_plaintext_auth = no | ||
| auth_mechanisms = plain login | auth_mechanisms = plain login | ||
| 行 54: | 行 61: | ||
| </ | </ | ||
| - | Webmail | + | ====== Roundcube ====== |
| + | |||
| + | ===== 依赖 ===== | ||
| + | |||
| + | <code -> | ||
| + | sudo apt install mariadb-server unzip | ||
| + | sudo apt install php php-mysql php-gd php-mbstring php-xml php-intl php-curl | ||
| + | </ | ||
| + | |||
| + | ===== sql ===== | ||
| + | |||
| + | <code -> | ||
| + | sudo mysql -u root -p | ||
| + | CREATE DATABASE roundcubemail DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; | ||
| + | GRANT ALL PRIVILEGES ON roundcubemail.* TO ' | ||
| + | FLUSH PRIVILEGES; | ||
| + | EXIT; | ||
| + | </ | ||
| + | |||
| + | ===== nginx ===== | ||
| + | |||
| + | <code -> | ||
| + | server { | ||
| + | listen 80; | ||
| + | server_name mail.example.com; | ||
| + | |||
| + | root / | ||
| + | index index.php; | ||
| + | |||
| + | location ~ \.php$ { | ||
| + | include snippets/ | ||
| + | fastcgi_pass unix:/ | ||
| + | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
| + | include fastcgi_params; | ||
| + | } | ||
| + | |||
| + | location ~ /\.ht { | ||
| + | deny all; | ||
| + | } | ||
| + | |||
| + | location ~ ^/ | ||
| + | deny all; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== 部署 ===== | ||
| + | |||
| + | <code -> | ||
| + | cd /var/www/ | ||
| + | wget https:// | ||
| + | tar -xzf roundcubemail-1.6.9-complete.tar.gz | ||
| + | mv roundcubemail-1.6.9 roundcube | ||
| + | chown -R www-data: | ||
| + | 访问 http:// | ||
| + | |||
| + | Database setup: 填入之前创建的 roundcubemail 数据库信息 | ||
| + | IMAP Settings: | ||
| + | IMAP Host: ssl:// | ||
| + | Port: 993 | ||
| + | SMTP Settings: | ||
| + | SMTP Host: tls:// | ||
| + | Port: 587 | ||
| + | Use SMTP authentication: | ||
| + | Username: %u,Password: | ||
| + | </ | ||