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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

-mails directed to users who don't exist as real users

Status
Not open for further replies.

aaronde

ISP
Dec 28, 2007
5
MT
Hi,

I have installed sendmail, but by default, sendmail will reject e-mails directed to users who don't exist as real users or as aliases.

I want sendmail to accept all incoming email and redirect mail for unknown users to a particular user such as postmaster.

How do I do this?

Thanks Alot!!!!
 
You can use the virtusertable. It looks a lot like the allias file but you can doo a lot more with it. For example you can list all real users then create a catch-all for the ones that don't exist. I block this type myself because it is always spam. That being said this is how you would do it:

Code:
joe@domain.com    joe
webmaster@domain.com    fred
fred@domain.com    fred
jane@domain.com    jane@isp.net
@domain.com   junkmail

If a user is not in the list, it falls through to the catch-all "@domain.com" and sends it to a user called "junkmail". This user will not have a login shell or home directory for obvious reasons so when you create the user set /sbin/nologin as the shell and /dev/null as the home directory. You only need a password if you will be accessing this email account from a remote client.

 
I guess I should have told you how to build the virtusertable.db file. Just issue this command:

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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top