use coloredlogs optionally
Mail State Machine refactor. Closes: #4059
changes file