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

Modify regex in the RcptCommand class to allow adding parameters. #822

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

ghdcksgml1
Copy link
Contributor

Hello! I’ve been using GreenMail useful.

While using it, I noticed one area that could be improved, so I’m submitting this PR to address it.

According to [RFC 2821 Section 4.1.1.3] mentioned in the Java docs, the RCPT TO command, like the MAIL command, can accept parameters.

However, currently, an error occurs when parameters are added as shown below.

issueCommand : "RCPT TO: <test@localhost> NOTIFY=SUCCESS,FAILURE"

expect: "250 OK"
actual : "501 Required syntax: 'RCPT TO:<email@host>'"

In my case, I am customizing the SMTPTransport to include custom parameters, but errors occur every time a parameter is added.

I would greatly appreciate it if you could allow changing the regular expression used in the MAILCommand class to accommodate this!

@marcelmay marcelmay self-assigned this Nov 26, 2024
@marcelmay marcelmay added this to the 2.1.x milestone Nov 26, 2024
@marcelmay
Copy link
Member

Thanks alot, @ghdcksgml1 !

@marcelmay marcelmay merged commit bb55819 into greenmail-mail-test:master Nov 27, 2024
3 checks passed
@marcelmay
Copy link
Member

@ghdcksgml1 , I plan to roll a patch release 2.1.2 this weekend

@ghdcksgml1
Copy link
Contributor Author

Thanks to apply my opinion! @marcelmay

@marcelmay marcelmay modified the milestones: 2.1.x, 2.1.2 Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants