Monit: SMTP: Mailserver response error -- 550 Sender -Verification failed for <monit@firewall.lan>

Issue #1038 resolved
Terish created an issue

Instead of from: ipfire@mailserver.com

Monit sends emails from monit@$hostand that is causing SMTP 550 error

set mail-format {
    from: ipfire@mailserver.com

Using Monit 5.32.0 as addon to IPFire (https://www.ipfire.org/) I configured monitrc as fiollows

SET MAILSERVER
    smtp.mailserver.com
    PORT 465
    USERNAME ipfire@mail.com
    PASSWORD Pa$$
    using tls
SET MAIL-FORMAT {
from:    Monit <ipfire@mail.com>
subject: Monit alert on $HOST  --  $EVENT $SERVICE
message: $EVENT on the service: $SERVICE

Date:         $DATE
Action:       $ACTION
Host:         $HOST
Description:  $DESCRIPTION
}

SET ALERT ipfire@mail.com

you could substitute either of these:

from: Monit <monit@$HOST>

from: ipfire@mail.com

they all result in the same error in system log:

SMTP: Mailserver response error -- 550-The mail server does not recognize monit@ ipfire.lan as a valid sender.
Alert handler failed, retry scheduled for next cycle 

P.S.

Similar error found in OPNSense - 5 years ago

https://github.com/opnsense/plugins/issues/145

Comments (6)

  1. Tildeslash repo owner

    Hi,

    please can you run monit in the debug mode? It’ll log SMTP session details.

    1.) stop Monit

    2.) start it in debug mode in foreground:

    ‌ monit -vI

    Please collect the debug messages for SMTP and send it to us.

  2. Terish reporter

    Thank you. running it in foreground

    monit -vI

    seems to fix the issue.

    12:09:03 monit[22325]: SMTP <- 235 Authentication succeeded
    12:09:03 monit[22325]: SMTP -> MAIL FROM: ipfire@mail.com^M
    12:09:04 monit[22325]: SMTP <- 250 OK
    12:09:04 monit[22325]: SMTP -> RCPT TO: ipfire@mail.com^M
    12:09:04 monit[22325]: SMTP <- 250 Accepted

  3. Log in to comment