Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For some reason I want to be able to send emails to literally nobody.

I mean that if I use mail nobody and send something, I want the email to be immediately discarded. Completely ignored.

How can I do that?

I tried making symlink in /var/mail/nobody pointing to /dev/null, but whenever I send something there I get "Undelivered Mail Returned to Sender".

Is there a better way?

Thanks.

(Forgive my poor English and noob unix skills)

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Add an entry to /etc/aliases:

nobody: /dev/null

then run newaliases.

share|improve this answer
1  
This answer is the correct one. See also postfix.org/aliases.5.html for details. –  Avery Payne Dec 19 '11 at 21:17
    
Thanks a lot. Didn't think it's that simple ;) –  radex Dec 19 '11 at 21:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.