[baylisa] Matching envelope "From" header using SpamAssassin

William R Ward bill at wards.net
Tue Feb 4 20:02:16 PST 2003


I never use "To" or "Cc" for filtering list mail.  Most mailing list
managers insert some kind of header that can be used, such as
"List-Id:" or "Sender:" or "X-List:" or even "X-Unsubscribe:."
These are preferable for filtering, as it helps you distinguish list
mail even if it is BCC'd.

There's no need for the SpamAssassin rule though; just put the rule
for '^From .*owner-foo-bar' in your .procmailrc ahead of the
SpamAssassin stuff.

--Bill.

David Alban writes:
>Greetings!
>
>Found a solution before sending the question.  Thought I'd share the
>solution.  The solution was to use:
>
>  header FOO_BAR_MSG              ALL =~ /^From\s+owner-foo-bar
>
>Also, it occurs to me that I could have used procmail to examine the
>envelope From header and had procmail insert a header like:
>
>  X-From-Foo-Bar: yes
>
>and then had SpamAssassin do the test:
>
>  header FROM_FOO_BAR                 exists:X-From-Foo-Bar
>
>David
>
>P.S.   FYI, the "header" related rules are documented in:
>
>         http://spamassassin.org/doc/Mail_SpamAssassin_Conf.html
>
>--- Original question
>
>Greetings!
>
>I'm a member of email list foo-bar.  I want SpamAssassin to deliver
>all foo-bar messages to my inbox, and not to the spam trap.  I need to
>add a rule for this.  The problem is, the only thing that reliably
>identifies this particular list is the envelope From header.  The "To:"
>and "Cc:" headers inside the message can't be relied upon because folks
>sometimes bcc the list.
>
>I can't figure out how to come up with a rule for this.  I tried: 
>
>  header FOO_BAR_MSG              From =~ /owner-foo-bar/
>  describe FOO_BAR_MSG            Message to the foo-bar list
>
>But this seems to want to examine the "From:" header inside the message.
>
>Has anyone solved this problem?
>
>Thanks!
>David
>-- 
>Live in a world of your own, but always welcome visitors.
>                                 ***
>Come to sig-beer-west!     http://www.extasia.org/sig-beer-west/
>Unix sysadmin available:   http://www.extasia.org/resume/

-- 
William R Ward            bill at wards.net          http://www.wards.net/~bill/
-----------------------------------------------------------------------------
"A foolish consistency is the hobgoblin of little minds, adored by
 little statesmen and philosophers and divines."        - Emerson




More information about the Baylisa mailing list