hello list,

I am having qmr setup, with vpopmail version 5.4.9 (i know its too old
but new versions do not have valias support for pgsql) using pgsql as
the backend. quota warning messages are not sent to the user when he
is at 90% usage nor the message in over-quota is there in the failure
delivery.

my vpopmail compile options are:
./configure --disable-roaming-users --enable-logging=p
--disable-ip-alias-domains --disable-passwd --enable-clear-passwd
--disable-domainquotas --enable-auth-module=pgsql
--disable-many-domains --enable-auth-logging --enable-sql-logging
--enable-valias

have created files .quotawarn.msg and .over-quota.msg in
~vpopmail/domains, the permission are shown below
# ls -l .quotawarn.msg .over-quota.msg
-rw-r--r--    1 vpopmail vhckpw       80 Jan 24  2005 .over-quota.msg
-rw-r--r--    1 vpopmail vhckpw      621 Aug 10  2005 .quotawarn.msg

.qmail file for every user is
# cat .qmail
|preline /usr/local/bin/maildrop /etc/mailfilter
#

permission for /etc/mailfilter

# ls -l /etc/mailfilter
-rw-------    1 vpopmail postdrop     6232 Mar 13 12:47 /etc/mailfilter

my /etc/mailfilter script is

----------------------script begins---------------
SHELL="/bin/sh"
import EXT
import HOST
VHOME=`pwd`
TIMESTAMP=`date "+%b %d %H:%M:%S"`
`test -r $VHOME/.mailfilter`
if( $RETURNCODE == 0 )
{
       exception {
               include $VHOME/.mailfilter
       }
}
`test -e $VHOME/Maildir/maildirsize`
if( $RETURNCODE == 1)
{
       `test -x /home/vpopmail/bin/vuserinfo`
       if ( $RETURNCODE == 0)
       {
               `/home/vpopmail/bin/vuserinfo -Q [EMAIL PROTECTED]
               `test -s "$VHOME/Maildir/maildirsize"`
       if ( $RETURNCODE == 0 )
       {
               `/usr/sbin/chown vpopmail:vchkpw $VHOME/Maildir/maildirsize`
                       `/bin/chmod 640 $VHOME/Maildir/maildirsize`
       }
       }
       else
       {
       }
}
`test -e $VHOME/Maildir/maildirsize`
if( $RETURNCODE == 0)
{
       MAILDIRQUOTA=`/usr/bin/head -n1 $VHOME/Maildir/maildirsize`
}
if ( /^X-Spam-Status: Yes, hits=![0-9]+\.[0-9]+! /:h)
{
       `test -d $VHOME/Maildir/.Spam`
       if( $RETURNCODE == 1 )
       {
               `/usr/local/bin/maildirmake -f Spam $VHOME/Maildir`
               `echo "INBOX.Spam" >> $VHOME/Maildir/courierimapsubscribed`
       }
       `test -x /usr/local/bin/deliverquota`
       if ( $RETURNCODE == 1 )
       {
               exception {
                       to "$VHOME/Maildir/.Spam"
               }
       }
       else
       {
               exception {
                       xfilter "/usr/local/bin/deliverquota -w 90
$VHOME/Maildir/.Spam"
               }
               if ( $RETURNCODE == 0 )
               {
                       EXITCODE=0
                       exit
               }
               else
               {
                       if( $RETURNCODE == 77)
                       {
                               to "|/var/qmail/bin/bouncesaying
'[EMAIL PROTECTED] is over quota'"
                       }
                       else
                       {
                               to "$VHOME/Maildir/.Spam"
                       }
               }
       }
}
if ( /^X-Spam-Status: No, hits=![\-]*[0-9]+\.[0-9]+! /:h)
{
}
`test -r $VHOME/Maildir/.mailfilter`
if( $RETURNCODE == 0 )
{
       exception {
               include $VHOME/Maildir/.mailfilter
       }
}
`test -x /usr/local/bin/deliverquota`
if ( $RETURNCODE == 1 )
{
       exception {
               to "$VHOME/Maildir"
       }
}
else
{
       exception {
               xfilter "/usr/local/bin/deliverquota -w 90 $VHOME/Maildir"
       }
       if( $RETURNCODE == 77)
       {
               to "|/var/qmail/bin/bouncesaying '[EMAIL PROTECTED] is over 
quota'"
       }
       else
       {
               EXITCODE=0
               exit
       }
}
----------------script ends --------------------


let me know if i am missing something,

Sandeep

!DSPAM:45f66296129296948215338!

Reply via email to