ubuntu24.04使用cyberpanel创建网站时提示错误:DKIM Setup..     错误信息: [“[Errno 2] No such file or directory: ‘/etc/postfix/main.cf’ [404]”] - 技术宅银魂 - 科技改变生活 - 万事屋 | 生活·动漫·娱乐综合社区-银魂同好聚集地

ubuntu24.04使用cyberpanel创建网站时提示错误:DKIM Setup.. 错误信息: [“[Errno 2] No such file or directory: ‘/etc/postfix/main.cf’ [404]”]

都是惯出来的毛病,系统没Postfix就不能搞定建站,也是没谁了。

# 1. 检查Postfix是否已安装
dpkg -l | grep postfix

# 2. 若输出为空(未安装),则非交互式安装Postfix(避免弹窗打断)
sudo DEBIAN_FRONTEND=noninteractive apt install -y postfix

# 3. 安装完成后,验证main.cf文件是否存在
ls -l /etc/postfix/main.cf

如果安装 Postfix 后main.cf仍缺失,说明安装不完整,重新配置 Postfix:

# 1. 重新配置Postfix(重置配置并生成main.cf)
sudo dpkg-reconfigure -f noninteractive postfix

# 2. 验证配置文件是否生成
cat /etc/postfix/main.cf | grep "myhostname"  # 能输出内容即正常

Postfix 安装 / 修复完成后,重启服务,再回到 CyberPanel 面板重新创建网站:

# 1. 重启Postfix服务
sudo systemctl restart postfix

# 2. 确保Postfix开机自启(避免重启后失效)
sudo systemctl enable postfix

# 3. 验证Postfix状态(应为active (running))
sudo systemctl status postfix

 

请登录后发表评论

    没有回复内容

万事屋新帖