Max message length calculations