How to limit the number of e-mail messages?

Adam3 years ago

Hello,

When the car exceeds the speed, I receive a lot of emails. Is it possible to set an email limit? For example, 5 emails in an hour?
Today I received 70 e-mails within a dozen or so minutes.

Anton Tananaev3 years ago

You can use this configuration parameter to only send one notification per speeding:

https://github.com/traccar/traccar/blob/master/src/main/java/org/traccar/config/Keys.java#L236-L241

Adam3 years ago

In what file should I enter it?

    /**
     * If true, the event is generated once at the beginning of overspeeding period.
     */
    public static final ConfigKey<Boolean> EVENT_OVERSPEED_NOT_REPEAT = new ConfigKey<>(
            "event.overspeed.notRepeat",
            Collections.singletonList(KeyType.GLOBAL));
Anton Tananaev3 years ago

It says in the comment.

Adam3 years ago

Should I add this in the config.xml file?

<entry key='event.overspeed.notRepeat'>true</entry>