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

I was trying to follow the instructions found here to set up a catch-all account, but still I get the following message for mails sent to non-existent users:

The error that the other server returned was: 550 550 5.1.1 randomstring@example.net... User unknown (state 14).

Everything else works, though... /etc/mail/local-host-names and /etc/mail/virtusertable were set up as instructed. Any advice? Thanks!

share|improve this question

2 Answers 2

In case anybody is interested, the answer for a single domain is spelled out here. Namely, adding the following to sendmail.mc:

define(`LUSER_RELAY',`local:someuser')

where someuser will receive all the junk, I mean mail. Note that this does not solve the issue for multiple/virtual domains.

share|improve this answer

The simplest way to implement a "catch all" address is by altering rule set 0. In your sendmail.mc add the following lines:

LOCAL_RULE_0
R$* < @ $=w . > $*      $#local $: catch-all

Where "catch-all" is the local username or alias where every mail should be directed. Remember that the left hand side is separated from the right one with tabs and not spaces, so do not copy-paste, type the above snippet. Next produce the new sendmail.cf and restart sendmail. For more complex stuff you can see this post.

share|improve this answer

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.