myDevice on Raspberry

Raspberry Pi 3 Model B
Web dashboard

i doubt it is a bug probably more a problem in (my) configuration.
dashboard is working and pi is working but i do get an enormous amount of error lines in syslog because of cayenne trying to sent a message via email. the message is sent every minute and each time it is rejected by the mailserver. this fills up my syslog. the message tries to tell me that myDevices is running. the problem is that the to address is not resolved for some reason. very well possible that this is not an cayenne issue but all other mail messages work so somehow cayenne uses another way to sent the message? below the message as in the syslog with the rejection:

MAIL FROM:mad@misja.biz
250 2.1.0 Sender OK
RCPT TO:mad@misja.biz
250 2.1.5 Recipient OK
DATA
354 Start mail input; end with .
Received: by misja.biz (sSMTP sendmail emulation); Mon, 09 Sep 2019 09:52:01 +0200
From: “root” mad@misja.biz
Date: Mon, 09 Sep 2019 09:52:01 +0200
To: root
Subject: Cron root@raspberrypi1 /etc/myDevices/crontab.sh
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
myDevices is running.
sSMTP[22375]: .
sSMTP[22375]: 554 5.2.0 STOREDRV.Submission.Exception:InvalidRecipientsException; Failed to process message due to a permanent exception with message Recipient “root” isn’t resolved. All recipients must be resolved before a message can be submitted. InvalidRecipientsException: Recipient “root” isn’t resolved. All recipients must be resolved before a message can be submitted. [Hostname=AM0P192MB0467.EURP192.PROD.OUTLOOK.COM

i am not really familiair with linux so have no idea where to look.
i can see two solutions:

  1. disable sending the message (it has no use for me i do not need it) but where would i do that can’t find where it is sent.
  2. solve the alias so make “root” in the to field a valid address but i do not know where to do that. i use ssmtp and root is on that level replaced by mad@misja.biz as can be seen in the beginning of the message but at one place at least that doesn’t happen. any help in where to look would be appreciated.

sorry if it is obvious as i wrote i am not very experienced with linux and thanks for any help.

Seems like it’s probably cron sending that message, not our agent. I haven’t really dealt with cron emails before, but they may be able to disable that with some suggestion here: https://www.cyberciti.biz/faq/disable-the-mail-alert-by-crontab-command/

Like Shramik said, seems to be a service you have configured that sends out emails. The Cayenne agent doesn’t send emails, that’s handled by the Cayenne servers. What is the output of crontab -e?

Hi, thanks for the suggestions and it looks like it must be something like that. i checked crontab -e and see the following comment:
Output of the crontab jobs (including errors) is sent through email to the user the crontab file belongs to (unless redirected).
so looks like the /etc/myDevices/crontab.sh (which is run every minute by cron) sents the output string: “myDevices is running” to stdout and cron puts that each time in an email and that message is rejected. i do not understand while that email fails; other cron jobs do actually sent an email but easiest solution here is to remove the output from crontab.sh. there is no need for this output as far as i can see. error messages from crontab.sh are useful in an email so i think i will try to solve the email error too but of course i do not want an email every minute telling me “myDevices is running”. i am surprised that this doesn’t bother other users as this cron behavior seems to be standard in raspbian linux 9

sorry for the large text. these lines were copied from the crontab file, don’t know why they ended so big unless maybe because of the pound sign at the beginning of the line?

quick update: i solved the issue by adding a line at the beginning of crontab:
MAILTO=“my@email.biz” this solved the unresolved errors in the syslog (and of course resulted in me receiving a success email every minute)
to prevent these success mails but keep possible error messages i added “> /dev/null” to the myDevices crontab line.
problem solved. thank you both for pointing me in the right direction.

2 Likes

Glad to hear you have fixed the issue.