大网数据广告活动
服务器运维问答

Can I safely remove all mail services from CentOS?

· 52CE 我爱测

I've inherited 3 legacy shared servers all running CentOS. We no longer offer any email subscriptions from our servers and have migrated everyone to cloud services. These servers host about 60 WordPress sites each. Across the 3 s…

问题原文

原帖链接 · David · CC BY-SA 3.0

I've inherited 3 legacy shared servers all running CentOS. We no longer offer any email subscriptions from our servers and have migrated everyone to cloud services. These servers host about 60 WordPress sites each.

Across the 3 servers I have the following services still running;

  • Postfix (SMTP)
  • Courier (POP3 & IMAP)
  • Dovecot (POP3 & IMAP)
  • SpamAssassin
  • Plesk Milter

These are all production servers.

Can I safely remove these services permanently now? Are there any other considerations?

已采纳解答

原帖链接 · Jeter-work · CC BY-SA 3.0

  • The base OS may be using postfix (or one of the others) for alerts.
  • The services you are running may be using one of those services as an MTA.

I'd advise turning them down, one at a time. Just stop one service. Then watch your logs for an hour, and test the other services. If you start seeing errors, you know something is configured to use the mail service you turned down. Check logs frequently for a day or a week. If none of your services complains, you can disable the service. When you're ready to uninstall, be sure to capture the configurations for the service, in case you need to restore it.

Repeat the full cycle for each mail service. It is important to only stop one at a time. Also, keep in mind that any problem that shows is most likely caused by the latest one you stopped, but it's possible that it was caused by an earlier service shutdown.

Also, before you start turning down services, grep through the config files for all services and cron jobs, core OS and non-core, looking for the mail services by hostname and IP address. (Actually, this may not be productive. Since you are not talking about a dedicated mail server, the server names will be there for other services.) Read through the installation and configuration instructions for the non-core services you're running, with an eye toward the configuration steps that deal with MTAs.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-02-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。