Dear All, I am using the latest version of doveot-2.0.6 and using dovecot-lda to deliver mail in to Maildir. I have successfully implemented the global quota as well as per user quota using ldap for storing per user quota. Now i am trying to send warning message when user exceed quota limit of 80% and 95% but unable to implement the same.
Here is the output of doveconf -n
# 2.0.6: /usr/local/dovecot/etc/dovecot/dovecot.conf # OS: Linux 2.6.35-22-generic i686 Ubuntu 10.10 base_dir = /var/run/dovecot/ disable_plaintext_auth = no hostname = mail.example.net lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes listen = * log_path = /var/log/imap login_greeting = IMAP4 and POP3 server ready to serve you. mail_location = maildir:~/Maildir mail_plugins = " acl quota" passdb { args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { acl = vfile:/usr/local/dovecot-acl/acl:cache_secs=3600 autocreate = Sent Items autocreate2 = Drafts autocreate3 = Spam autocreate4 = Deleted Items autosubscribe = Sent Items autosubscribe2 = Drafts autosubscribe3 = Spam autosubscribe4 = Deleted Items quota = maildir:User quota quota_rule = *:storage=1G quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95 %u quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80 %u } postmaster_address = admin@example.net protocols = imap pop3 service imap-login { inet_listener imap { port = 143 } } service pop3-login { inet_listener pop3 { port = 110 } } service quota-warning { executable = script /usr/local/bin/quota-warning.sh unix_listener quota-warning { user = vmail } user = dovecot } ssl = no userdb { args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext driver = ldap } protocol lda { mail_plugins = " acl quota" } protocol imap { mail_plugins = " acl quota autocreate imap_acl imap_quota" } protocol pop3 { mail_plugins = " acl quota" }
Here is quota-warning.sh content
#!/bin/sh PERCENT=$1 USER=$2 cat << EOF | /usr/local/dovecot/libexec/dovecot/dovecot-lda -d $USER -o "plugin/quota=maildir:User quota:noenforcing" From: postmaster@teamgenesys.net Subject: quota warning
Your mailbox is now $PERCENT% full.
Please delete unnecessary mail or request more space.
This is an automated message, please do not respond. EOF
All the users are virtual users and running under vmail id.
I am getting the following error in log file when user reaches 80% of defined quota limit
Error: quota: net_connect_unix(/usr/local/bin/quota-warning.sh) failed: Connection refused
Is it configuration issue or anyting else ??
Thanks hoping to get response ....