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

how do i setup a "catch-all" email? 2

Status
Not open for further replies.

farley99

MIS
Feb 12, 2003
413
US
how do i setup a "catch-all" email?
 
sendmail? Use Virtusertable. It works a lot like aliases but lets you do what you want here. The example will show you how it's done:

webmaster@domain.com joe
sales@domain.com joe@isp.net
@domain.com fred

All mail for domain.com that is not forwarded to a user, e-mail address or other domain will go into the "catch-all". In this case, all mail for domain.com except for webmaster and sales, will go to fred.

Now you need to create virtusertable.db:

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

 
If your using Postfix, its basically the same thing. Add the following to your /etc/postfix/main.cf file...

virtual_maps = hash:/etc/postfix/virtual

Edit the file the same as RhythmAce stated above, and then run...

postmap hash:/etc/postfix/virtual


Another way to do this is to use the &quot;luser_relay&quot; directive in main.cf.



ChrisP
RHCE, LPIC-1, CCNA, CNE, MCSE, +10 others
 
I changed /etc/postfix/main.cf but
It gives me this error?

# makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable
bash: /etc/mail/virtusertable: No such file or directory

Got any tips?
 
makemap is a Sendmail command, try postmap. The full command is &quot;postmap hash:/etc/postfix/virtual&quot;. You have to create the /etc/postfix/virtual file first. Inside the virtual file, you can just do something like...

@foo.org chris



ChrisP
RHCE, LPIC-1, CCNA, CNE, MCSE, +10 others
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top