Wsgetmail duplicate tickets o365

We are using RT 5.0.1
We recently had to implement wsgetmail to comply with Office 365 changes in authentication.
All is well now.
I have the cronjob set for every 10 minutes

here is my wsgetmail.json file
cat wsgetmail-support.json
“client_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“tenant_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“secret”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“global_access”: 1,
“username”: “”,
“folder”: “Inbox”,
“command”: “/opt/rt5/bin/rt-mailgate”,
“command_args”: “/opt/rt5/bin/rt-mailgate --url --no-verify-ssl --queue 1.General --action correspond”,
“command_timeout”: 30,
“action_on_fetched”: “mark_as_read”

Not every ticket gets duplicated but it is frequent.

Any suggestions?
Thank you,

Did you ever find a solution to this? I’m getting the same.

Hi - I made the cronjob go every 30 minutes - no one is happy with this solution but I had no other solution.
Post here if you find something.

I’m using procmail in my command entry and I notice that its returning an error. I also read this in the documentation for wsgetmail:

When the mail processing command exits with an error (non-zero) status the action_on_fetched is not performed on that message so that it will be processed on the next run.

Maybe your getting a non-zero return code from the command you’re calling?