Exim 上的 Catchall 路由器不起作用

发布于 2024-08-24 18:42:51 字数 442 浏览 13 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

深巷少女 2024-08-31 18:42:51

在配置文件的 system_aliases: 部分中,您已经有一个在 /etc/aliases 中进行查找的部分。

替换

data = ${lookup{$local_part}lsearch{/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

data = ${lookup{$local_part}lsearch{/etc/aliases}}

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

过度放纵 2024-08-31 18:42:51

要使此路由器正常工作,请确保

  1. mydomain.com 位于 local_domains 中,
  2. /etc/aliases 中有一个 *@mydomain.com
  3. 条目 mydomain.com 的 MX 记录指向您已在其中的服务器
    配置了这个

For this router to work, make sure that

  1. mydomain.com is in local_domains
  2. there is an entry for *@mydomain.com in /etc/aliases
  3. MX record for mydomain.com is pointing to the server, where you've
    configured this
生生漫 2024-08-31 18:42:51

这太老了,但我没有看到发布的好的答案,其他人可能想知道答案。

这篇文章适用于单一配置文件模式的 Debian。不过它应该可以在任何 Linux Exim4 安装上运行。为了解释,我们将使用 [电子邮件受保护] 使用主机名 mail.example.com 配置。系统将有一个名为 test 的真实用户,我们要为 test 创建一个名为 alias 的别名。因此,最终结果是将所有电子邮件发送到 [email protected] 转发至 [电子邮件受保护] 无需在系统上创建用户别名。

首先,我们需要创建一个位置来存储所有别名文件:

mkdir /etc/exim/aliases.d

vim /etc/exim/aliases.d/mail.example.com

mail.example.com 别名文件的内容 alias:test

vim /etc/exim/exim4.conf.template

现在查找 system_aliases 部分。在这里您将看到 data = ${lookup{$local_part}lsearch{/etc/aliases}} 或类似的内容。将其更改为

data = ${lookup{$local_part}lsearch{/etc/exim4/aliases.d/$domain}}

保存文件并重新启动 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:

mkdir /etc/exim/aliases.d

vim /etc/exim/aliases.d/mail.example.com

contents of the alias file for mail.example.com alias:test

vim /etc/exim/exim4.conf.template

Now look for the section system_aliases. Here you’ll see data = ${lookup{$local_part}lsearch{/etc/aliases}} or something similar. Change that to

data = ${lookup{$local_part}lsearch{/etc/exim4/aliases.d/$domain}}

Save 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文