Initial commit.
This commit is contained in:
commit
6de449ff28
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
private_README
|
11
crontab
Normal file
11
crontab
Normal file
@ -0,0 +1,11 @@
|
||||
# /etc/crontab: system-wide crontab
|
||||
# Unlike any other crontab you don't have to run the `crontab'
|
||||
# command to install the new version when you edit this file
|
||||
# and files in /etc/cron.d. These files also have username fields,
|
||||
# that none of the other crontabs do.
|
||||
|
||||
SHELL=/bin/sh
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
|
||||
# m | h | day of month | month | day of week | user | command
|
||||
30 0 * * * root docker -H tcp://127.0.0.1:2375 exec dockermailstack_dovecot_1 /root/dovecot_expire.sh > /proc/1/fd/2 2>&1
|
44
docker-compose.yml
Normal file
44
docker-compose.yml
Normal file
@ -0,0 +1,44 @@
|
||||
version: "2.1"
|
||||
|
||||
services:
|
||||
|
||||
dovecot:
|
||||
image: dovecot
|
||||
restart: always
|
||||
ports:
|
||||
- 993:993/tcp
|
||||
- 4190:4190/tcp
|
||||
networks:
|
||||
- mailnet
|
||||
volumes:
|
||||
- mail_data:/home/yohan
|
||||
- ./dovecot_expire.sh:/root/dovecot_expire.sh
|
||||
|
||||
fetchmail:
|
||||
image: fetchmail
|
||||
restart: always
|
||||
networks:
|
||||
- mailnet
|
||||
|
||||
feed2imap:
|
||||
image: feed2imap
|
||||
restart: always
|
||||
networks:
|
||||
- mailnet
|
||||
|
||||
cron-purge-dovecot:
|
||||
image: cron
|
||||
restart: always
|
||||
network_mode: "host"
|
||||
volumes:
|
||||
- ./crontab:/etc/crontab
|
||||
|
||||
networks:
|
||||
|
||||
mailnet:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
|
||||
mail_data:
|
||||
external: true
|
22
dovecot_expire.sh
Executable file
22
dovecot_expire.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
doveadm expunge -u admin mailbox Feeds.phoronix savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.hardwarefr savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.pcinpact_articles savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.planet_debian savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.planet-fr_debian_net savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.planetkde savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.le_monde savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.hardwarefr_articles savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.lesnumeriques savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.planet_libre savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.fedora-fr savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.pcinpact savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.dotkdeorg savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.reddit_science savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.reddit_technology savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.ars_technica savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.cinema_france savedbefore 60d
|
||||
doveadm expunge -u admin mailbox Feeds.cinema_usa savedbefore 60d
|
||||
echo `date +"%F %T"` "Old feeds purged"
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user