mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
Merge pull request #482 from csware/autoresponders
Don't reply to known auto generated mails
This commit is contained in:
commit
f40496163f
@ -575,7 +575,7 @@ sub check_and_clean_from_address {
|
||||
my ($address) = @_;
|
||||
my $logger = get_logger();
|
||||
|
||||
if($address =~ /^(noreply|postmaster|mailer\-daemon|listserv|majordomo|owner\-|request\-|bounces\-)/i ||
|
||||
if($address =~ /^(noreply|no\-reply|do_not_reply|no_reply|postmaster|mailer\-daemon|listserv|majordomo|owner\-|request\-|bounces\-)/i ||
|
||||
$address =~ /\-(owner|request|bounces)\@/i ||
|
||||
($custom_noreply_pattern == 1 && $address =~ /^.*($noreply_pattern).*/i) ) {
|
||||
$logger->debug("sender $address contains $1 - will not send vacation message");
|
||||
@ -608,6 +608,7 @@ while (<STDIN>) {
|
||||
elsif (/^message\-id:\s*(.*)\s*\n$/i) { $messageid = $1; $lastheader = \$messageid; }
|
||||
elsif (/^x\-spam\-(flag|status):\s+yes/i) { $logger->debug("x-spam-$1: yes found; exiting"); exit (0); }
|
||||
elsif (/^x\-facebook\-notify:/i) { $logger->debug('Mail from facebook, ignoring'); exit(0); }
|
||||
elsif (/^x\-amazon\-mail\-relay\-type:\s*notification/i) { $logger->debug('Notificatiom mail from Amazon, ignoring'); exit(0); }
|
||||
elsif (/^precedence:\s+(bulk|list|junk)/i) { $logger->debug("precedence: $1 found; exiting"); exit (0); }
|
||||
elsif (/^x\-loop:\s+postfix\ admin\ virtual\ vacation/i) { $logger->debug('x-loop: postfix admin virtual vacation found; exiting'); exit (0); }
|
||||
elsif (/^Auto\-Submitted:\s*no/i) { next; }
|
||||
@ -619,7 +620,7 @@ while (<STDIN>) {
|
||||
elsif (/^(x\-(avas\-spam|spamtest|crm114|razor|pyzor)\-status):\s+(spam)/i) { $logger->debug("$1: $3 found; exiting"); exit (0); }
|
||||
elsif (/^(x\-osbf\-lua\-score):\s+[0-9\/\.\-\+]+\s+\[([-S])\]/i) { $logger->debug("$1: $2 found; exiting"); exit (0); }
|
||||
elsif (/^x\-autogenerated:\s*reply/i) { $logger->debug('x-autogenerated found; exiting'); exit (0); }
|
||||
elsif (/^x\-auto\-response\-suppress:\s*oof/i) { $logger->debug('x-auto-response-suppress: oof found; exiting'); exit (0); }
|
||||
elsif (/^(x\-auto\-response\-suppress):\s*(oof|all)/i) { $logger->debug('$1: $2 found; exiting'); exit (0); }
|
||||
else {$lastheader = '' ; }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user