Merge branch 'jk/mailinfo-cleanup'

Code clean-up.

* jk/mailinfo-cleanup:
  mailinfo: factor out some repeated header handling
  mailinfo: be more liberal with header whitespace
  mailinfo: simplify parsing of header values
  mailinfo: treat header values as C strings
