[Dovecot] Sendmail and deliver LDA exits with EX_TEMPFAIL on overquota

Sotiris Tsimbonis tsimbonis at forthnet.gr
Fri Oct 17 15:39:26 EEST 2008


Hi all,

I have setup dovecot 1.1.4 and sendmail 8.14.3 with dovecot LDA on linux 
(RHEL5 on x86_64).

I have deliberately set a very low quota (4MB) on a test account, while 
the actual disk usage is 5MB at the moment, in order to test overquota 
behaviour..

When I send an email to this account, sendmail accepts the email and 
tries to deliver it. Deliver fails to save in INBOX and returns an 
error, but the email stays in sendmail's queue..

Any suggestions on how to avoid this and produce a 5xx error for 
overquota users before accepting the email would be greatly appreciated..

TIA,
Sotiris.


==> /var/log/maillog <==
Oct 17 14:25:19 mx-mstr-07 sendmail[17289]: m9HBPJ99017288: 
to=<stsimb at t157.forthnet.gr>, ctladdr=<root at mx-mstr-07.forthnet.prv> 
(0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30603, 
dsn=4.0.0, stat=Deferred: local mailer (/usr/libexec/dovecot/deliver) 
exited with EX_TEMPFAIL

==> /var/log/dovecot.log <==
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: Loading modules 
from directory: /usr/lib64/dovecot/lda
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: Module loaded: 
/usr/lib64/dovecot/lda/lib10_quota_plugin.so
dovecot: Oct 17 14:25:19 Info: auth(default): master in: USER   1 
stsimb.t157.forthnet.gr service=deliver
dovecot: Oct 17 14:25:19 Info: auth(default): master out: USER  1 
stsimb.t157.forthnet.gr uid=2082264764 
home=/home/mailusers/stsimb.t157.forthnet.gr gid=126 quota_rule=*:storage=4M
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: auth input: 
stsimb.t157.forthnet.gr
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: auth input: 
uid=2082264764
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: auth input: 
home=/home/mailusers/stsimb.t157.forthnet.gr
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: auth input: gid=126
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: auth input: 
quota_rule=*:storage=4M
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: Quota root: 
name= backend=maildir args=
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: Quota rule: 
root= mailbox=* bytes=4194304 (0%) messages=0 (0%)
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: Quota warning: 
bytes=3774873 (90%) messages=0 (0%) 
command=/local/dovecot/sbin/quota-warning.sh 90
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: Quota warning: 
bytes=2516582 (60%) messages=0 (0%) 
command=/local/dovecot/sbin/quota-warning.sh 60
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: maildir: 
data=/var/mail/stsimb.t157.forthnet.gr/Maildir
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: maildir++: 
root=/var/mail/stsimb.t157.forthnet.gr/Maildir, index=, control=, 
inbox=/var/mail/stsimb.t157.forthnet.gr/Maildir
deliver(stsimb.t157.forthnet.gr): Oct 17 14:25:19 Info: 
msgid=<200810171125.m9HBPJFT017287 at mx-mstr-07.forthnet.prv>: save failed 
to INBOX: Quota exceeded (mailbox for user is full)

==> sendmail.cf dovecot mailer <==
Mlocal,         P=/usr/libexec/dovecot/deliver, F=lsDFMAw5:/|@qSPhn9, 
S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
                 T=DNS/RFC822/X-Unix,
                 A=deliver -d $u

[root at mx-mstr-07 ~]# dovecot -n
# 1.1.4: /etc/dovecot.conf
log_path: /var/log/dovecot.log
protocols: imap pop3
ssl_disable: yes
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_greeting: Dovecot ready mx-mstr-07
login_process_per_connection: no
login_process_size: 1024
max_mail_processes: 2048
verbose_proctitle: yes
mail_location: maildir:/var/mail/%u/Maildir
mail_cache_min_mail_count: 100
mail_debug: yes
mmap_disable: yes
mail_nfs_storage: yes
mail_nfs_index: yes
maildir_copy_preserve_filename: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib64/dovecot/imap
mail_plugin_dir(imap): /usr/lib64/dovecot/imap
mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3
pop3_no_flag_updates(default): no
pop3_no_flag_updates(imap): no
pop3_no_flag_updates(pop3): yes
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
   cache_size: 131072
   cache_ttl: 315
   cache_negative_ttl: 285
   verbose: yes
   debug: yes
   passdb:
     driver: ldap
     args: /etc/dovecot-ldap.conf
   userdb:
     driver: ldap
     args: /etc/dovecot-ldap.conf
   userdb:
     driver: prefetch
   socket:
     type: listen
     master:
       path: /var/run/dovecot/auth-master
       mode: 384
plugin:
   quota: maildir
   quota_warning: storage=90%% /local/dovecot/sbin/quota-warning.sh 90
   quota_warning2: storage=60%% /local/dovecot/sbin/quota-warning.sh 60


More information about the dovecot mailing list