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

What role does /etc/mailname play in postfix?

· 52CE 我爱测

I'm troubleshooting a postfix configuration, and /etc/mailname is often mentioned in this context. What exactly is its role? Does it in some way relate to postfix's myorigin / myhostname / mydomain config variables?

问题原文

原帖链接 · bluenote10 · CC BY-SA 4.0

I'm troubleshooting a postfix configuration, and /etc/mailname is often mentioned in this context. What exactly is its role? Does it in some way relate to postfix's myorigin/myhostname/mydomain config variables?

已采纳解答

原帖链接 · anx · CC BY-SA 4.0

You can (but you are in no way forced to) configure postfix to read that file. Debian-based systems ship configuration that does that. Search your configuration to see if yours is referencing the file:

# postconf | grep mailname
myorigin = /etc/mailname

You could just as well have put your verbatim domain name directly into main.cf instead of using the path to instruct postfix to read from there.

You can get the full and read about the individual effects list by searching for myorigin in man 5 postconf.

The most obvious place this is used in common setups is then the append_at_myorigin feature, where submitting mail not specifying a domain will have the domain - potentially read from that file - appended. Many other Postfix directly use or reference $myorigin.

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

资料来源与适用范围

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

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

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