On 2013-03-02 1:19 PM, Christian Boltz <pos...@cb...> wrote:
> Move your line near the beginning, so that it looks like this:
>
>>> > > if (/^\s+(.*)/ and $lastheader) { $$lastheader .= " $1"; next; }
>>> > ># new 'multi-string' line is for adding any string you want to test for in the from header, but be careful what you put in here
>>> > > elsif (/^from:.*(alerts|autoreply|bounce|do-not-reply|facebook|linkedin|list-|myspace|noreply|twitter).*/i) { $logger->debug("Multi-string From header matching $1 found; exiting"); exit (0); }
>>> > > elsif (/^from:\s*(.*)\n$/i) { $from = $1; $lastheader = \$from; }
> Now perl will first check your new line, and if it doesn't match, it will
> run the line that fills $from.
Ka-ching!
Thanks VERY much Christian, tested and working now...
And many thanks also for the more in-depth explanations, but, just so I
understand this a little better...
What precisely is that other 'from' line checking:
elsif (/^from:\s*(.*)\n$/i) { $from = $1; $lastheader = \$from; }
and why would it be acting like a 'whitelist' of sorts?
Thanks again! I'm soooo glad to get this working... :)
|