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?
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?
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.
A meta-question: why would this get rated down? Is it not appropriate for the site?
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.