Currently I have sendmail set to use procmail as its local delivery agent.
Procmail in turn is responsible for running the message through a spam
filter, and then delivering it to a maildir directory for the user
(/var/spool/mail/$LOGNAME/ to be exact). I'm trying to add the ability to
use maildir quotas into the mix. By adding the procmail line:
:0
| /usr/local/bin/deliverquota -w 90 /var/spool/mail/$LOGNAME
to the /etc/procmailrc file, the mail is delivered to the user's inbox
provided they are not overquota. However, in the event that the mailbox is
over quota, I would like for the mail to be rejected at delivery time,
rather than just simply discarded. Is there any way to make this work
without changing away from procmail, or will I need to modify my sendmail
configuration in some manner to anticipate this?
I've read up and noticed some return error codes mentioned and used by the
deliverquota program, but I'm unsure if those are intended to alert
procmail in particular, or if those are meant to alert some other program
to the problem. I've attached my procmailrc file below:
ORGMAIL=/var/spool/mail/$LOGNAME/
MAILDIR=/var/spool/mail/$LOGNAME/
DEFAULT=/var/spool/mail/$LOGNAME/
DROPPRIVS=yes
:0fw
| spamc
:0
| /usr/local/bin/deliverquota -w 90 /var/spool/mail/$LOGNAME