Le 01/02/2011 02:37, Daniel Bromberg a écrit :
> [snip]
> if ( /^X-Spam-Status: Yes/ )
> {
> `test -d $HOME/Maildir/.Junk\ E-mail`
> if ( $RETURNCODE != 0 )
> {
> `logger -i -p mail.info "maildroprc: creating .Junk E-mail in
> $HOME"`
> `maildirmake $HOME/Maildir/.Junk\ E-mail`
> `echo "Junk E-mail" >> $HOME/Maildir/subscriptions`
> `chown vmail:mail $HOME/Maildir/subscriptions`
> `chmod 700 $HOME/Maildir/subscriptions`
> }
> to "Maildir/.Junk E-mail"
> }
instead of `test ...`, use exceptions:
if (/^X-Spam-Flag:\s*YES/)
{
exception {
to "$_JUNK_DEST";
}
`maildirmake ... && chmod .... && chmod ... & echo ...`
to "$_JUNK_DEST";
}
this way, once the user has received a spam that caused the creation of
the maildir, the 'test' is no more performed.
you seem to use dovecot. then why use maildrop? can't you just use
dovecot-lda with sieve? (dovecot can auto-create maildirs).