Christian Nygaard wrote:
> How do I write a local spamassassin rule that matches received from
> header mail? . I've tried
> writing a header matching rule but it doesnt seem to work. Can you
> show a short example
> of a working header matching rule for received from?
> Received: from

Adam Lanier and Mr Gus already posted working rule examples.

Might I also suggest reading the Wiki article on basic rule writing? It
covers a lot of stuff that may be helpful.

Disclaimer: I wrote a lot of the text here, so I've got some personal
bias. However, I think it would be helpful to you.