# Problem to send Netdata alarm

**URL:** <https://community.netdata.cloud/t/problem-to-send-netdata-alarm/41>\
**Category:** Help\
**Tags:** agent\
**Created:** [October 30, 2020, 10:28am UTC](https://community.netdata.cloud/t/problem-to-send-netdata-alarm/41 "2020-10-30T10:28:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![walthack](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/walthack/32/4030_2.png) [@walthack](https://community.netdata.cloud/u/walthack)\
**Post date:** [October 30, 2020, 10:28am UTC](https://community.netdata.cloud/t/problem-to-send-netdata-alarm/41/1 "2020-10-30T10:28:04Z")

</div>

Hi guys, sorry for a kinda newbie question.  
I have netdata deployed and installed on one client machine, and have email notification enabled. In my environment, there is a postfix relay and it bypass all mail to outside mx.  
I mailq the client and notice my netdata alarm is in deferred queue and cannot get out correctly. Mailq which shows error

```auto
09U9DWl9070492 10844 Fri Oct 30 09:13 <netdata@test.domain>
                 (Deferred: Connection timed out with mxa-00082601.gslb.pphost)
                                         <myself@test.domain>
09U9X0RC073560 10844 Fri Oct 30 09:33 <netdata@test.domain>
                 (Deferred: Connection timed out with mxb-00082601.gslb.pphost)
                                         <myself@test.domain>
09U9GWTQ071494 11452 Fri Oct 30 09:16 <netdata@test.domain>
                 (Deferred: Connection timed out with mxb-00082601.gslb.pphost)
                                         <myself@test.domain>

```

Here is what i did so far:

My health\_alarm\_notify.conf looks like this:

```auto
sendmail="/usr/sbin/sendmail"
EMAIL_SENDER="netdata@test.domain"
# enable/disable sending emails
SEND_EMAIL="YES"
# if a role recipient is not configured, an email will be send to:
DEFAULT_RECIPIENT_EMAIL="myself@test.domain"

```

my config on /etc/mail.rc mailx config

```auto
set from=netdata@test.domain
set smtp=postfix-1.test.domain

```

1. Under user “netdata” with following command, and that msg could reach my inbox.

```auto
echo "test" | mail -s 'mail test' myself@test.domain

```

1. Tried following command from netdata instruction,

```auto
su -s /bin/bash netdata  
bash -x /opt/netdata/usr/libexec/netdata/plugins.d/alarm-notify.sh test

```

it looks good also, this is the output

```auto
# SENDING TEST WARNING ALARM TO ROLE: sysadmin
2020-10-30 10:20:13: alarm-notify.sh: INFO: sent email notification for: client-1.test.domain test.chart.test_alarm is WARNING to 'myself@test.domain'
# OK

# SENDING TEST CRITICAL ALARM TO ROLE: sysadmin
2020-10-30 10:20:13: alarm-notify.sh: INFO: sent email notification for: client-1.test.domain test.chart.test_alarm is CRITICAL to 'myself@test.domain'
# OK

# SENDING TEST CLEAR ALARM TO ROLE: sysadmin
2020-10-30 10:20:13: alarm-notify.sh: INFO: sent email notification for: client-1.test.domain test.chart.test_alarm is CLEAR to 'myself@test.domain'
# OK

```

Could anyone point me out what i might missed or did wrong? Thanks so much indeed as i struggled in this for days…

---

<div class="post-metadata">

**Author:** ![Thiago\_Marques\_0](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/thiago_marques_0/32/281_2.png) [@Thiago\_Marques\_0](https://community.netdata.cloud/u/Thiago_Marques_0)\
**Post date:** [October 30, 2020, 6:58pm UTC](https://community.netdata.cloud/t/problem-to-send-netdata-alarm/41/2 "2020-10-30T18:58:45Z")

</div>

Hello @walthack ,

Is the file `/etc/mail.rc` readable for any user?

Let me explain a little bit the environment used to send alarms, Netdata creates and overwrites some variables during [startup](https://github.com/netdata/netdata/blob/7c3662b06355aecad2dd05f9db50a05919feeba5/daemon/main.c#L718). It is possible that if you set inside its `$HOME` an analogous file with the same information you have at `/etc/mailr.rc`, it will be able to send the emails. I am believing that netdata user does not have read permission on `/etc/mail.rc`.

Best regards!
