Ralf Hildebrandt
2009-Nov-26 13:20 UTC
[Dovecot] quote warning not being triggered (yet again)
I'm using 1.2.6 with the managesieve patch and maildir++ quotas (via
the maildirsite file). Again, I found that the quota warning is not
bering triggered.
Testing via:
smtp-source -4 -f sender at charite.de -t recipient at charite.de -m 1 -l
1000000 -C 1 mail.charite.de:submission
recipient at charite.de being a mailbox with a 10.0 MB limit.
I attached dovecot -n and the quota warn script.
--
Ralf Hildebrandt
Gesch?ftsbereich IT | Abteilung Netzwerk
Charit? - Universit?tsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30 | D-12203 Berlin
Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
ralf.hildebrandt at charite.de | http://www.charite.de
-------------- next part --------------
# 1.2.6: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.30-1-686-bigmem i686 Debian squeeze/sid
protocols: imap imaps pop3s managesieve
ssl_cert_file: /etc/ssl/certs/postamt.pem
ssl_key_file: /etc/ssl/private/postamt.key
disable_plaintext_auth: no
version_ignore: yes
login_dir: /usr/local/var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login -D
login_executable(imap): /usr/local/libexec/dovecot/imap-login -D
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login -D
login_executable(managesieve): /usr/local/libexec/dovecot/managesieve-login
login_process_per_connection: no
login_process_size: 0
login_processes_count: 64
login_max_processes_count: 2048
login_max_connections: 512
max_mail_processes: 2048
mail_max_userip_connections: 2048
verbose_proctitle: yes
mail_location: maildir:~/Maildir
fsync_disable(default): yes
fsync_disable(imap): yes
fsync_disable(pop3): yes
fsync_disable(managesieve): no
maildir_copy_preserve_filename: yes
maildir_very_dirty_syncs: yes
mail_drop_priv_before_exec: yes
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_executable(managesieve): /usr/local/libexec/dovecot/managesieve
mail_plugins(default): quota imap_quota trash mail_log fts fts_squat zlib
autocreate
mail_plugins(imap): quota imap_quota trash mail_log fts fts_squat zlib
autocreate
mail_plugins(pop3): quota mail_log
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve
mail_log_max_lines_per_sec: 0
imap_client_workarounds(default): outlook-idle netscape-eoh
imap_client_workarounds(imap): outlook-idle netscape-eoh
imap_client_workarounds(pop3):
imap_client_workarounds(managesieve):
pop3_lock_session(default): no
pop3_lock_session(imap): no
pop3_lock_session(pop3): yes
pop3_lock_session(managesieve): no
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %v-%u
pop3_uidl_format(managesieve): %08Xu%08Xv
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
namespace:
type: private
separator: .
prefix: INBOX.
inbox: yes
list: yes
subscriptions: yes
lda:
fsync_disable: no
postmaster_address: postmaster at charite.de
mail_plugins: sieve quota trash mail_log fts fts_squat
syslog_facility: local4
auth default:
mechanisms: plain login
cache_size: 64
master_user_separator: *
debug: yes
debug_passwords: yes
passdb:
driver: passwd-file
args: /usr/local/etc/dovecot.masterusers
pass: yes
master: yes
passdb:
driver: shadow
passdb:
driver: pam
args: cache_key=%u dovecot
userdb:
driver: passwd
socket:
type: listen
client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
plugin:
fts: squat
quota: maildir
quota_rule: Trash:storage=2048M
quota_warning: storage=90%% /usr/local/scripts/quota-warning 90
quota_warning2: storage=95%% /usr/local/scripts/quota-warning 95
quota_warning3: storage=99%% /usr/local/scripts/quota-warning 99
trash: /usr/local/etc/dovecot-trash.conf
autocreate: Trash
autocreate2: spam
autocreate3: Sent
autocreate4: Drafts
autosubscribe: Trash
autosubscribe2: spam
autosubscribe3: Sent
autosubscribe4: Drafts
sieve: ~/.dovecot.sieve
sieve_dir: ~/sieve
-------------- next part --------------
#!/bin/sh
#
# Should be run by the Local Delivery Agent
# Expects USER and HOME to be set as an environment variable
#
SCRIPT_NAME="quota-warning"
MAIL_TO="${USER}"
MAIL_FROM="postmaster at charite.de"
MAIL_QUOTA_PERCENT=$1
MAIL_SUBJECT="Ihre Mailbox ist zu "$1"% voll!"
DIR_MAILDIR_NEW="${HOME}/Maildir/new"
DIR_MAILDIR_TMP="${HOME}/Maildir/tmp"
BIN_CAT="/bin/cat"
BIN_DATE="/bin/date"
BIN_HOSTNAME="/bin/hostname"
BIN_LOGGER="/usr/bin/logger"
BIN_MV="/bin/mv"
BIN_STAT="/usr/bin/stat"
#set -x
# check for user
[ "x${MAIL_TO}" = "x" ] && \
${BIN_LOGGER} -p mail.error -t "${SCRIPT_NAME}" \
"error=no user set" && exit 1
# check for home directory
[ "x${HOME}" = "x" ] && \
${BIN_LOGGER} -p mail.error -t "${SCRIPT_NAME}(${MAIL_TO})" \
"no home directory set" && exit 1
# check for directories
[ ! -d "${DIR_MAILDIR_NEW}" ] && \
${BIN_LOGGER} -p mail.error -t "${SCRIPT_NAME}(${MAIL_TO})" \
"cannot find ${DIR_MAILDIR_NEW}" && exit 1
[ ! -d "${DIR_MAILDIR_TMP}" ] && \
${BIN_LOGGER} -p mail.error -t "${SCRIPT_NAME}(${MAIL_TO})" \
"cannot find ${DIR_MAILDIR_TMP}" && exit 1
# set misc values
HOSTNAME="`${BIN_HOSTNAME}`"
# set mail value
MAIL_DATE="`${BIN_DATE} '+%a, %d %b %Y %T %z (%Z)'`"
MAIL_MESSAGE_ID="`${BIN_DATE} '+%Y%m%d%H%M%S'`@${HOSTNAME}"
# set filename values
FILE_DATE="`${BIN_DATE} '+%s'`"
FILE_NAME="${FILE_DATE}.$$.${HOSTNAME}"
FILE_TMP="${DIR_MAILDIR_TMP}/${FILE_NAME}"
# write out message
${BIN_CAT} << EOF > ${FILE_TMP}
To: ${MAIL_TO}
From: ${MAIL_FROM}
Subject: ${MAIL_SUBJECT}
Message-Id: <${MAIL_MESSAGE_ID}>
Date: ${MAIL_DATE}
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Was ist los?
===========
Wir haben festgestellt, dass Ihre Mailbox auf dem Server
postamt.charite.de das erlaubte Gr?ssenlimit zu mindestens
${MAIL_QUOTA_PERCENT}%
aussch?pft.
D.h. die maximal erlaubte Gesamtgr??e der Mailbox wird bald erreicht
sein oder ist es sogar schon!
Was kann ich nun tun?
====================
Bitte schaffen Sie Platz in Ihrer Mailbox, indem Sie die Mails z.B.
auf dem Server l?schen oder in Ihre lokale Mailbox auf Ihrem eigenen
Rechner verschieben und so wieder Platz auf dem Server schaffen!
Wie kann ich die F?llung meines Postfaches auf dem Server ?berpr?fen?
====================================================================
Sie k?nnen die F?llung Ihres Postfaches ?ber Webmail
https://webmail.charite.de/
leicht ?berpr?fen: Nach dem Anmelden erscheint im linken Rahmen unter
Ihrer Ordnerliste ein Link namens "Ordnergr??en".
Sie k?nnen in Webmail ggf. auch gleich die Mails l?schen (vergessen
Sie hinterher nicht, den Papierkorb / Trash Ordner zu leeren!).
Warum ist mein Postfach ?berhaupt so voll?
=========================================
Dies kann z.B. passieren, wenn Sie mehrere Rechner nutzen um Ihre Mail
zu lesen und statt des IMAP Protokolls das POP3-Protokoll mit der
aktivierten Option "Leave Mail on Server" / "Mail auf Server
belassen"
in Ihrem Mailprogramm verwenden.
Oft wird auch vergessen, da? der Ordner mit den "Gesendeten Objekten"
(Sent Folder/Sent Items) zum Gr??enlimit der Mailbox z?hlen.
Besondere Platzfresser sind Mails mit gro?en Anh?ngen, wie z.B.
PowerPoint-, PDF- oder Bilddateien -- insbesondere im "Sent" Ordner!
Wer sind meine Ansprechpartner?
==============================
Sie k?nnen uns unter email-admin at charite.de oder telefonisch unter
450-570600 erreichen.
Mit freundlichen Gr??en
EOF
[ "$?" -gt 0 ] && \
${BIN_LOGGER} -p mail.error -t "${SCRIPT_NAME}(${MAIL_TO})" \
"writing message to ${FILE_TMP} failed" && exit 1
# set more filename values
FILE_SIZE="`${BIN_STAT} --printf='%s' ${FILE_TMP}`"
FILE_NEW="${DIR_MAILDIR_NEW}/${FILE_NAME},S=${FILE_SIZE}"
# deliver message
${BIN_MV} ${FILE_TMP} ${FILE_NEW}
[ "$?" -gt 0 ] && \
${BIN_LOGGER} -p mail.error -t "${SCRIPT_NAME}(${MAIL_TO})" \
"delivering message to ${FILE_NEW} failed" && exit 1
# log warning attempt
${BIN_LOGGER} -p mail.info -t "${SCRIPT_NAME}(${MAIL_TO})
${MAIL_QUOTA_PERCENT}%" "delivered to ${FILE_NEW}"
Ralf Hildebrandt
2009-Nov-26 13:50 UTC
[Dovecot] quote warning not being triggered (yet again)
* Ralf Hildebrandt <Ralf.Hildebrandt at charite.de>:> I'm using 1.2.6 with the managesieve patch and maildir++ quotas (via > the maildirsize file). Again, I found that the quota warning is not > being triggered.Updated to 1.2.8 this moment - still the same -- Ralf Hildebrandt Gesch?ftsbereich IT | Abteilung Netzwerk Charit? - Universit?tsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt at charite.de | http://www.charite.de
Timo Sirainen
2009-Nov-30 18:34 UTC
[Dovecot] quote warning not being triggered (yet again)
On Nov 26, 2009, at 8:20 AM, Ralf Hildebrandt wrote:> I'm using 1.2.6 with the managesieve patch and maildir++ quotas (via > the maildirsite file). Again, I found that the quota warning is not > bering triggered. > > Testing via: > smtp-source -4 -f sender at charite.de -t recipient at charite.de -m 1 -l 1000000 -C 1 mail.charite.de:submission > > recipient at charite.de being a mailbox with a 10.0 MB limit. > I attached dovecot -n and the quota warn script.At least one problem is that the quota_warnings should be listed in reverse order. I think it should still trigger at least one of them though.. I probably should change those to be sorted internally. Also try setting mail_debug=yes and seeing what it logs. Then it logs each time it attempts to execute quota warning: "quota: Executing warning: %s".