I want to make a cron job with the doveadm command for cleaning up certain mailboxes.
But when i run it i get:

Error: net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission denied
doveadm(shops@bla.com): Fatal: setgid(12(mail) from userdb lookup) failed with euid=1011(******), gid=1013(e******), egid=1013(******): Operation not permitted (This binary should probably be called with process group set to 12(mail) instead of 1013(******))

Script is:
doveadm expunge -u 'shops@*****.**' mailbox 'INBOX.User details' before 14d

Also tried it with SUID with user set to MAIL and/or GUID with group set to MAIL.

What can i do??

Regards,
Dennis