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

Option to Enable/Disable MX Records Check #92

Open
fabl3ss opened this issue May 30, 2023 · 1 comment
Open

Option to Enable/Disable MX Records Check #92

fabl3ss opened this issue May 30, 2023 · 1 comment

Comments

@fabl3ss
Copy link

fabl3ss commented May 30, 2023

We encountered an issue with the CheckMX functionality as it currently lacks a configurable option for disabling this check. It would be highly beneficial to have a similar functionality to that of CheckSMTP, which already implements an option to enable or disable SMTP checks using a bool variable:

func (v *Verifier) CheckSMTP(domain, username string) (*SMTP, error) {
    if !v.smtpCheckEnabled {
        return nil, nil
    }
    // ...
}

To address this limitation, I propose introducing a new field specifically for enabling or disabling MX checks in the Verifier. This approach would align with the existing implementation in CheckSMTP.

For example, the modified code snippet could look like this:

func (v *Verifier) CheckMX(domain string) (*Mx, error) {
    if !v.mxCheckEnabled {
        return nil, nil
    }
    // ...
}

I think it makes sense to set mxCheckEnabled value to true by default, so it won't change current behavior.

I am enthusiastic about contributing to this enhancement if my proposal aligns with your vision.

@lryong
Copy link
Contributor

lryong commented Jun 9, 2023

Hi @fabl3ss
Thanks for the business scenarios and suggestions you mentioned, your suggestions are very useful! Feel free to PR 😃

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

No branches or pull requests

2 participants