SF.net SVN: postfixadmin:[1442] trunk/VIRTUAL_VACATION/vacation.pl
Brought to you by:
christian_boltz,
gingerdog
From: <va...@us...> - 2013-03-12 19:33:56
|
Revision: 1442 http://sourceforge.net/p/postfixadmin/code/1442 Author: valkum Date: 2013-03-12 19:33:54 +0000 (Tue, 12 Mar 2013) Log Message: ----------- added custom noreply detection Modified Paths: -------------- trunk/VIRTUAL_VACATION/vacation.pl Modified: trunk/VIRTUAL_VACATION/vacation.pl =================================================================== --- trunk/VIRTUAL_VACATION/vacation.pl 2013-03-03 01:23:50 UTC (rev 1441) +++ trunk/VIRTUAL_VACATION/vacation.pl 2013-03-12 19:33:54 UTC (rev 1442) @@ -174,6 +174,15 @@ # disabled by default our $interval = 0; +# Send vacation mails to do-not-reply email adresses. +# By default vacation email adresses will be sent. +# For now emails from bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter won't +# be answered when $custom_noreply_pattern is set to 1. +# default = 0 +our $custom_noreply_pattern = 0; +our $noreply_pattern = 'bounce|do-not-reply|facebook|linkedin|list-|myspace|twitter'; + + # instead of changing this script, you can put your settings to /etc/mail/postfixadmin/vacation.conf # or /etc/postfixadmin/vacation.conf just use Perl syntax there to fill the variables listed above # (without the "our" keyword). Example: @@ -586,7 +595,8 @@ my $logger = get_logger(); if($address =~ /^(noreply|postmaster|mailer\-daemon|listserv|majordomo|owner\-|request\-|bounces\-)/i || - $address =~ /\-(owner|request|bounces)\@/i ) { + $address =~ /\-(owner|request|bounces)\@/i || + ($custom_noreply_pattern == 1 && $adress =~ /^.*($noreply_pattern).*/i) ) { $logger->debug("sender $address contains $1 - will not send vacation message"); exit(0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |