Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
#!/bin/sh # Qmail - mailquotacheck # # Japanized by Tatsuya Nonogaki. http://www.asahi-net.or.jp/~aa4t-nngk/ # # Original source: # Author: Paul Gregg # Url: http://www.tibus.net/pgregg/projects/qmail/ # Run this program ala: |mailquotacheck before your ./Maildir/ or ./Mailbox # entry in the .qmail file. e.g: # |/usr/local/bin/mailquotacheck # ./Maildir/ # Default quota is set to 3000Kb per user, this can be changed below # You can also install per user quotas which will override the defaults # by creating a .quota file in the same directory as the .qmail file, e.g: # echo 10240 > .quota # this will give that user a 10Mb mail quota # Individual per message quotas can also be used by creating a file telling # mailquotacheck that maximum permitted size per email - this is useful # when you want to allow someone, say, a 20Mb limit but want to prevent emails # larger than 5Mb. e.g: # echo 5120 > .maxmsgsize # Program location defs: cat="/bin/cat" expr="/usr/bin/expr" wc="/usr/bin/wc" du="/usr/bin/du" bc="/usr/bin/bc" cut="/bin/cut" awk="/bin/awk" echo="/bin/echo" nkf="/usr/bin/nkf -E -j" # Program defaults # quota is the default user quota if the user does not have a .quota file quota=10240 # hardquotabuffer is the 'extra' space allowed for small (<1Kb) messages. hardquotabuffer=100 # ------------------------------------------------------------------------- # You should not need to change anything below here # ------------------------------------------------------------------------- # Find out how big the email is in Kb - We don't care about < 1Kb messages. msgbytes=`$cat - | $wc -c` ERROR=$? if [ ${ERROR} -ne 0 ]; then # If this fails then you are in trouble ;) - Check program defs at the top. $echo | $nkf </dev/null` ERROR=$? if [ ${ERROR} -ne 0 ]; then $echo | $nkf <