Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2000 12:12:41 -0500 (CDT)
From:      BWS - Offwhite <brennan@offwhite.net>
To:        James A Wilde <james.wilde@tbv.se>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Slightly offtopic - antispam file
Message-ID:  <Pine.BSF.4.21.0005291205240.93091-100000@home.offwhite.net>
In-Reply-To: <000201bfc940$464414a0$8c0aa8c0@hk.tbv.se>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Well, if you can muck with your .forward file, you can set up this filter.

http://www.freebsd.org/cgi/url.cgi?ports/mail/mailfilter/pkg/DESCR

It is a simple perl script and even if your ISP will not install it, you
can simply put the script in your home directory and have the .forward
file point to it.  Here is an example:

.forward contents
"| /usr/local/bin/mail.filter"

.forward contents - alternative
"| /home/wilde-user/bin/mail.filter"

Then you can use the filter scripts, or simply edit the .mail.filter rules
file directly.  It is perl code which is eval'd from the filter, so if you
know perl, this will be your best friend.

.mail.filter contents
$result = 1 if ($incoming{'from'} =~ /earthlink.net/);|delete
$result = 1 if ($incoming{'from'} =~ /spammer/);|delete
$result = 1 if ($incoming{'from'} =~ /cdnow.com/);|delete

Alternatively, the script in this package will interactively ask you
questions to add filters to your .mail.filter file.  This name of this
script is mailfilter and you can run this from the command line if you
have shell access.

The author of this script is continually updating this script to add more
features, but so far it does what you want, including save to a file,
forwarding, or running another program.

I hope this helps.

Brennan Stehling - web developer and sys admin
projects: www.greasydaemon.com | www.onmilwaukee.com | www.sncalumni.com

Microsoft: Will you get a macro virus today?
http://www.greasydaemon.com/noms/ <- Why avoid MS?

On Mon, 29 May 2000, James A Wilde wrote:

> I'm having a problem with UCE from everybody_and_his_brother@earthlink.net
> which my ISP is unwilling to filter away.
> 
> They use unix mail servers.  Is there some file I can put in my mail
> directory which will forward all mail from *@earthlink.net to /dev/null?
> I'm thinking of something similar to the .forward file, but which only
> forwards mail from a certain address.
> 
> Grateful for all help.
> 
> mvh/regards
> 
> James
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0005291205240.93091-100000>