Email notifications fail - Service Watchdog



  • Hello.

    I'm not sure if this is specific to the package or a wider problem with pfSense… I have emails successfully set up via System -> Advanced -> Notifications tab (with working test emails received)
    In the log is the following:.

    notify_monitor.php: Could not send the message to my@email.com – Error: Failed to add recipient: my@email.com [SMTP: Invalid response code received from server (code: 550, response: 5.7.1 Relaying denied)]

    Any idea what would cause this?



  • @Mateh:

    …. (code: 550, response: 5.7.1 Relaying denied)]

    Any idea what would cause this?

    Yep.
    "You" send a mail without identifying first. Your mail server said 5.7.1 (their language for"sorry, no free ride here, ID or get l*st").

    I never used "Service_Watchdog", because didn't know I needed it. Never sw a serveice go down if it was not me stopping it - anyway, I installed it - make it monitor a service, Avahi, and I 'killed' Avahi.
    I received the mail, my own postfix mail server - very picky about syntax - using TLS - own domaine name) :

    Notifications in this message: 1

    10:55:00 Service Watchdog detected service avahi stopped. Restarting avahi (Avahi
    Zeroconf/mDNS Daemon)

    Btw : Notifications also works if I use a mail from my ISP - or gmail - or yahoo or hot/look/msn/play mail server.



  • @Gertjan:

    Yep.
    "You" send a mail without identifying

    I just can't figure out why it would be saying this if the SMTP settings are correct and can send emails successfully from there. They're supposod to be using the same settings?



  • The Service_Watchdog package uses the function notify_via_smtp(), and this function is the one that sends mails as per your instructions.
    Service_Watchdog doesn't send mails on it own - I just checked.

    Btw : we are talking latest version of pfSense and the Service_Watchdog ( 1.8.4 ), right ?

    edit : What are your mail settings ?



  • Indeed.

    pfSense 2.4.3 running Service_Watchdogs 1.8.4.

    Settings from Notifications:

    E-Mail server: smtp.mailgun.org
    SMTP Port of e-Mail server: 465
    Secure SMTP Connection: [tick]
    From e-mail address: my@email.com
    Notification E-mail address: my@email.com
    Notification E-Mail auth username: my@login.email
    Notification E-Mail auth password: mypass
    Notification E-Mail auth mechanism: PLAIN



  • @Mateh:

    Indeed.

    pfSense 2.4.3 running Service_Watchdogs 1.8.4.

    Settings from Notifications:

    E-Mail server: smtp.mailgun.org
    SMTP Port of e-Mail server: 465
    Secure SMTP Connection: [tick]
    From e-mail address: my@email.com
    Notification E-mail address: my@email.com
    Notification E-Mail auth username: my@login.email
    Notification E-Mail auth password: mypass
    Notification E-Mail auth mechanism: PLAIN

    Looks fine to me.
    I have exactly the same thing, with one difference : I'm not using some mail supplier, but my own mail server on a delicate server on the Internet (so I have full control on both sides).

    You are using the right port (465 - which uses TLS from start) and you are identifying yourself correctly.
    If this goes wrong ones in a while, answers should by found by the one running "smtp.mailgun.com".