Lars Holmström wrote: > I have recently start receiving spam mails that usually has the > following two lines in the mailheader. > > > From: "[%from_name%]" <[%from_email%]> > To: [%to%] > > I would like some help with the maildrop filtering. > > I tested with the following > > #------- > if (/^From: \[*\]/ ) > { > exception { > to $HOME/Maildir/.spam2/ > } > } > #------- > but with little success.
You are missing a dot. That regex should be: /^From: \[.*\]/ Just keep in mind that with your previous example, that regex will match all the way up to the last "]" on the line. -- Bowie ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users