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

Cc a mail from a partucular domain

Status
Not open for further replies.

mandeepsa

MIS
Jul 14, 2005
3
US

Hey.........I want to setup sendmail so that any incoming message from internet from a particular domain (say *@example.com) to any user within my company gets delivered to the original recipient PLUS a Cc or Bcc is sent to an admin mailbox.

Is there a way to set this up ?
 
Once mail comes into your server, it gets handed off to the local mailer for processing. In most cases this would be procmail. To know how to handle the mail procmail uses "recipes". These recipes can be in either the user's .forward file in their home directory or in the more global procmail.rc. I know I have answered this question many moons ago but for the life of me, I can't remember the recipe. If you do a websearch for procmail, there are many sites out there that have samples that you can convert to your needs. Sorry for getting old on you. I just don't remember things like I used to.

 
add the following to the .procmailrc file of the account in question, or the global procmailrc

:0c
* ^From:.*domain\.com
! you@yourdomain.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top