Closed hoxxep closed 8 months ago
A better reason for why a config may be preferable is because rust features are meant to be additive. [1]
If crates A and B both depend on crate D, A might require feature 1, while B might require feature 2, and rust assumes that in the final build it can compile D once with features 1+2 enabled.
In this case, the skip-ehlo
feature is subtracting functionality, causing me to carefully depend on two builds of mail-send
, or always manually run EHLO. Hopefully this PR can be considered to remove the need for the feature gate altogether. Thank you!
Hi @hoxxep thanks for the PR! I've been busy working on Stalwart Mail Server and couldn't find time to review it as it affects multiple parts of the project. I will probably just remove this feature from mail-send and implement the functionality directly in Stalwart Mail Server.
Closing this PR as this skip-helo
feature has been removed.
Hi, I love the work on Stalwart mail server!
Depending on the mail-send crate across a larger codebase sometimes requires skipping EHLO and sometimes doesn't. Using compile-time flags results in accidental behaviour where all usage either skips or doesn't skip, or care is needed to compile and use two separate dependencies, with some other headaches potentially requiring multiple mail-builder deps.
This PR removes the
skip-ehlo
compile-time feature in favour of a config option in theSmtpClientBuilder
for usability. If you're happy to include this PR, I can make a matching PR to fix usages in mail-server and any other stalwart repos that use theskip-ehlo
feature.Let me know if there's anything else I can do to make this an easy change.
Matching PR: https://github.com/stalwartlabs/mail-server/pull/121
Cheers, Liam