procmail
[Top] [All Lists]

Re: /etc/procmairc mail quota

2004-07-07 02:51:38
On Fri, Jul 02, 2004 at 08:19:48AM +0200, Orczan Zsolt Dr. wrote:

 Dear Friends

 Plese help me I don't make this  etc/procmailrc  and  I  wrong all.
 I  woud like make mail qouta my server (slackware 9.1)
 Please chek it or send an very good good scipt
 I read procmail list that your write.


 # etc/procmairc
 VERBOSE = on
 LOGFILE=$HOME/pm.log
 ORGMAIL=     /var/spool/mail/$LOGNAME

Why are you setting ORGMAIL here instead of in the compiled-in
values?  Much better to have the compile be right to start with.



 QUOTA=160000

 :0i
 INBOXSIZE=| set -- `ls -l $ORGMAIL` ; echo $5

You probably also want the h flag here, just for efficiency.
Also, what if users are delivering mail to other mailboxes
than ORGMAIL?  Then your quota will be bypassed.

 :0
 * $ ${INBOXSIZE}^0
 * $ -${QUOTA}^0

### IT IS WRONG PLESE HELP ???
 | ( /usr/bin/formail -r "echo box full" ) | /usr/lib/sendmail -t -oi

I think you wanted

   | ( formail -r; echo "box full" ) | $SENDMAIL $SENDMAILFLAGS -t

(Not tested.)  Also, Isn't /usr/bin already compiled into the PATH?
Isn't /usr/lib/sendmail already expressed as $SENDMAIL from compiled-in
values?  Usually this is written with the SENDMAIL/SENDMAILFLAGS that
were compiled in, as I've done above.

Suggest you include a description of what isn't working, if this doesn't
help.

Also, your quota system will not work right if the inbox size is even
one byte below the quota.  But the mail will still be too big.  What then?

I'm not a sysadmin, but it seems to me that quota systems are best
handled earlier in the process than at the MDA (procmail).

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>