使用 IP 地址而不是域名发送电子邮件
我试图避免通过 DNS 服务器将电子邮件发送到我托管的虚拟帐户之一上的地址。
我知道我可以用方括号将 IP 地址括起来,但如何为服务器上的(虚拟)托管帐户指定邮箱用户名?
换句话说,
- 我在虚拟服务器上托管了多个域 -
- 显然所有域都共享相同的 IP 地址, [电子邮件受保护] 工作正常
- ,但我如何发送到user@[123.456.78.90]
我想做的事可能吗?
谢谢。
I am trying to avoid running through DNS servers to get an email message to an address on one of my hosted virtual accounts.
I know I can surround the IP address with square brackets but how do I designate the mailbox username for the (virtual) hosted account on the server?
In other words,
- I have multiple domains hosted on a virtual server -- all sharing the same IP address
- obviously, [email protected] works fine
- but how do I send to user@[123.456.78.90]
Is what I want to do, possible?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
虚拟主机需要域名才能确定要做什么。您希望将其发送到 IP 地址而不是域名。因此,通过正常的方法是行不通的。如果没有匹配,您也许可以指定一个“默认”域,否则,您唯一的希望就是手动伪造电子邮件。我的意思是:
A virtual host needs a domain name in order to figure out what to do. You want to send it to an IP address instead of a domain name. Thus it is not going to work through normal methods. You might be able to specify a "default" domain if none match Otherwise, your only hope is to manually forge email. By this, I mean:
您想要做的事情是可能的,甚至在使用 Cjdns IP 时也是安全的。一些客户端(例如 mutt)“损坏”并在原始 ip 作为域时被阻塞。 (虽然技术上有问题,但它是一个不常见的用例 - mutt 是一个很好的客户端。)
您需要告诉您的 MTA 接受原始 IP。例如在 sendmail 上,添加
<代码>
[123.456.78.9]
到 /etc/mail/local-host-names
您还必须打开
accept_unresolvable_domains
因为 sendmail 似乎并不将已解析的域视为“可解析”。 (其他 MTA 可能需要不同的调整。)我使用 Thunderbird 发送到原始 ip,它工作得很好。一位朋友使用爪邮件没有任何问题。
What you want to do is possible, and even secure when using Cjdns IPs. Some clients (e.g. mutt) are "broken" and choke on raw ips as domain. (While technically broken, it is an uncommon use case - mutt is a good client.)
You'll need to tell your MTA to accept the raw ip. E.g. on sendmail, add
[123.456.78.9]
to /etc/mail/local-host-names
You'll also have to turn on
accept_unresolvable_domains
as sendmail doesn't seem to regard already resolved domains as "resolvable". (Other MTAs may require different tweaks.)I use thunderbird to send to raw ips, and it works just fine. A friend uses claws-mail with no problems.