Skip to content

AUTH, Message-Size, STARTTLS, encoding, "firewall" #78

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

Open
wants to merge 50 commits into
base: master
Choose a base branch
from

Conversation

imario42
Copy link

@imario42 imario42 commented Mar 31, 2025

Hi Cédric!

I forked your library and implemented some things so I can maybe use it as an in-house SMTP sink.
Unfortunately this somehow went out of control and the PR is very comprehensive and also contains some layout changes which I probably should have avoided. Sorry for that.

  • Use byte-arrays to read the message from the wire (instead of bufferedReader.readLine) to not have to deal with encodings and get the data 1:1 into the MimeMessage.
  • Use ExecutorService instead of ThreadFactory.
  • Message size limitation. SmtpServerBuilder.withMaxMessageSize
  • Remote IP restriction (via "SmtpFirewall"). SmtpServerBuilder.withFirewall
  • Authentication (PLAIN, CRAM-MD5). SmtpServerBuilder.withAuth
  • STARTTLS. SmtpServerBuilder.withSecure

Beware: Beside that I also updated the pom.xml to deploy via the Maven Central Publisher under my group id.
This definitely needs to be undone.

Said that, I would perfectly understand if you do not want to merge that beast yet (or never).
I will stay on my fork until I know that it works as expected in PROD.

imario42 added 30 commits March 28, 2025 15:05
…ual Threads support.

enh: Use ExecutorService for handling new connections.
enh: Message size limitation.
…ual Threads support.

enh: Use ExecutorService for handling new connections.
enh: Message size limitation.
@ctabin
Copy link
Owner

ctabin commented Apr 2, 2025

Hi @imario42,

Thanks for your contribution. Your PR seems amazing with a lot of features !

There sure are some very interesting ideas, but as you stated, there is a lot of modifications in many ways and that make this PR unmergeable. It would be amazing if you could implement AUTH and STARTTLS in two separates PR.

Please also note that I want to maintain JDK11 compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants