class AutomaticallySentMailDetectorImpl implements AutomaticallySentMailDetector {

    @Override
    public boolean isAutomaticallySent(Mail mail) throws MessagingException {
        return !mail.hasSender() ||
            isMailingList(mail) ||
            isAutoSubmitted(mail) ||
            isMdnSentAutomatically(mail);
    }

}