[Dovecot] dovecot 1.0.2, sieve 1.0.2 and regex
Alexander Hoogerhuis
alexh at boxed.no
Fri Aug 3 03:24:56 EEST 2007
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 at a.stuff.com" {
>> fileinto "INBOX.Adin/Logwatch Stuff";
>> }
>> elsif header :contains "From" "logwatch at 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
More information about the dovecot
mailing list