Forum Moderators: open
[edited by: volatilegx at 12:08 pm (utc) on Sep. 13, 2004]
[edit reason] examplified email address [/edit]
I wouldn't attempt it unless you're very comfortable working with server-side scripting, but it is a very efficient way of dealing with spam.
Procmail filters all incoming mail before it reaches your mailbox. You can use regular expressions to catch incoming spam and delete it before it ever gets to your box. Here's a sample procmail recipe that would delete all mail addressed to "Bill@somedomain.com":
[pre]
:0
*!^To:.*(Bill@somedomain\.com)
*!^Cc:.*(Bill@somedomain\.com)
*!^Bcc:.*(Bill@somedomain\.com)
{
:0
/dev/null
}
[/pre] Procmail is a fairly complex scripting language which allows you to send autoresponses, automatically forward mail, delete spam, etc. However, for all its flexibility, it is pretty knowledge-intensive to set up.
As usual, Google provides a good list of procmail references: [google.com...]
So, if there are several people with email accounts on a domain, I use a bounce, but if the domain is web only with no email addresses, I either wipe the MX reconds completely so no email goes through at all, or I blackhole everything.