I recently wrote a scheduled job sends an email report to a Distribution List (DL) every day.

However, when I tried to send an email to this list using the Apache Commons Email library, I saw the following error:

Your message can't be delivered because delivery to this address is restricted.

The following thread comments to un-check the Require that all senders are authenticated check-box - in order to allow my un-authenticated email to email the DL.

enter image description here

From a security point-of-view, would it be OK to un-check the above box and simply add a white-list exception for donotreply_my_fake_email@COMPANY.com?

In particular, my concern would be if someone sent an email to this DL, but included a malicious link.

Perhaps informing the DL recipients that the report email will never include any links would be useful? And, if it does, then they should alert me immediately.

  • A better option is to use an email server on localhost (so you have a much smaller attack surface). The your only concern with the email would be the existence of the From: address. – grochmal Dec 29 '16 at 17:48
  • @grochmal - could you please say more? I don't understand your comment, namely the "only concern with the email would be the existence of the 'From:' address." – Kevin Meredith Dec 29 '16 at 17:52
  • Well, any server connected to the internet (even through a NAT) can send an email. SMTP is insecure by design. What happens is that the receiver of an email queries the domain of an email whether the email exists. So for a From: joe@gmail.com, gmail.com is queried whether that email actually exists for that domain, if no such email address exists the mail is simply thrown away. YMMV, that's just the most common technique, other techniques exist. – grochmal Dec 29 '16 at 21:15

Maybe you can know whether in your use case it is fine or not that the DL accepts mail for unauthenticated sources, but certainly I cannot!

Anyway, you have plenty of security options:

  • allow any sender to write to the list without authentication - low security as any one knowing about the DL could send anything there
  • allow only one sender to the DL. Attackers will have to fake the sender address to post, but it is not that hard - slightly higher security but still not that high
  • allow only a restricted list of authenticated senders. Nice security level, but it supposes that your report engine is able to authenticate.
  • do not secure the sending of mail, but sign them - recipients should simply control the mail signature

If it is a confidential DL and information is not really critical, you are on you own. Said differently, if the risk is low the security can be low too. In any other use case (important data or large diffusion DL) you should either sign the mails or authenticate senders (or both)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.