Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending only to those in aliases file

Status
Not open for further replies.

womp

Technical User
Apr 6, 2001
105
0
0
US
Is there a way to configure sendmail emails to only send
to those listed in aliases.db and anything else that comes to the site will simply be dropped?
 
Use the virtusertable instead. Then have a catch-all for users that don't exist. Here is a sample of what that would look like:

joe@somedomain.com joe

fred@somedomain.com fred

webmaster@somedomain.com sally@hotmail.com

@somedomain.com nouser This server does not accept spam!

If no user is found then it drops through to the catch-all and rejects the mail with the message. In this case the message is "This server does not accept spam!". Once you have this done, you will need to create the db file. To do this issue the following command:

makemap hash /etc/mail/virtusertable > etc/mail/virtusertable.db

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top