电子邮件(E-mail)
SMTP服务器: smtp.qq.com 端口: 465(SSL加密)
IMAP服务器: imap.qq.com 端口: 993(SSL加密)
POP3服务器: pop.qq.com 端口: 995(SSL加密)
SMTP
POP
IMAP
Webmail
下载Roundcube https://roundcube.net/download/
postfix
sudo apt-get update sudo apt-get install postfix sudo dpkg-reconfigure postfix General type of mail configuration: Internet Site NONE doesn't appear to be requested in current config System mail name: example.com Root and postmaster mail recipient: <admin_user_name> Other destinations for mail: server1.example.com, example.com, localhost.example.com, localhost Force synchronous updates on mail queue?: No Local networks: 127.0.0.0/8 Yes doesn't appear to be requested in current config Mailbox size limit (bytes): 0 Local address extension character: + Internet protocols to use: all #方法二 sudo vi /etc/postfix/main.cf myhostname = example.com alias_maps = hash:/etc/postfix/virtual
dovecot
sudo apt install dovecot-core dovecot-imapd dovecot-pop3d sudo vi /etc/dovecot/dovecot.conf protocols = imap pop3 sudo vi /etc/dovecot/conf.d/10-mail.conf mail_location = maildir:~/Maildir sudo vi /etc/dovecot/conf.d/10-auth.conf disable_plaintext_auth = no auth_mechanisms = plain login !include auth-system.conf.ext sudo systemctl restart dovecot
Roundcube
依赖
sudo apt install mariadb-server unzip sudo apt install php php-mysql php-gd php-mbstring php-xml php-intl php-curl
sql
sudo mysql -u root -p CREATE DATABASE roundcubemail DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost' IDENTIFIED BY 'your_strong_password'; FLUSH PRIVILEGES; EXIT;
nginx
server {
listen 80;
server_name mail.example.com;
root /var/www/roundcube;
index index.php;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
location ~ ^/(config|temp|logs)/ {
deny all;
}
}
部署
cd /var/www/ wget https://github.com/roundcube/roundcubemail/releases/download/1.6.9/roundcubemail-1.6.9-complete.tar.gz tar -xzf roundcubemail-1.6.9-complete.tar.gz mv roundcubemail-1.6.9 roundcube chown -R www-data:www-data /var/www/roundcube 访问 http://mail.example.com/installer,按向导操作: Database setup: 填入之前创建的 roundcubemail 数据库信息 IMAP Settings: IMAP Host: ssl://localhost 或 tls://localhost Port: 993 SMTP Settings: SMTP Host: tls://localhost Port: 587 Use SMTP authentication: Username: %u,Password: %p