On 2012-02-21 8:02 AM, David Goodwin <da...@co...> wrote:
>> So, with this in mind, if I modified the above to, say, something like:
>>
>> if($address =~
>> /^(noreply|postmaster|mailer\-daemon|listserv|majordomo|owner\-|request\-|bounces\-)/i
>> ||
>> $address =~ /\-(owner|request|bounce|bounces)\@/i ) {
>> $logger->debug("sender $address contains $1 - will not send
>> vacation message");
>> exit(0);
>> }
>>
>> (I simply added 'bounce' before 'bounces')
>>
>> Would that catch the example I gave from linkedin, since it is
>> from=blahblah.bounce.linkedin.com (bounce is singular, not plural)?
> What you've added is looking for -bounce@
>
> Which will not match bla...@bo...
Oh!? Maybe I just realized... ok, so looking more closely, that section
of code is assembling two strings separated by a '-', but only for the
localpart of the sender address, correct?
So, if I wanted to add a section to match on only something in the host
part (ie, *@*$string*, can you provide the code to do that?
Maybe something as simple as:
if($address =~
/^(noreply|postmaster|mailer\-daemon|listserv|majordomo|owner\-|request\-|bounces\-)/i
||
$address =~ /\-(owner|request|bounces)\@/i
||
$address =~ /\(linkedin|facebookmail|twitter|myspace)/i) {
$logger->debug("sender $address contains $1 - will not send
vacation message");
exit(0);
}
I'm sure my code sample is wrong, but maybe you could tweak it?
I'll be happy to provide a patch once I have a working/tested version.
Thanks again David...
|