Bypassing header checks for local clients (PostFix/Amavis)

Issue: Email with non-legitimate headers (eg: generated from scripts) from one of my servers was being trashed by Postfix/Amavis. Very annoying, and in the end I had to modify the /etc/amavisd/avavisd.conf file as follows to make things work properly:

$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
  originating => 1,  # is true in MYNETS by default, but let's make it explicit
  os_fingerprint_method => undef,  # don't query p0f for internal clients
  bypass_spam_checks_maps   => [1],  # don't spam-check internal mail
  bypass_banned_checks_maps => [1],  # don't banned-check internal mail
  bypass_header_checks_maps => [1],  # don't header-check internal mail

Note that @mynetworks is defined as follows, where is an additional server not in RFC1918 space.

@mynetworks = qw( [::1] [FE80::]/10 [FEC0::]/10