Skip to content

Commit

Permalink
Merge pull request #2 from milos85vasic/feature/MSF-3
Browse files Browse the repository at this point in the history
Feature/msf 3
  • Loading branch information
milos85vasic authored Sep 23, 2020
2 parents 2a33840 + f587543 commit df9cfb2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions Dovecot/Configuration/conf.d/proto.90-quota.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

plugin {

quota_rule = *:storage={{SERVICE.MAIL_RECEIVE.MAILBOXES_CAPACITY}}
quota_rule1 = INBOX/Trash:storage=1G
quota_rule2 = INBOX/Archive:storage=+20%%
Expand Down
10 changes: 5 additions & 5 deletions Dovecot/Utils/proto.quota-warning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
PERCENT=$1
USER=$2

cat <<EOF | /usr/lib/dovecot/dovecot-lda -d ${USER} -o plugin/quota=maildir
From: {{SERVER.POSTMASTER}}
Subject: Quota warning
Your mailbox is currently ${PERCENT}% full.
EOF
echo "From: {{SERVER.POSTMASTER}}
Subject: Quota warning
Your mailbox is currently $PERCENT% full.
" | /usr/libexec/dovecot/dovecot-lda -d "${USER}" -o plugin/quota=maildir
11 changes: 11 additions & 0 deletions Dovecot/proto.receivemail.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Dovecot service running on Docker
After=docker.service
Requires=docker.service

[Service]
Restart=always
ExecStart={{DOCKER.DOCKER_HOME}}/Definitions/Dovecot/start.sh

[Install]
WantedBy=multi-user.target

0 comments on commit df9cfb2

Please sign in to comment.