[Dovecot] Quota warnings and LMTP
Hello,
I have dovecot 2.0 configured with virtual users in MySQL, SMTP is handled by exim which uses dovecot LMTP transport.
I'd like to test quota warning messages, but in wiki2 there is only an example for delivering it with dovecot-lda. I tried several ways of using lmtp binary, but without success.
How to replace this:
cat << EOF | /usr/local/libexec/dovecot/dovecot-lda -d $USER -o "plugin/quota=maildir:User quota:noenforcing" From: postmaster@domain.com Subject: quota warning
Your mailbox is now $PERCENT% full. EOF
with lmtp?
Greetings,
Jacek Osiecki
On 17.02.2012 14:40, joshua@hybrid.pl wrote:
Hello, Hi, I have dovecot 2.0 configured with virtual users in MySQL, SMTP is handled by exim which uses dovecot LMTP transport.
I'd like to test quota warning messages, but in wiki2 there is only an example for delivering it with dovecot-lda. I tried several ways of using lmtp binary, but without success.
How to replace this:
cat << EOF | /usr/local/libexec/dovecot/dovecot-lda -d $USER -o "plugin/quota=maildir:User quota:noenforcing" From: postmaster@domain.com Subject: quota warning
Your mailbox is now $PERCENT% full. EOF
with lmtp? As far as I known, there is no specific config for LMTP transport when quota is considered.
When testing quota messages, the most problems for me was with the fact, that the warning is triggered only when the limit is reached. Only once for each limit.
The script we are using:
#!/bin/bash PERCENT=$1 USER=$2 DOMAIN=$3
cat << EOF | /usr/lib/dovecot/dovecot-lda -d $USER -o "plugin/quota=dict:User quota::noenforcing:proxy::quota" From: postmaster@$DOMAIN Subject: ostrzeżenie o przekroczeniu wolnego miejsca / quota warning
Twa skrzynka jest zapełniona w $PERCENT%.
Your mailbox is now $PERCENT% full. EOF
-- Adam Szpakowski
On 17.2.2012, at 15.40, joshua@hybrid.pl wrote:
I have dovecot 2.0 configured with virtual users in MySQL, SMTP is handled by exim which uses dovecot LMTP transport.
I'd like to test quota warning messages, but in wiki2 there is only an example for delivering it with dovecot-lda. I tried several ways of using lmtp binary, but without success.
How to replace this:
cat << EOF | /usr/local/libexec/dovecot/dovecot-lda -d $USER -o "plugin/quota=maildir:User quota:noenforcing" From: postmaster@domain.com Subject: quota warning
Your mailbox is now $PERCENT% full. EOF
with lmtp?
This command is only about adding the warning mail to user's mailbox, bypassing any quota. Just because you deliver mails normally via LMTP doesn't mean that you have to do it for warning mails. This same dovecot-lda command should work just fine.
participants (3)
-
Adam Szpakowski
-
joshua@hybrid.pl
-
Timo Sirainen