/etc/postfix/、/etc/dovecot/)。sudo apt update && sudo apt upgrade -y。sudo apt dist-upgrade -y(可选,用于升级系统版本)。sudo reboot。sudo apt install postfix dovecot-imapd dovecot-pop3d。/etc/postfix/main.cf、/etc/dovecot/dovecot.conf),启用SASL认证等。sudo systemctl restart postfix dovecot。sudo systemctl status postfix dovecot。sudo ufw allow OpenSSH && sudo ufw allow Postfix && sudo ufw enable。top、htop、df -h等命令监控资源使用情况。journalctl -xe或/var/log/mail.log检查服务日志。unattended-upgrades包实现自动更新。注意:升级前务必测试配置,避免直接从旧版本跳跃升级(如从Debian 9直接升到11),优先逐步升级。
参考来源: