[Dovecot] dovecot-lda - dovecot: quota-warning: Error: lda: Fatal: Unknown argument

Ben Johnson ben at indietorrent.org
Mon Jun 24 18:59:52 EEST 2013


Hi, everyone,

I'm attempting to configure automated quota warnings for users and have
hit a snag.

The script I'm using is as follows:


---------------------------------------------------------------------
#!/bin/sh
PERCENT=$1
MAILBOX=$2
DOMAIN=$3
cat << EOF | /usr/lib/dovecot/dovecot-lda -d $USER -o
"plugin/quota=dict:user::file:/var/vmail/%d/%n/.quotausage"
From: postmaster@$DOMAIN
Subject: Email quota warning - mailbox over $PERCENT% full
[...]
---------------------------------------------------------------------

When the script is triggered, here's what appears in the log:

---------------------------------------------------------------------
Jun 24 11:16:53 host dovecot: quota-warning: Error: lda: Fatal: Unknown
argument:
plugin/quota=dict:user::noenforcing:file:/var/vmail/%d/%n/.quotausage
Jun 24 11:16:53 host dovecot: master: Error: service(quota-warning):
child 22415 returned error 64
---------------------------------------------------------------------

If I paste the same on the command line, the message is delivered, as
expected:

/usr/lib/dovecot/dovecot-lda -d user at example.com -o
"plugin/quota=dict:user::noenforcing:file:/var/vmail/%d/%n/.quotausage"
-p /tmp/test.txt

The problem seems to be that the -o switch isn't being interpreted
correctly when dovecot-lda is called from within the script. -o is the
correct switch, yes? From the manual at http://wiki2.dovecot.org/LDA :

-o name=value: Override a setting from dovecot.conf. You can give this
parameter multiple times.

What am I missing here? Is some shell script escaping or similar required?

Thanks for any tips!

-Ben


More information about the dovecot mailing list