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

How to get Exim to accept mail for subdomains?

· 52CE 我爱测

I'm trying to use subdomains with Exim, but If I send a test message to any address other fqdn than my basic domain name it gets bounced with a relay error. I can send and login to both Dovecot and Exim with an address with, for …

问题原文

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

I'm trying to use subdomains with Exim, but If I send a test message to any address other fqdn than my basic domain name it gets bounced with a relay error. I can send and login to both Dovecot and Exim with an address with, for example, [email omitted], but can only send mail out from that address. Incoming mail works only on the primary domain.

Unfortunately, I chose the Debian muli-file configuration option when I set up my email servers a year ago, so theres lots of config files. Let me know if there is a particular one(s) to post that would be relevant.

I have a workaround, but it ditches the subdomain entirely from the address in the sending and requires only 'local' usernames, not allowing usernames with the full email address.

How can I get Exim to allow all subdomains? It's letting me login with full email address, why not recognizing that address exists?

I'm using PAM user auth with full email addresses for email-enabled usernames. I'm thinking maybe I have a misconfig somewhere in the routing that's appending the domain on top of the email address, since usually PAM uses plain usernames, not full email addresses. It's not in the auth though. It's gotta be in the routing. On the other hand, maybe it has nothing to do with that.

Any ideas would be most welcome, as my searches have turned up everything except how to get Exim to accept mail for subdomains.

已采纳解答

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

If you are editin the cofiguration directly, add a wildcard to your MAIN_LOCAL_DOMAINS macro in your configuration or template.

MAIN_LOCAL_DOMAINS=@:localhost:example.com : *.example.com 

This will set the local_domains used to accept email.

domainlist local_domains = MAIN_LOCAL_DOMAINS

If you are using Debian based configuration specify your domains as other domains in 'update-exim4.conf.conf' like this:

dc_other_hostnames='example.com : *.example.com'

If you want to verify for actual local subdomains, you and use a DNS lookup instead of a wildcard. See the Exim Specification. The relevant sections are "File and database lookups" and "Domain, host, address, and local part lists"

For lookups on full username including domain, you are outside the normal user lookups. Check the documentation on virtual domains for that kind of lookup. See the Specification section on "Some common configuration settings". There is also an excellent FAQ available.

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

资料来源与适用范围

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

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

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