UCSD Main WebsiteUCSD Jacobs SchoolDepartment of Computer Science and Engineering
About CSECSE PeopleFacultyGraduate EducationUndergraduate EducationDepartment AdministrationContact CSE
spacer gif
spacer gif
CSE People
spacer gifspacer gif
spacer gif
plus signspacer gifAcademic Affairs
spacer gif
spacer gifspacer gifFaculty/Staff Intranet
spacer gif
plus signspacer gifFinancial Affairs
spacer gif
plus signspacer gifHuman Resources
spacer gif
minus signspacer gifComputing Support
spacer gifspacer gifServices
spacer gifspacer gifResources for TAs & Instructors
spacer gifspacer gifFacilities
spacer gifspacer gifRequest Help
spacer gifspacer gifOther Resources
spacer gifspacer gifWindows Resources
spacer gifspacer gifComputing Policy
spacer gif
plus signspacer gifFacilities
spacer gif
spacer gifspacer gifComputing FAQ
spacer gif
spacer gif
spacer gif
Search
spacer gifspacer gifspacer gif
 
 
Google
spacer gifspacer gif
spacer gif
spacer gif
spacer gif
spacer gif
spacer gifspacer gif
Home»Department Administration»Computing Support»Other resources»Email»Filtering
spacer gif
Using Procmail to filter incoming mail
spacer gif
spacer gifspacer gifspacer gif
spacer gif

Note:
If mail to your account is directly forwarded to another machine, then a filter program must be run on that system. You will need to contact the mail administrator at the mail destination site to find out the appropriate mail filtering commands at that site. If you don't know on which machine you actually receive mail, please click here.

The .procmailrc File
You must create the file .procmailrc in your home directory (on the machine on which your account receives email) in order to run procmail. .procmailrc is a configuration file which tells procmail what to do, and is read each time your account receives a message.

A simple .procmailrc file might look like this:

	
	#
	# mail list named "xyz"
	#
	# assumes my mail root location is a subdir of my home 
	# dir called "imap-mail/"  It actually could be just 
	# about anything.  Change to whatever you use.
	#
	:0
	*^To.*xyz*
	$HOME/imap-mail/xyz
	#
	:0
	*^Sender:.*xyz*
	$HOME/imap-mail/xyz
	

This page briefly describes a very simple use of the unix procmail utility. It is in fact a much more powerful program than may be implied here. For more information, see

	% man procmail
and
	% man procmailex
or the procmail FAQ at http://mirror.ncsa.uiuc.edu/procmail-faq/

spacer gif
spacer gif
spacer gifback to top ^
spacer gif
spacer gif
spacer gif
spacer gif
9500 Gilman Drive, La Jolla, CA 92093-0404
spacer gif
About CSE | CSE People | Faculty & Research | Graduate Education | Undergraduate Education
Department Administration | Contact CSE | Help | Search | Site map | Home
webmaster@cs.ucsd.edu
Official web page of the University of California, San Diego
Copyright © 2003 Regents of the University of California. All rights reserved.
spacer gif