On mailbox full, retry for 4 days or similar instead of reject

Anne Bennett anne at encs.concordia.ca
Tue Feb 8 14:06:38 UTC 2022


>> I want postfix not to discard the message imediatly when a mailbox is
>> full, i mean when postfix tries to deliver it to dovecot lmtp.

> if you set "quota_full_tempfail" to "yes" in dovecots lda.conf, it
> should answer with a temporary failure-code 422 instead of permanent
> 522. (at least the code of lmtp_local_rcpt_reply_overquota() says so)

Here's another possibility, via Postfix's configuration:

  # Convert over quota to temporary failure.
  lmtp_delivery_status_filter = pcre:/local/data/postfix/pcre_lmtp_dsn_filter
  lmtp_reply_filter           = pcre:/local/data/postfix/pcre_lmtp_dsn_filter

  # warn sender if temporarily undeliverable, just like sendmail would.
  delay_warning_time = 4h

... where pcre_lmtp_dsn_filter contains something like this, adapted
as needed to the actual messages generated at your site:

  # Convert 5xx permanent failure to 4xx temporary failure:
  /^5(\d\d) 5(\.\d+\.\d+ \S+ Not enough disk quota)/ 4$1 4$2



Anne.
-- 
Ms. Anne Bennett, Senior Sysadmin, ENCS, Concordia University, Montreal H3G 1M8


More information about the dovecot mailing list