On 01-Mar-11 23:25, PakOgah wrote:
I tried to create a .mailfilter rules based on slamp slamp example
http://www.mail-archive.com/qmailtoaster-list@qmailtoaster.com/msg15443.html

which will deliver email with subject contain qmailtoaster to folder
qmailtoaster
and email with subject contain SPAM or BULK to folder Spam
and other email goes to inbox
but somehow the file didn't work.

Can someone tell me what's wrong with it ?

Thank b4

[root@svr-m1 ~]# cat
/home/vpopmail/domains/pala.bo-tak.info/pakogah/.mailfilter
if (/^Subject: *qmailtoaster*/)
{
        exception {
                to $VHOME/Maildir/.qmailtoaster/
        }
}

if (/^Subject: *SPAM*/ || /^Subject:.*BULK*/)
{
        exception {
                to $VHOME/Maildir/.Spam/
        }
}

to "$VHOME/Maildir"

  
Okay I found the answer by looking somebody else VHOME, so here's how I create email filter / rules on server using maildrop

first make sure maildrop is installed on server. when you install qmailtoaster, it’s there by default.
then create a maildir folder in your VHOME (/home/vpopmail/domains/pala.bo-tak.info/pakogah/)
in this example we are goint to create maildir folder named qmailtoaster (/home/vpopmail/domains/pala.bo-tak.info/pakogah/qmailtoaster) so message with subject qmailtoaster goes to this folder.
qmailtoaster is a maildir folder not just regular folder. You can create a maildir using the maildirmake command. But I create the folder from squirrelmail. :D

then create .qmail file inside your VHOME, that look like this

|/var/qmail/bin/preline /usr/bin/maildrop -A 'Content-Filter: maildrop-toaster' /etc/mail/mailfilter

after that create .mailfilter file and create your rule, in below example I just create a simple ones :D

if (/^Subject:.*qmailtoaster*/)
{
        exception {
                to $VHOME/Maildir/.qmailtoaster/
        }
}
 
if (/^Subject:.*SPAM*/ || /^Subject:.*BULK*/)
{
        exception {
                to $VHOME/Maildir/.Spam/
        }
}
 

Reply via email to