Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify return-path for incoming messages #41

Closed
foxcpp opened this issue Apr 6, 2019 · 6 comments · Fixed by #45
Closed

Verify return-path for incoming messages #41

foxcpp opened this issue Apr 6, 2019 · 6 comments · Fixed by #45
Labels
security Related to security measures.

Comments

@foxcpp
Copy link
Owner

foxcpp commented Apr 6, 2019

Following conditions should be met for verification to pass:

  • rDNS domain of source server's IP should be equal to the hostname value presented in EHLO/HELO command
  • Hostname domain presented in EHLO/HELO command should resolve to source server's IP address
  • Domain in MAIL FROM should have MX record pointing to the source server

These checks are built on the assumption that we have a DNSSEC-enabled resolver and the source server does have DNSSEC enabled.

@foxcpp foxcpp added smtp security Related to security measures. labels Apr 6, 2019
@foxcpp
Copy link
Owner Author

foxcpp commented Apr 7, 2019

I wonder whether we should require rDNS records to be present for the source server. Gmail requires that and so any legitimate and properly configured mail server that wants to work with it (almost all?) should have it.

@jpsamaroo
Copy link

Counter-argument to requiring rDNS - I run a mailserver at home but my ISP won't configure rDNS since I don't host from a business plan (and they won't let me upgrade to one...). This breaks sending to only a limited number of recipients, and most mailservers seem to not care about rDNS and receive my email just fine.

@foxcpp
Copy link
Owner Author

foxcpp commented Apr 7, 2019

Alright, we will leave the rDNS check turned off by default then.

@foxcpp
Copy link
Owner Author

foxcpp commented Apr 11, 2019

I wonder if we should define something to run these checks before client sends us a body to not waste traffic on messages that will be rejected anyway.

@foxcpp
Copy link
Owner Author

foxcpp commented Apr 11, 2019

@NamedKitten is working on it (run and hide, kitten is using git)

@emersion
Copy link
Collaborator

I wonder if we should define something to run these checks before client sends us a body to not waste traffic on messages that will be rejected anyway.

Should probbaly be done by optimizing the whole pipeline to be streaming instead.

@foxcpp foxcpp added this to the 0.1 milestone May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security Related to security measures.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants