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

MailCommand param pattern too greedy for outlook.com #291

Closed
shadogray opened this issue Nov 7, 2019 · 1 comment
Closed

MailCommand param pattern too greedy for outlook.com #291

shadogray opened this issue Nov 7, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@shadogray
Copy link

shadogray commented Nov 7, 2019

outlook.com appends an AUTH field to the MAIL command, which is not handled by the current "PARAM" Pattern:
command=MAIL FROM:thomas_tester@outlook.de AUTH=<>
EUR02-AM5-obe.outbound.protection.outlook.com

Pattern PARAM = Pattern.compile("MAIL FROM:\\s?<(.*)>", ...)
produces:
"thomas_tester@outlook.de> AUTH=<"

The simple change from greedy to non-greedy:
"MAIL FROM:\\s?<(.*?)>.*"
or exclusion - IMHO preferred, because more precise:
"MAIL FROM:\\s?<([^>]*)>.*"
would solve the issue correctly

shadogray pushed a commit to shadogray/greenmail that referenced this issue Nov 7, 2019
@marcelmay marcelmay self-assigned this Nov 10, 2019
@marcelmay marcelmay added the bug label Nov 10, 2019
@marcelmay marcelmay added this to the 1.5.12 milestone Nov 10, 2019
@marcelmay
Copy link
Member

Thx alot!

This fixes handling the additional ESMTP parameters such as the mentioned AUTH=... .

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

No branches or pull requests

2 participants