Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2000 12:12:41 -0500 (CDT)
From:      BWS - Offwhite <>
To:        James A Wilde <>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Slightly offtopic - antispam file
Message-ID:  <>
In-Reply-To: <000201bfc940$464414a0$>

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.

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'} =~ /;|delete
$result = 1 if ($incoming{'from'} =~ /spammer/);|delete
$result = 1 if ($incoming{'from'} =~ /;|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: | |

Microsoft: Will you get a macro virus today? <- Why avoid MS?

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

> I'm having a problem with UCE from
> 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 * 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
> with "unsubscribe freebsd-questions" in the body of the message

To Unsubscribe: send mail to
with "unsubscribe freebsd-questions" in the body of the message

Want to link to this message? Use this URL: <>