3 messages in net.sourceforge.lists.courier-users[courier-users] deliverquota + procma...
FromSent OnAttachments
Greg NeujahrApr 26, 2005 10:13 pm 
Greg NeujahrMay 2, 2005 5:34 pm 
Sam VarshavchikMay 2, 2005 5:42 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] deliverquota + procmail + sendmailActions...
From:Greg Neujahr (gpne@eos.ncsu.edu)
Date:Apr 26, 2005 10:13:19 pm
List:net.sourceforge.lists.courier-users

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