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

Postfix - do not list domain example.com in BOTH mydestination and virtual_alias

· 52CE 我爱测

I have a server with two domains. I get the warning as mentioned in the title: do not list domain example.com in BOTH mydestination and virtual_alias Although I receive the above warning, it works just fine without problems. But …

问题原文

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

I have a server with two domains. I get the warning as mentioned in the title:

do not list domain example.com in BOTH mydestination and virtual_alias

Although I receive the above warning, it works just fine without problems. But I want to know how to fix it.

The reason for having the domain in both places is because I want to implement catchall - all email sent to @domain.tld should go to the mail account of that domain.

Now, if I don't put the domain in mydestination, the server refuses to accept email for that domain because it does not want to be an open relay. If I don't put the catchall alias into the virtual alias table, the catchall doesn't work (obviously).

So what is the correct solution? I have tried to read the stuff on http://www.postfix.org/VIRTUAL_README.html#virtual_alias, but I just can't seem to make my setup work any other way.

(PS: I am using webmin/virtualmin to manage my website, and when I try to configure it with the built-in configuration tools it comes up with the same solution I have manually. So it seems even webmin doesn't know a better way to do this...)

社区高分解答

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

The default for mydestination is:

$myhostname, localhost.$mydomain, localhost

Try setting it to

localhost.$mydomain, localhost

instead. I had a similar warning, and making this change doesn't impact mail delivery on my server for the domain in question. If you're still having problems, you should probably post your main.cf and virtual_alias settings.

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

资料来源与适用范围

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

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

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