将单个 qmail 别名转发到 /dev/null 的最佳方法是什么?

发布于 2024-07-06 02:55:19 字数 108 浏览 6 评论 0原文

我想将单个 qmail 别名收到的邮件丢弃。 我不希望出现任何邮件传递错误,并且我希望 qmail 对邮件的传递感到满意。

我该如何做到这一点,最好不添加另一个本地电子邮件帐户?

I would like to trash the mail received by a single qmail alias. I don't want any mail delivery errors, and I want qmail to be happy about having delivered the mail.

How can I do this, preferably without adding another local email account?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

时光暖心i 2024-07-13 02:55:19

通过使用以下内容创建文件 /var/qmail/aliases/.qmail-blackhole 来创建别名:

|cat >/dev/null

然后将您想要的任何内容重定向到此“blackhole”别名(或使用您想要的任何内容代替 '黑洞”)。 仅使用 /dev/null 是行不通的 (Unable_to_write_/dev/null)。

但是,这些消息仍将被记录。 尽管它更多的是一个功能而不是一个错误。

Create an alias by creating a file /var/qmail/aliases/.qmail-blackhole with this content:

|cat >/dev/null

Then redirect whatever you want to this ‘blackhole’ alias (or use whatever you want in place of ‘blackhole’). Merely using /dev/null won’t work (Unable_to_write_/dev/null).

The messages will still be logged, however. Though it’s more of a feature than a bug.

南…巷孤猫 2024-07-13 02:55:19

创建一个仅包含注释且没有传递说明的别名,例如:

echo "# drop all messages on the floor" > ~alias/.qmail-devnull

将“devnull”替换为您当然需要的任何别名。

Create an alias with only a comment and no delivery instructions, like:

echo "# drop all messages on the floor" > ~alias/.qmail-devnull

Replace "devnull" with whatever alias name you need of course.

迷鸟归林 2024-07-13 02:55:19

一个元问题:为什么这会被降级? 是不是不适合这个网站?

A meta-question: why would this get rated down? Is it not appropriate for the site?

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