Hello,

I just migrated from Postfix/Courier/Maildrop to
Postfix/Dovecot/Deliver/Sieve and don't unterstand the right syntax
for sieve :(
I searched and found many small examples and many links to the RFC,
but nothing was usefull for me (or i didn't unterstand it)

I installed the latest Dovecot-Sieve (hg).

Examples from my maildrop config:

# Filter FROM
if($E =~ /n...@domain1\.tld/)
{
 to "$M/.Friends.Name1/"
}

# Filter FROM with OR
if($E =~ /na...@domain1\.tld/ || $E =~ /na...@domain2\.tld/)
{
 to "$M/.Friends.Name2/"
}

# Filter Mailinglists
if (/^List-Id: .*<sylpheed\.sraoss\.jp>/)
{
 to "$M/.ML.Sylpheed/"
}

# Filter FROM AND SUBJECT
if($E =~ /[email protected]/ && /^Subject: *foooooo/)
{
 to "$M/.foo/"
}

# Filter TO
 if (hasaddr("[email protected]"))
 {
   to "$M/.foo/"
 }

# Or something like this:
if($E =~ /....@facebookmail\.com/)
{
 if (/^Subject: .*invited you to join the group/)
 {
   to "$M/.Facebook.Invites.Groups/"
 }
 if (/^Subject: .*invited you to the event/)
 {
   to "$M/.Facebook.Invites.Events/"
 }
}

$E was a shortcut for (adressmatching):
 ADDR=getaddr($MATCH)
 E=`echo $ADDR | sed 's/^M//'`

$M was the path to the maildir, like /home/vmail/domain.tld/name

Is that possible? Or is maildrop simple more powerful?

Thank you :-)

Dieter

Reply via email to