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.

Is there any possibility to redirect / discard email of unknown users instead of sending it back to the sender with a rejection message that user is unknown?

I don't want to use any milter for this purpose or any sender validation tool. Have sendmail ability into it to do this?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The sendmail option you want is called LUSER_RELAY. To send all mail addressed to unknown users to "unknown" on the local system, you would put this line in your mc file:

define(LUSER_RELAY',local:unknown')dnl

Once you have built a new sendmail.cf file you will have a line that specifies the destination for all email addressed to unknown users:

DLlocal:unknown

To never deal with the email, put a .forward file in the target user's home:

| /dev/null

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.