Fix cronjob errors of Dovecot expunge

Recently, I discovered that the cronjob on my mailcow-dockerized host isn't working.
If the script is called via crontab, the docker-compose command doesn't know where the config file is located. So I added the "cd" to change the directory to the working directory of the mailcow-dockerized instance.
When executing the docker-compose exec command via cronjob, it fails with error message "the input device is not a TTY". By adding the parameter "-T" it works.
Dieser Commit ist enthalten in:
Tobias Strobel 2018-04-08 14:33:14 +02:00 committet von GitHub
Ursprung 60fc58622e
Commit c1cb6c9e07
Es konnte kein GPG-SchlĂĽssel zu dieser Signatur gefunden werden
GPG-SchlĂĽssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -31,8 +31,9 @@ If you want to automate such a task you can create a cron job on your host that
```
#!/bin/bash
/usr/local/bin/docker-compose exec dovecot-mailcow doveadm expunge -A mailbox 'Junk' savedbefore 2w
/usr/local/bin/docker-compose exec dovecot-mailcow doveadm expunge -A mailbox 'Junk' SEEN not SINCE 12h
cd /opt/mailcow-dockerized
/usr/local/bin/docker-compose exec -T dovecot-mailcow doveadm expunge -A mailbox 'Junk' savedbefore 2w
/usr/local/bin/docker-compose exec -T dovecot-mailcow doveadm expunge -A mailbox 'Junk' SEEN not SINCE 12h
[...]
```