Forwarding a Postfix Virtual Alias to /dev/null
It's poor practice to send out email from email addresses that don't resolve, and may mean your mail ends up in a spamtrap. But sometimes you want to use a "do-not-reply" type of email address, and you don't want to have to mass-delete the mailbox at intervals.
The usual solution is to forward to /dev/null, and in a local-only setup you could do that in /etc/aliases:
do-not-reply: /dev/null |
juliet@example.com juliet@example2.com |
devnull: /dev/null |
do-not-reply@example.com devnull |
postmap -q do-not-reply@example.com /etc/postfix/virtual/dbfile |
One last gotcha: On some systems, the /etc/aliases change may not work unless that user (devnull) already exists on the system. You may well already have a nobody user in /etc/passwd (one with a nonexistent home directory and no login shell), which you can use in place of devnull in /etc/aliases; otherwise you can set up a devnull user to operate similarly.
Juliet Kemp has been messing around with Linux systems, for financial reward and otherwise, for about a decade. She is also the author of "Linux System Administration Recipes: A Problem-Solution Approach" (Apress, 2009).
Read more on "Tips of the Trade" »

Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.