FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
344 views 3 comments
by anonymous

My RUT240 with firmware RUT2XX_R_00.01.13.3 is not sending emails defined in Events Reporting. Test email is delivered OK.

Configuration (/etc/config/events_reporting)
config rule
        option event 'Backup'
        option eventMark 'all'
        option action 'sendEmail'
        option enable '1'
        option emailSend '1'
        option checkint '5'
        option email_count '4'
        option subject 'XYZ'
        option smtpIP 'wes1-smtp.wedos.net'
        option secureConnection '1'
        option userName 'email@example.com'
        option password '***'
        list recipEmail 'mail2@example.com'
        option senderEmail 'email@example.com'
        option smtpPort '587'
        option message 'Router name - %rn;%nl Event type - %et; %nl Event text - %ex; %nl Time stamp - %ts; %nl    '

It looks like, there is missing or not running service, which is responsible for checking logs and sending emails.

If switch changes to Failover, I can see in log Event type "Backup", but no mail is sended.

It looks like simililar to question https://community.teltonika-networks.com/27738/rutx11-events-reporting-rules

Which service is responsible for sending Events Reporting emails? Can I check it on CLI (SSH)?

Thanks


 

2 Answers

0 votes
by anonymous

Shortly

There is some undocumented limit for Subject to 26 characters.

Deeper

Service responsible for sending emails is Messaged. You can see log in CLI/SSH with command
logread -f
If there is some log record with sending email, there will be something like
Mon Feb 22 10:13:21 2021 user.info Messaged[2625]: Start from new event "Backup" "Switched to main WAN (Wired)"
Mon Feb 22 10:13:24 2021 user.info Messaged[2625]: Email sent successfully
If mails are not working, the second line is missing.
My problem was, that I used subject longer than 26 characters.

Solution

Use Subject in Events Reporting for mail max to 26 characters.
Best answer
0 votes
by anonymous
Hi,

I wasn't able to reproduce this issue on the latest firmware version.

Let's go deeper into this:

- Try other events, like send emails on received SMS. Send an SMS to your phone number of the SIM inserted in the router and see if you get an email.

- Try resetting the router to factory default settings.

- What email service you're using? It looks like from your config that it's some kind of custom one. Could you try something basic like gmail? Remember that there you need to activate 3rd party app access through the settings.

EB.
by anonymous
Thanks for checking. My appology, the problem was not in the example config, for privacy I have changed the Subject.

I found out, that there is undocumented limit for mail Subject to max 26 characters.
by anonymous
Thank you, I added it to the wiki: https://wiki.teltonika-networks.com/view/RUT240_Events_Log#Send_Email

It now says that it's limited to 26 characters.

EB.
by anonymous
Great, thanks.