Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have www server called say and mail serwer Mail for is handled by (mx record for is Problem is that I want to send mails from my www server to adress in domain

So I configured sendmail on to relay all mails via i change sendmail config on dnl # define('SMART_HOST', '')dnl

Problem is that sendmail complains when im sending to for example that user is unkown (but that mailbox exist on All maibloxes are on not on

this is log from telnet to localhost on telnet localhost 25
Connected to localhost.localdomain (
Escape character is '^]'.
220 ESMTP Sendmail 8.13.8/8.13.8; Sun, 6 Nov 2011 18:21:04 +0100
250 Hello localhost.localdomain [], pleased to meet you
mail from:
250 2.1.0 Sender ok
rcpt to:
550 5.1.1 ... User unknown
503 5.0.0 Need RCPT (recipient)

Is there a way to disable checking rcpt for local domain??

share|improve this question
up vote 4 down vote accepted

This is cited from

If you're running sendmail on a Linux server, it's quite easy to configure sendmail so that any email sent to an unknown email address in your domain is forwarded to a known address. Doing this results in getting a bunch more spam, but I like this cause I can then use email addresses that don't exist for specific purposes (such as when a forum requires a valid email address as part of the sign-up confirmation process).

Here's how to set up an catch-all for all unknown email addresses in Fedora (your disto may be slightly different), all of these commands need to be run under the root user:

  1. Edit the /etc/mail/ file and look for the line that contains virtusertable in it and make sure it is not commented out. If it is commented out, remove the comment. In my case, it looks like this:

    FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dn
  2. Edit the /etc/mail/virtusertable file and add lines like the following, one for each domain on your server that you want to add a catch-all for: postmaster-domain1 postmaster-domain2

    In this example, any mail sent to an unknown user at will be forwarded to the postmaster-domain1 user, and any email sent to an unknown user at will be forwarded to the postmaster-domain2 user. For this to work, the users to whom the mail is being forwarded must exist, and be able to receive mail.

  3. From the /etc/mail directory, run the make command.
  4. Restart the sendmail service using the service sendmail restart command.

That's all there is to it. Once you take this few simple steps you wil l have a catch-all for any email sent to unknown users in your domain.

share|improve this answer
this isnt what im looking for... a want to disable checking rcpt to because i have mailboxes on my mail server and web aplication from want to sent mails there. But sendmail is checking if this mailboxes are on before he relay them to – B14D3 Nov 7 '11 at 7:30
@B14D3 So then you misconfigured your local Sendmail as being responsible for Remove that. – mailq Nov 7 '11 at 15:27

Your Answer


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.