refactor checkgmail profiles to use JSON
Merge branch 'backports'