Hi,

I have a problem with my mailfilter-file.

I use vpopmail 5.2.1 and maildrop 1.6.2 and one mailfilter for one domain.

the domain is mydomain.local and is locates in
/home/vpopmail/domains/mydomain.local/

the mailfilter is in

/home/vpopmail/domains/mydomain.local/mailfilter

and is read by maildrop by
/home/vpopmail/domains/mydomain.local/.qmail-default:
| /usr/local/bin/maildrop -w 90
/home/vpopmail/domains/mydomain.local/mailfilter

If my mailfilter looks this, everything works fine. I mean bounces are
returned to the sender if the user is over quota:

########## 8< Schnipp 8< #########
SHELL="/bin/sh"
import EXT
import HOST

to "$VHOME/Maildir/."
########## 8< Schnapp 8< #########
in this case I get this enty in the maillog-file:
Oct 29 21:18:47 mail qmail: 1067458727.625095 delivery 195319: failure:
maildrop:_maildir_over_quota./



If my mailfilter looks this, the spam-mails are send into the spam-folder
and the spam-filder is crated if not there, but on a mail to big f�r the
quota, the sender does not receive a bounce that the user is over quota and
in the maillog-file I get this:
maildrop:_maildir_over_quota.//usr/local/bin/maildrop:_Unable_to_create_a_do
t-lock./


Here ist the mailfilter for this situation:
########## 8< Schnipp 8< #########
SHELL="/bin/sh"
import EXT
import HOST
VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
logfile "mailfilter.log"

if ( $VHOME eq "" )
{
   log "========"
   log "ERROR: VHOME isn't set!"
   to "$VPOP"
}
else
{
# Make sure the quota file is in place.
# Vpopmail does not create it by default.
# Vpopmail also removes it when you change the quota.
`test -s "$VHOME/Maildir/maildirsize"`
if ( $RETURNCODE == 1 )
{
   `/home/vpopmail/bin/vuserinfo -Q [EMAIL PROTECTED]

   `test -s "$VHOME/Maildir/maildirsize"`
   if ( $RETURNCODE == 0 )
   {
      `/bin/chown vpopmail:vchkpw $VHOME/Maildir/maildirsize`
      `/bin/chmod 640 $VHOME/Maildir/maildirsize`
   }
}
   if (/^X-Spam-Flag: *YES/)
   {
      exception {
         include $VHOME/Maildir/.mailfilter
      }

      `test -d $VHOME/Maildir/.Spam`
      if( $RETURNCODE == 1)
      {
         `maildirmake -f Spam $VHOME/Maildir`
      }
      exception {
         to "$VHOME/Maildir/.Spam/"
      }
   }

   exception {
      include $VHOME/Maildir/.mailfilter
   }


   # default delivery
   exception {
      to "$VHOME/Maildir/."
   }
}
########## 8< Schnapp 8< #########

Perhaps I forgot something?

Plz help

Thanks

Alex



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to