[Dovecot] dovecot 1.0.2, sieve 1.0.2 and regex
I've just ported a largeish procmail script across to sieve and want to get to use wildcards in filing mail and can't seem to get regex to work.
The script starts nicely with:
require ["fileinto","regex","envelope","vacation","regex"];
and a bit down these few lines comes into play:
elsif header :regex "From" "logwatch.*stuff.com" { fileinto "INBOX.Admin/Logwatch Stuff"; }
and regex just never seem to catch.
I have 50ish machines in the stuff.com domain, and writing an induvidual section like this works:
elsif header :contains "From" "logwatch@a.stuff.com" { fileinto "INBOX.Adin/Logwatch Stuff"; } elsif header :contains "From" "logwatch@b.stuff.com" { fileinto "INBOX.Adin/Logwatch Stuff"; } etc.
But this shouldn't be neccesary?
mvh, A
Alexander Hoogerhuis wrote:
I've just ported a largeish procmail script across to sieve and want to get to use wildcards in filing mail and can't seem to get regex to work.
The script starts nicely with:
require ["fileinto","regex","envelope","vacation","regex"];
and a bit down these few lines comes into play:
elsif header :regex "From" "logwatch.*stuff.com" { fileinto "INBOX.Admin/Logwatch Stuff"; }
and regex just never seem to catch.
I have 50ish machines in the stuff.com domain, and writing an induvidual section like this works:
elsif header :contains "From" "logwatch@a.stuff.com" { fileinto "INBOX.Adin/Logwatch Stuff"; } elsif header :contains "From" "logwatch@b.stuff.com" { fileinto "INBOX.Adin/Logwatch Stuff"; } etc.
But this shouldn't be neccesary?
mvh, A
Correct answer:
s/\//./
Most answers comes pretty easy on their own after mailing a list about a problem that seems impossible... :]
-A -A
participants (1)
-
Alexander Hoogerhuis