how to filter emails containing a given address in "To:" or CC - Linux

This is a discussion on how to filter emails containing a given address in "To:" or CC - Linux ; I get tons of spam from an old email account that is forwarded to my current account. For reasons too long to explain I cannot disactivate that account or the forward. The old email address appears either in the "To:" ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: how to filter emails containing a given address in "To:" or CC

  1. how to filter emails containing a given address in "To:" or CC

    I get tons of spam from an old email account that is forwarded
    to my current account. For reasons too long to explain I cannot
    disactivate that account or the forward.
    The old email address appears either in the "To:" or the "CC" field,
    so I'd like to automatically delete messages where this address
    appears. How do I do that?
    Thanks.

  2. Re: how to filter emails containing a given address in "To:" or CC

    Eric wrote:
    > I get tons of spam from an old email account that is forwarded
    > to my current account. For reasons too long to explain I cannot
    > disactivate that account or the forward.
    > The old email address appears either in the "To:" or the "CC" field,
    > so I'd like to automatically delete messages where this address
    > appears. How do I do that?


    Look into procmail.

    If it's already installed (it almost surely is, since it's the
    default mail delivery agent on most Linux systems), look at these man
    pages:

    jbuchana@hobbes$ man -k procmail
    procmail (1) - autonomous mail processor
    procmailex (5) - procmail rcfile examples
    procmailrc (5) - procmail rcfile
    procmailsc (5) - procmail weighted scoring technique
    jbuchana@hobbes$

    As man pages go, they're pretty good. procmail is a very good tool. I
    could not live without it.

    --
    Jim Buchanan jbuchana@buchanan1.net jbuchana@yahoo.com
    =================== http://www.buchanan1.net/ ==========================
    "Usenet is essentially Letters to the Editor without the editor. Editors
    don't appreciate this, for some reason." -Larry Wall
    ================= Visit: http://www.thehungersite.com ==================

+ Reply to Thread