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

An inbox is automatically created for every UNIX user on the box, when the mail is sent to the nodename of the system.

Is there a way to disable these default inboxes?

An example of one of these inboxes is root@nodename.

It would be preferable not to remove the nodename from local-host-names.

I do have other domains set up on this sendmail server, that need to stay running.

share|improve this question
What do you mean by disabling? Should mail to these mail boxes be discarded? Forwarded somewhere else? – adamo Aug 28 '12 at 18:47
Discarded, unless I say otherwise in virtusertable. Currently, the virtusertable lists all valid email addresses. If root@nodename is not in virtusertable, then it should be discarded. – George Bailey Aug 29 '12 at 14:27

First you need to have a look here, in order to understand how to produce a from and restart sendmail afterwards.

Now forget virtusertable. We will define a class of usernames which are allowed to receive mail. All the rest will be discarded. To do this we add the following section in

C{Receive} user1 user2 user3

If you want to define these users in an external file, instead of directly editing your, use an F line, instead of a C line:

F{Receive} -o /etc/mail/receive.allow

This way each line in the file /etc/mail/receive.allow contains a username that is allowed to receive mail. The -o switch makes sure that sendmail will not complain if the file does not exist.

Now that the users that are allowed to receive mail are defined, we add the following lines next:

R${Receive}       $#OK
R${Receive} < @ $=w . > $*        $#OK
R$*        $#discard $: $1

Do not copy paste the above snippet of code. The left hand side of the code is tab separated from the right hand one. So type it instead. Next follow the instructions for how to compile from and restart sendmail.

Each time you modify in order to add a user, you need to reproduce and restart sendmail. If you choose to store allowed users in an external file, each time you modify this file you need to restart sendmail (no need for a new

share|improve this answer

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.