I have solved my own problem, the following script enables maildrop and
vpopmail to properly process catchall accounts.

It was really simple actually all I needed to do was generate a brand new
$VHOME (and $EXT and $HOST) based on the scripts sleuthing so maildrop
could read it properly from squirrelmail.

I was on the right track before but just didn't finish it completely it
looks like.

If anybody wants to clean up the script and optimize it that would be great.

-Myron

-- /var/lib/vpopmail/etc/mailfilter --

import EXT
import HOST

SHELL="/bin/sh"
VHOME=`/var/lib/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]

VPOP="$VHOME/Maildir/"
if ( "no such user" =~ /$VHOME/:d )
{
VDOMHOME=`/var/lib/vpopmail/bin/vdominfo -d $HOST`
VPOP3=`cat $VDOMHOME/.qmail-default | cut -f4 -d' '`
VPOP="$VPOP3/Maildir/"
EXT=`echo $VPOP3|cut -f7 -d'/'`
HOST=`/var/lib/vpopmail/bin/vdominfo -n $HOST`
VHOME=`/var/lib/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
}
USERDEFINEDSPAMSTATUS = 0;

USERDEFINEDSPAMSTATUS=`grep spamc /var/www/data/[EMAIL PROTECTED]
>/dev/null 2>/dev/null|wc -l`
# run through SpamAssassin (if less than the specified size)
if ( $SIZE < 262144 )
{
   if ( $USERDEFINEDSPAMSTATUS == 0 )
   {
   exception {
      xfilter "/usr/bin/spamc -f -u [EMAIL PROTECTED]"
   }
   }
}

exception {
include "/var/www/data/[EMAIL PROTECTED]"
}

exception {
to "$VPOP"
}








> Myron Davis <[EMAIL PROTECTED]> wrote:
>>> VHOME=`/var/lib/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
>>>
>>> VPOP="$VHOME/Maildir/"
>>> if ( "no such user" =~ /$VHOME/:d )
>>> {
>>> VDOMHOME=`/var/lib/vpopmail/bin/vdominfo -d $HOST`
>>> VPOP3=`cat $VDOMHOME/.qmail-default | cut -f4 -d' '`
>>> VPOP="$VPOP3/Maildir/"
>>> EXT=`echo $VPOP3|cut -f7 -d'/'`
>>> }
>>> USERDEFINEDSPAMSTATUS = 0;
>>> USERDEFINEDSPAMSTATUS=`grep spamc /var/www/data/[EMAIL PROTECTED]
>>>> /dev/null 2>/dev/null|wc -l`
>>> # run through SpamAssassin (if less than the specified size)
>>> if ( $SIZE < 262144 )
>>> {
>>>    if ( $USERDEFINEDSPAMSTATUS == 0 )
>>>    {
>>>    exception {
>>>       xfilter "/usr/bin/spamc -f -u [EMAIL PROTECTED]"
>>>    }
>>>    }
>>> }
>>>
>>> exception {
>>> include "/var/www/data/[EMAIL PROTECTED]"
>>> }
>
> That's actually not a bad idea.  I may have to give that a shot - thanks.
>
> -Robertson
>
>
>
>


Reply via email to