Closed Mischback closed 1 year ago
Dovecot
10-auth.conf
auth_mechanism
Outlook
login
plain
10-mail.conf
mail_location
maildir:~/Maildir
mail_plugins
quota
10-master.conf
Postfix
# Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0660 user = postfix group = postfix }
lmtp
service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } }
10-ssl.conf
ssl_cert
ssl_key
ssl_cert = </etc/letsencrypt/live/webmail.example.org/fullchain.pem
20-lmtp.conf
sieve
[x] 90-quota.conf
90-quota.conf
[x] Provide the actual mailbox quota
plugin { quota = maildir:User quota quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "452 4.2.2 Mailbox is full and cannot receive any more emails" }
service quota-status { executable = /usr/lib/dovecot/quota-status -p postfix unix_listener /var/spool/postfix/private/quota-status { user = postfix } }
unix_listener
mode
group
user_db
plugin { quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u } service quota-warning { executable = script /usr/local/bin/quota-warning.sh # Adjust script path! unix_listener quota-warning { user = vmail group = vmail mode = 0660 } }
#!/bin/sh PERCENT=$1 USER=$2 cat << EOF | /usr/lib/dovecot/dovecot-lda -d $USER -o "plugin/quota=maildir:User quota:noenforcing" From: postmaster@webmail.example.org Subject: Quota warning - $PERCENT% reached
Your mailbox can only store a limited amount of emails. Currently it is $PERCENT% full. If you reach 100% then new emails cannot be stored. Thanks for your understanding. EOF
Basic implementation completed as of f749eb01c201f1f5d85f6997177c45bd0d1cd80b
Relevant
Dovecot
settings10-auth.conf
auth_mechanism
:Outlook
requireslogin
,plain
is the defaultDovecot
's documentation10-mail.conf
mail_location
maildir:~/Maildir
, but as we are (mainly) concerned about virtual users, how does this work?mail_plugins
: addquota
to manage the size of users' mailboxes10-master.conf
Postfix
:lmtp
socket forPostfix
(might already be there, configure accordingly)10-ssl.conf
ssl_cert
andssl_key
: Point to the respective filesssl_cert = </etc/letsencrypt/live/webmail.example.org/fullchain.pem
, making the content of the certificate available!20-lmtp.conf
if server sidesieve
should be applied, activate the plugin here (needs packet installation)[x]
90-quota.conf
[x] Provide the actual mailbox quota
Postfix
unix_listener
lackingmode
andgroup
settings, as they are present in the other socket definitions?quota
must be provided by theuser_db
; needs investigation!Your mailbox can only store a limited amount of emails. Currently it is $PERCENT% full. If you reach 100% then new emails cannot be stored. Thanks for your understanding. EOF
user_db
setting. This needs careful attention, because my setup will not rely on SQL as backend (deviating from the tutorial!); see https://doc.dovecot.org/configuration_manual/authentication/user_databases_userdb/ and https://doc.dovecot.org/configuration_manual/authentication/passwd_file/#authentication-passwd-file