Exim 上的 Catchall 路由器不起作用
我在 exim 上设置了一个包罗万象的路由器(用作最后一个路由器):
catchall:
driver = redirect
domains = +local_domains
data = ${lookup{*@$domain}lsearch{/etc/aliases}}
retry_use_local_part
这在本地发送电子邮件时非常有效。但是,如果我登录我的 GMail 帐户并向 [email protected],然后我得到一个“不可路由的地址”。
感谢您提供解决此问题的任何提示。
I have setup a catchall router on exim (used as last router):
catchall:
driver = redirect
domains = +local_domains
data = ${lookup{*@$domain}lsearch{/etc/aliases}}
retry_use_local_part
This works perfectly when sending emails locally. However, if I login to my GMail account and send an email to [email protected], then I get an "Unrouteable Address".
Thank you for any hints to solve this issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在配置文件的 system_aliases: 部分中,您已经有一个在
/etc/aliases
中进行查找的部分。替换
为
data = ${lookup{$local_part}lsearch*@{/etc/aliases}}
并确保
/etc 中有
*:catchall_username*
/aliases这对于已经使用
/etc/aliases
的单域邮件服务器非常有效In the system_aliases: section of the config file you already have a section which does the lookup in
/etc/aliases
.Replace
with
data = ${lookup{$local_part}lsearch*@{/etc/aliases}}
and make sure you have
*:catchall_username*
in/etc/aliases
This works great for a single domain mail server which is already using
/etc/aliases
要使此路由器正常工作,请确保
配置了这个
For this router to work, make sure that
configured this
这太老了,但我没有看到发布的好的答案,其他人可能想知道答案。
这篇文章适用于单一配置文件模式的 Debian。不过它应该可以在任何 Linux Exim4 安装上运行。为了解释,我们将使用
[电子邮件受保护]
使用主机名 mail.example.com 配置。系统将有一个名为 test 的真实用户,我们要为 test 创建一个名为 alias 的别名。因此,最终结果是将所有电子邮件发送到[email protected]
转发至[电子邮件受保护]
无需在系统上创建用户别名。首先,我们需要创建一个位置来存储所有别名文件:
mail.example.com 别名文件的内容 alias:test
现在查找
system_aliases
部分。在这里您将看到data = ${lookup{$local_part}lsearch{/etc/aliases}}
或类似的内容。将其更改为保存文件并重新启动 exim。别名现在应该可以使用了。要添加对其他域的支持,只需在 aliases.d 目录中添加更多具有正确主机名的别名文件即可。
我从我的博客复制并粘贴了此内容:
0xeb.info
This is old as heck, but I didn't see a good answer posted and someone else might want to know the answer.
This post is geared towards Debian with in single configuration file mode. It should work on any Linux Exim4 install though. For the purpose of explaining things we’ll use
[email protected]
which is configured with the hostname mail.example.com. The system will have a real user called test and we want to create an alias for test called alias. So the end result will all email sent to[email protected]
forwarded to[email protected]
without having to create the user alias on the system.First we need to create a place to store all of the alias files:
contents of the alias file for mail.example.com alias:test
Now look for the section
system_aliases
. Here you’ll seedata = ${lookup{$local_part}lsearch{/etc/aliases}}
or something similar. Change that toSave the file and restart exim. The alias should now work. To add support for other domains just add more alias files in the aliases.d directory with the correct hostname.
I copied and pasted this from my blog:
0xeb.info