Hi David,
Many thanks for your response, but a few follow-up questions...
I actually think I just noticed that there may be a more appropriate
place in vacation.pl for what I'm trying to do...
Above that section where the headers get examined, there is this section:
# Make sure the email wasn't sent by someone who could be a mailing
# list etc; if it was, then we abort after appropriate logging.
sub check_and_clean_from_address {
my ($address) = @_;
my $logger = get_logger();
if($address =~
/^(noreply|postmaster|mailer\-daemon|listserv|majordomo|owner\-|request\-|bounces\-)/i
||
$address =~ /\-(owner|request|bounces)\@/i ) {
$logger->debug("sender $address contains $1 - will not send
vacation message");
exit(0);
}
$address = strip_address($address);
if($address eq "") {
$logger->error("Address $address is not valid; exiting");
exit(0);
}
#$logger->debug("Address cleaned up to $address");
return $address;
}
This appears to be a much better section to do what I really think needs
to be done....
First question: would the from= address that I saw in my postfix log be
matched by the $address variable above?
Anyway, my overall goal here is concerning the huge growth in these
social networking sites - shouldn't vacation.pl specifically take these
systems into account? Meaning, rather than us sysadmins just trying to
keep up with these individually, shouldn't official support be added to
vacation.pl for these services?
There is Facebook, Twitter, LinkedIn, MySpace, and now Google+ (did I
miss any?)...
Next question: do you agree that this is the more appropriate place for
checks for these kinds of services? I think these social networking
services definitely fall into the category of 'etc' in the comments.
So, I'm thinking we could modify that text to:
# Make sure the email wasn't from a mailing list, an automated message
# from a social networking site, etc; if it was, then we abort after
# appropriate logging.
Then, modify the code appropriately with as many known examples as possible.
There should also be a formal process for us (users) to submit new
strings for official inclusion, but these should absolutely be approved
by someone who knows what they are doing and how these code sections in
vacation.pl actually work.
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)?
Also - is that a 'contains' search? If so, I'm guessing I could remove
the plural form (bounces), since that would also be matched by 'bounce'?
Again, thanks for taking the time to discuss this, my only goal is to
make vacation.pl better...
Charles
|