Hello,
Am Mittwoch, 9. Januar 2013 schrieb Tanstaafl:
> I changed the line per your recommendation to match only on the from
> header, and another one that should have been matched didn't...
>
> I'd really appreciate some help getting this line working so I can
> stop replying to messages from linkedin and others I shouldn't be
> replying to...
> Why didn't this line:
> > elsif
> > (/^from:\s+(bounce|do-not-reply|facebook|linkedin|list-|myspace|twi
> > tter)/i) { $logger->debug("Multi-string From header matching $1: $2
> > found; exiting"); exit (0); }
> match on the string 'bounce'?
Probably because you only allow whitespace ("\s") between the "from:"
and "bounce" - sorry for overlooking this before.
You can replace the \s with .* to allow any number of any character, but
it would probably be better to have it more restricted (for example
".*\@.*(bounce|....." would mean it only matches on the domain part -
and yes, AFAIK the @ needs to be escaped in perl). Again, seeing the
mail headers would it make easier to find out how strict the regex can
be.)
You might also want to read http://perldoc.perl.org/perlre.html to get a
better understanding of the perl regex syntax ;-)
Regards,
Christian Boltz
--
> By getting back to the bugs you are high-jacking the thread
> and drawing away attention of what is asked.
I'm ready to try this wonderfull new car with no engine nor
wheels... [> houghi and jdd in opensuse-factory]
|