[Dovecot-de] Quota Warning einrichten

Christian Garling christian.garling at cg-networks.de
Do Apr 25 13:45:31 CEST 2013


Hallo zusammen,

ich versuche gerade Quota Warning einzurichten, Quota selbst läuft 
schon. Ich habe die 90-quota.conf angepasst, Dovecot restartet und 
getestet, in dem ich so lange Mails von einem anderen Konto in mein 
Konto kopiert habe, bis die 60% Marke überschritten war. Leider kam 
keine Warn-Mail und im Log war auch nichts zu sehen. Das Skript 
quota-warning.sh habe ich natürlich auch angelegt. Ich bin da gerade 
etwas verloren warum das nicht klappt und vor allem wie man das 
vernünftig testen kann.

quota-warning.sh:

#!/bin/sh

PERCENT=$1
FROM="admin at peakwork.de"

msg="From: $FROM
To: $USER
To: admin at peakwork.de
Subject: Your email quota is $PERCENT% full
Content-Type: text/plain; charset=UTF-8

Your mailbox is now $PERCENT% full."

echo -e "$msg" | /usr/sbin/sendmail -f $FROM "$USER"

exit 0

Ausgabe von dovecot -n:

# 2.1.1: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.18-308.11.1.el5 x86_64 CentOS release 5.8 (Final)
auth_mechanisms = plain login
default_process_limit = 300
disable_plaintext_auth = no
hostname = mail.peakwork.de
mail_location = maildir:~/Maildir
mail_plugins = quota
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope 
encoded-character vacation subaddress comparator-i;ascii-numeric 
relational regex imap4flags copy include variables body enotify 
environment mailbox date ihave
namespace inbox {
   inbox = yes
   location =
   mailbox Drafts {
     special_use = \Drafts
   }
   mailbox Junk {
     special_use = \Junk
   }
   mailbox Sent {
     special_use = \Sent
   }
   mailbox "Sent Messages" {
     special_use = \Sent
   }
   mailbox Trash {
     special_use = \Trash
   }
   prefix =
}
passdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
plugin {
   quota = maildir:User quota
   quota_warning = storage=95%% quota-warning 95 %u
   quota_warning2 = storage=60%% quota-warning 60 %u
   sieve = ~/.dovecot.sieve
   sieve_dir = ~/sieve
}
postmaster_address = postmaster at peakwork.de
protocols = pop3 imap sieve
quota_full_tempfail = yes
service auth {
   unix_listener /var/spool/postfix/private/auth {service quota-warning {
   executable = script /usr/local/bin/quota-warning.sh
   unix_listener quota-warning {
     user = vmail
   }
   user = dovecot
}
ssl_cert = </etc/pki/mail/mail.crt
ssl_key = </etc/pki/mail/mail.key
userdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
protocol lda {
   mail_plugins = quota sieve
}
protocol imap {
   imap_client_workarounds = delay-newmail
   imap_idle_notify_interval = 5 mins
   mail_max_userip_connections = 40
   mail_plugins = quota imap_quota
}
protocol pop3 {
   pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}

     group = vmail
     mode = 0660
     user = postfix
   }
   unix_listener auth-userdb {
     group = vmail
     mode = 0660
     user = vmail
   }
}

Gruß, Christian


Mehr Informationen über die Mailingliste Dovecot