It seems that the local delivery (pickup?) uses the content filter which
it shouldn't, AFAIK.
If that is the case, the following master.cf configuration taken from my
installation may help:
------ snip -------
<ip>:smtp inet n - n - - smtpd
-o content_filter=myspamfilter
-o receive_override_options=no_address_mappings,no_milters
<ip>:587 inet n - n - - smtpd
[<ip6>]:smtp inet n - n - - smtpd
-o content_filter=myspamfilter
-o receive_override_options=no_address_mappings,no_milters
[<ip6>]:587 inet n - n - - smtpd
127.0.0.1:smtp inet n - n - - smtpd
[::1]:smtp inet n - n - - smtpd
[...]
myspamfilter unix - n n - - pipe
flags=Rq user=debian-spamd argv=/etc/postfix/spamchk -oi -f ${sender}
${recipient}
-------- snap --------
The result is that only mail submitted on port 25 is piped through the
content filter (in my case a shell script involving SpamAssassin and
sendmail, similar to the mentioned README). Mail on 587 from users and
from localhost is not filtered.