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

what's the difference between '/etc/aliases' and /etc/postfix/aliases'

· 52CE 我爱测

In my system I've noticed that there are these two files, coming from different packages: /etc/aliases --> netcfg-11.5-27.1.noarch /etc/postfix/aliases --> postfix-2.11.6-19.1.x86_64 I've also noticed that in my 'postfix' configu…

问题原文

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

In my system I've noticed that there are these two files, coming from different packages:

  1. /etc/aliases --> netcfg-11.5-27.1.noarch
  2. /etc/postfix/aliases --> postfix-2.11.6-19.1.x86_64

I've also noticed that in my 'postfix' configuration, namely /etc/postfix/main.cf there's this line pointing to (1), instead of (2).

alias_maps = hash:/etc/aliases

Question: is this by default like this? It doesn't make sense to me, I would expect that postfix should use postfix's file and not netcfgs.

社区高分解答

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

From postfix man page:

On some systems the alias database is not in /etc/aliases. To find out the location for your system, execute the command "postconf alias_maps".

The /etc/postfix/aliases probably is a stub file to be used on system lacking /etc/aliases. Anyway, as you discovered, your alias_map points to /etc/aliases, so you can safely ignore the other file.

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

资料来源与适用范围

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

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

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