Thierry B a écrit :
Thorsten Haude a écrit :
Hi,
* Thierry B wrote (2006-01-27 14:20):
I'd like to make a rule so that mail for xx...@xx.xx are put in a
subfolder, but I'd like to make the rule so it matches if the field "to"
is xx...@xxx.xx or if there is multiples mails in "to" like that: to:
yy...@yy.yy,xx...@xx.xx, he puts that in my subfolder.
Untested:
foreach /^(To|Cc): .*/
{
foreach (getaddr($MATCH)) =~ /.+/
{
if (tolower($MATCH) == xx...@xx.xx)
{
exception
{
to "$HOME/$DEFAULT/.Teil/"
}
}
}
}
Hello,
I tested your rule, but I have an error, so postfix deffered the mail
until I remove this rule of maildrop.
I don't find where is the error.
- If the address (xx...@xx.xx here) contains "special" characters, you'll
need to escape them.
- The subfolder must exist and be writable by the uid "running" maildrop
You can debug maildrop manually:
# maildrop -V 4 -d thierry@domain.example .... < message.eml
(put other arguments in place of "...."., if you use $1, $2, ... in your
maildroprc/.mailfilter)