List Info

Thread: Inconsistent behaviour




Inconsistent behaviour
user name
2007-01-07 13:42:17
I want Maildrop to create a folder named Spam if no such
folder exists (upon receiving a mail that is tagged as
Spam). So I created a maildroprc file like the following:

-- 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 -f Spam $HOME/Maildir`
          `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, upon receiving a spam mail, maildrop created a
file, NOT A FOLDER.

[rootmaildevel 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

I am using Courier-imap.  But if I were to run that command
from shell:

# /usr/local/bin/maildirmake -f Spam
/home/example.com/roger/Maildir

that would CORRECTLY created Spam as a folder. Wonder why
Maildrop does not do that thru maildroprc ? Any idea?

--
roger




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

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-maildrop mailing list
Courier-maildroplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courie
r-maildrop
Inconsistent behaviour
user name
2007-01-07 16:27:38
Roger Thomas skrev:

> I want Maildrop to create a folder named Spam if no
such folder exists (upon receiving a mail that is tagged as
Spam). So I created a maildroprc file like the following:

[...]

>         `test -d $HOME/Maildir/.Spam`
>         if( $RETURNCODE != 0 )
>         {
>           `/usr/local/bin/maildirmake -f Spam
$HOME/Maildir`
>           `echo INBOX.Spam >>
$DEFAULT/courierimapsubscribed`
>         }
> 
>         to "$HOME/Maildir/.Spam"
> }

[...]

> Problem is, upon receiving a spam mail, maildrop
created a file, NOT A FOLDER.

Try something like (works for us):

`test -d $HOME/Maildir/.Spam/`
    if( $RETURNCODE == 1 )
    {
       `/usr/bin/maildirmake $HOME/Maildir/.Spam/`
       #"whatever else"
    }

You don't have to import HOME, it's default.

Best,

--Tonni

-- 
Tony Earnshaw
Email: tonni at hetnet.nl

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-maildrop mailing list
Courier-maildroplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courie
r-maildrop
Inconsistent behaviour
user name
2007-01-07 16:35:14
Hi,

* Roger Thomas wrote (2007-01-07 21:42):
>Problem is, upon receiving a spam mail, maildrop created
a file, NOT A FOLDER.

I use mbox, but shouldn't Maildir use a tailing slash?


Thorsten
-- 
Getting a thrill out of some stupid quote is a sign of
idiocy.
    - turmeric
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.php?page=join
.php&p=sourceforge&CID=DEVDEV_______________________
________________________
Courier-maildrop mailing list
Courier-maildroplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courie
r-maildrop
Inconsistent behaviour
user name
2007-01-08 01:59:16
Quoting Tony Earnshaw <tonnihetnet.nl>:

> Try something like (works for us):
> 
> `test -d $HOME/Maildir/.Spam/`
>     if( $RETURNCODE == 1 )
>     {
>        `/usr/bin/maildirmake $HOME/Maildir/.Spam/`
>        #"whatever else"
>     }
> 

I have tried:
          `/usr/local/bin/maildirmake $HOME/Maildir/.Spam/`
and
          `/usr/local/bin/maildirmake -f Spam $HOME/Maildir`

with both creating Spam as a file :(

> You don't have to import HOME, it's default.

If I do not import HOME, my emails will be lost in space. I
do not know why. I am running qmail-ldap with courier-imap
3.0.8.

Any idea?

--
roger


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

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-maildrop mailing list
Courier-maildroplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courie
r-maildrop
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )