Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
6902 Posts
ACCEPTED ANSWER

Pinned topic sendmail and redirecting mail

‏2012-11-08T19:07:54Z |
I am trying to redirect all email sent from my server to xxx.yyy.zzz to /dev/null but am not having any luck.

In /etc/sendmail.cf tried:
R$* xxx.yyy.zzz $*<tab>$#local $: nobody

nobody is in /etc/mail/aliases as going to file /tmp/testfile

I can mail -s "test" nobody < /etc/motd and get the email stored in /tmp/testfile. So I know the alias part is working. I just can't figure out the correct rule to rewrite to it.

sendmail -C /etc/mail/sendmail.cf -bt
blah@xxx.yyy.zzz returns No address!

To clarify a little better....I want ALL mail directed at hostname xxx.yyy.zzz to go to this local file...

Ideas?