3

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!

ezequiel-garzon
  • 577
  • 2
  • 8
  • 16

2 Answers2

1

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.

ezequiel-garzon
  • 577
  • 2
  • 8
  • 16
1

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.

adamo
  • 6,965