• No replies
6902 Posts

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/ 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/ -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...