Christian Nygaard wrote:
> How do I write a local spamassassin rule that matches received from
> header mail?.example.com . 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 mail3.example.com


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.

http://wiki.apache.org/spamassassin/WritingRules

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.