On Sat, Dec 15, 2001 at 01:45:13PM +0500, Mahmood Iqbal Hashmi wrote:
Can I block one email address for one user
like:
:0
* ^From: tieedfdf(_at_)hotmail(_dot_)com
/dev/null
Regards,
Iqbal
here is a handy solution:
:0:
* ? (formail -x From: -x Sender: -x Reply-To: | fgrep -iqf ~/.procmail/spammers)
| formail -A "X-SPAM-RULE: address found in spammers file" >> /dev/null
Now the only thing you have to do is add that e-mail to your spammers
file (you can keep it anywhere you like, just change
~/.procmail/spammers filename to anything convenient).
P.S. Though in this example I send all mail to /dev/null, on my system I
prefer to keep offending message in separate mailbox (called SPAM) so I
can restore good e-mails if some error would occur (sh*t happenes, you
know ;-) ). This mailbox is flushed regularly (cron job, as you may
guess).
--
Oleg Kourapov | Linux user #245698 http://counter.li.org
Moscow, RU | LFS user #1212 http://www.linuxfromscratch.org
--
Yesterday is a memory.
Tomorrow is the unknown.
Now is the knowing.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GTW d- s+: a-- C++++ UL++ P+ L+++ E--- W+++ N++ o-- K++ w--
O M- V- PS+ PE+++ Y+ PGP++ t 5++ X++ R tv- b+++ DI+ D
G e* h! r y?
------END GEEK CODE BLOCK------
pgpTkye0KyBMj.pgp
Description: PGP signature