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!

Journal/Archive Account

Status
Not open for further replies.

tpalshadow

Technical User
Feb 22, 2007
3
US
Hey everyone, I'm pretty much a no-nothing with sendmail. I just have a quick question. What is the best way to set up a journaling account (audit reasons) using sendmail. I just need all incoming and outgoing emails to be copied to one mailbox.

TIA,

tpalshadow
 
The easiest way I know of is to create an email account or use an existing one to forward a copy of the email to. Next you will need to edit /etc/.procmailrc and add the following lines:

Code:
	:0c			# Copy everything
	! archive@domain.com	# Send the copies to this address

You may not see .procmailrc because it has a dot in front of it and linux interprets those as hidden files. In case you are wondering, sendmail sends and receives mail from the internet but procmail is your local mailer and handles all the local mail. There are a lot of things you can do with procmail. It is configured using 'recipes'. Do a google search for more on 'procmail'.

 
Let me correct myself. The file I was talking about should have been /etc/procmailrc not .procmailrc. The latter is the one used in the user's $HOME directory.
 
OK, and this will copy all incoming and outgoing messages for ALL users on the system?

thanks for putting up with the questions!
 
Actually, I think it will just do incoming mail. There may be a way you can configure sendmail to copy all outgoing mail but since I don't have the storage space that all this requires, I don't do it. However, I did a google for 'copy outgoing mail sendmail' and got quite a few hits. You might try that. Sorry I wasn't much help.

 
No, you were a help Rhyth, best help I found! Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top