diff --git a/CHANGES b/CHANGES index 2d89437dc..fe710bf47 100644 --- a/CHANGES +++ b/CHANGES @@ -2620,4 +2620,5 @@ * support: Fix issue where app support tickets could not be opened * reverseproxy: prevent duplication of STS header * services: fix issue with timeout when restoring large databases +* notifications: email configuration error shown incorrectly diff --git a/src/cloudron.js b/src/cloudron.js index 036aa9881..c6df591c7 100644 --- a/src/cloudron.js +++ b/src/cloudron.js @@ -192,8 +192,12 @@ async function runSystemChecks() { } async function checkMailStatus() { - const message = await mail.checkConfiguration(); - await notifications.alert(notifications.ALERT_MAIL_STATUS, 'Email is not configured properly', message, { persist: true }); + const result = await mail.checkConfiguration(); + if (result.status) { + await notifications.clearAlert(notifications.ALERT_REBOOT, 'Email is not configured properly'); + } else { + await notifications.alert(notifications.ALERT_MAIL_STATUS, 'Email is not configured properly', result.message, { persist: true }); + } } async function checkRebootRequired() { diff --git a/src/mail.js b/src/mail.js index 85e52038c..01d9f6080 100644 --- a/src/mail.js +++ b/src/mail.js @@ -629,7 +629,7 @@ async function checkConfiguration() { if (markdownMessage) markdownMessage += 'Email Status is checked every 30 minutes.\n See the [troubleshooting docs](https://docs.cloudron.io/troubleshooting/#mail-dns) for more information.\n'; - return markdownMessage; // empty message means all status checks succeeded + return { status: markdownMessage === '', message: markdownMessage }; } async function createMailConfig(mailFqdn) {