Qmail-LDAP
[Top] [All Lists]

Maildrop and qmail-ldap

To: "qmail-ldap@qmail-ldap.org" <qmail-ldap@qmail-ldap.org>
Subject: Maildrop and qmail-ldap
From: Roger Thomas <sniper@home.net.my>
Date: Sat, 06 Jan 2007 10:23:02 +0800
Delivered-to: sp-com-lists@consult.net
Delivered-to: qmail-ldap-list@securepoint.com
Delivered-to: mailing list qmail-ldap@qmail-ldap.org
Mailing-list: contact qmail-ldap-help@qmail-ldap.org; run by ezmlm
User-agent: Internet Messaging Program (IMP) 3.2
I have modified slightly the wiki instruction at 
http://www.qmail-ldap.org/wiki/Full_Installation_Guide_-_Maildrop because I 
want Maildrop to create a folder named Spam if no such folder exists:

-- start of my maildroprc script --
import HOME
import MAILDIRQUOTA

XBOUNCE="| bouncesaying 'Sorry, no mailbox here by that name.'"

if (/^X-Spam-Flag: Yes/)
{
        `test -d $HOME/Maildir/.Spam`
        if( $RETURNCODE != 0 )
        {
          `/usr/local/bin/maildirmake $HOME/Maildir/.Spam`
          `echo INBOX.Spam >> $DEFAULT/courierimapsubscribed`
        }

        to "$HOME/Maildir/.Spam"
}
if ( $HOME eq "" )
{
        to "$XBOUNCE"
}
else
{
        exception {
                include "$HOME/.mailfilter"
        }
        exception {
                to "$HOME/Maildir"
        }
}
to "$HOME/Maildir"
-- end of maildroprc --


Problem is, Spam 'folder' is created (when I received a spam email), BUT IT IS 
NOT A FOLDER. It is a file:
[root@maildevel root]# ls -al /home/example.com/roger/Maildir/
total 48
drwx------    9 vmail    vmail        4096 Jan  6 10:22 .
drwx------    3 vmail    vmail        4096 Jan  6 10:21 ..
drwx------    2 vmail    vmail        4096 Jan  6 10:21 courierimapkeywords
-rw-r--r--    1 vmail    vmail          36 Jan  6 10:21 courierimapsubscribed
-rw-r--r--    1 vmail    vmail          15 Jan  6 10:21 courierimapuiddb
drwx------    2 vmail    vmail        4096 Jan  6 10:21 cur
drwx------    5 vmail    vmail        4096 Jan  6 10:21 .Drafts
drwx------    2 vmail    vmail        4096 Jan  6 10:21 new
drwx------    5 vmail    vmail        4096 Jan  6 10:21 .Sent
-rw-------    1 vmail    vmail        3801 Jan  6 10:22 .Spam
drwx------    2 vmail    vmail        4096 Jan  6 10:22 tmp
drwx------    6 vmail    vmail        4096 Jan  6 10:21 .Trash

If I were to change the line from
`/usr/local/bin/maildirmake $HOME/Maildir/.Spam`
to
`/var/qmail/bin/maildirmake $HOME/Maildir/.Spam`
makes no difference.

I am using Courier-imap. What could have I possibly missed? Please help.

TIA.


---------------------------------------------------
Sign Up for free Email at http://ureg.home.net.my/
---------------------------------------------------

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