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

Watchdog fails to send email if first MX record is down #6200

Closed
ScrumpyJack opened this issue Dec 5, 2024 · 1 comment
Closed

Watchdog fails to send email if first MX record is down #6200

ScrumpyJack opened this issue Dec 5, 2024 · 1 comment
Labels
bug stale Please update the issue with current status, unclear if it's still open/needed.

Comments

@ScrumpyJack
Copy link

ScrumpyJack commented Dec 5, 2024

This one is a bit long winded, so apologies for the editing mess.

watchdog.sh starts up and resolves MX with dig +short ${RCPT_DOMAIN} mx

If dig returns an mx record, it then sends an email with smtp-cli

smtp-cli then looks up MX records as well with Net::DNS::mx and always returns the first element of the array which is the first MX record in the order of priority (so it will always return the same MX record)

If that mx is down, you'll never get emails as smtp-cli does not try another mx record.

smtp-cli is unmaintained, so it might be better to fix it in watchdog.sh by checking each $mx returned by dig (in MX priority order) using smtp-cli --server $mx, then when the first that responds is found, pass it to smtp-cli --host

@ScrumpyJack ScrumpyJack added the bug label Dec 5, 2024
@ScrumpyJack ScrumpyJack changed the title Watchdog fails to send email if highest MX priority record is down Watchdog fails to send email if MX record is down Dec 5, 2024
@ScrumpyJack ScrumpyJack changed the title Watchdog fails to send email if MX record is down Watchdog fails to send email if one MX record is down Dec 5, 2024
@ScrumpyJack ScrumpyJack changed the title Watchdog fails to send email if one MX record is down Watchdog fails to send email if first MX record is down Dec 5, 2024
@milkmaker
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@milkmaker milkmaker added the stale Please update the issue with current status, unclear if it's still open/needed. label Feb 4, 2025
@milkmaker milkmaker closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale Please update the issue with current status, unclear if it's still open/needed.
Projects
None yet
Development

No branches or pull requests

2 participants