April said:
if test: elsif ($header && ^From:.*?([\w.-]+@[\w.-]+))
The above isn't showing any delimiters for me. Anyway, the From in your
example doesn't have a colon
) following it in the actual email
"from" line you posted. Where/what is $_ coming from for your check?
If $_ isn't what you want to check against, you might want $variable
=~ /m/. Anyway, try chaning it to /^From:?.*?([\w.-]+@[\w.-]+)/ :?
makes ":" optional in the regex match.
Also, do you want to capture the address? If not, you don't need to use
() in the regex. Again, I'd suggest a better check, especially if you
want to ensure it makes some attempt to verify it's at least a
legitimate _looking_ email address, but if you're not doing that, then
I suppose thw above should work for capturing most.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!