Re: [Postfixadmin-devel] Please help getting my multi-string from header check matching...
Brought to you by:
christian_boltz,
gingerdog
From: David G. <da...@co...> - 2013-03-26 11:37:42
|
Hi, I'd probably merge it for you Ideally make the patch against the vacation.pl which is in trunk. That would make my life easiest. David. On 26 Mar 2013, at 11:17, Tanstaafl <tan...@li...> wrote: > Well, I guess Rudi went on vacation or something... > > I'm sure glad he stayed long enough for me to get this working. :) > > So, if I were to attempt to create a patch for this (shudder - I'm not > the best one to be doing this)), which vacation.pl should the path be > made against (I currently have 2.3.6 installed)? And if I got it right, > would anyone other than Rudi be inclined to accept it and incorporate it > into the core vacation.pl? > > The change is fairly minor, and it greatly (imho) improves (reduces the > number of messages that the vacation message should *not* respond to), > as well as makes it fairly trivial for admins to add their own strings > to the list of strings to test for. > > Thanks... > > On 2013-03-18 4:00 PM, Tanstaafl <tan...@li...> wrote: >> Ok, its been almost a week, and this is working perfectly... >> >> Rudi, did you get a chance to look at this yet? It (just the one new >> variable, only one test performed in the 'sub >> check_and_clean_from_address' function) is so much simpler than what we >> had before (a new option and new variable, and 3 tests in the 'sub >> check_and_clean_from_address' function)... >> >> Thanks again for your help! >> >> Charles >> >> Quoting the relevant part of my last email on this, showing what I am >> using now)... >> >> On 2013-03-13 11:43 AM, Tanstaafl <tan...@li...> wrote: >> <snip> >>> Wouldn't it make more sense to adjust the defaults for the custom >>> pattern to include all of the values in the immediately prior two tests, >>> and change this to just the one test, instead of basically having three >>> separate tests (one to test the local part, the next to test the domain >>> part, and finally our new custom one to test the whole thing? >>> >>> And if this is ultimately the desired goal, we could rename the >>> variables one last time, and end up with something like: >>> >>> # This is the list of strings that is checked against both the >>> # envelope sender and any/all From header addresses that, if >>> # matched, results in the vacation message not being sent. >>> our $noreply_pattern = >>> 'bounce|do-not-reply|facebook|linkedin|list-|listserv|mailer\-daemon|majordomo|myspace|noreply|owner\-|\-(owner|request|bounces)|postmaster|request\-|twitter'; >>> >>> Then the new 'sub check_and_clean_from_address' function would be >>> something like: >>> >>>> sub check_and_clean_from_address { >>>> my ($address) = @_; >>>> my $logger = get_logger(); >>>> >>>> if($address =~ /^.*($noreply_pattern).*/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; >>>> } >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_mar >> _______________________________________________ >> Postfixadmin-devel mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel >> > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Postfixadmin-devel mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel |