Update anonymize_headers.pcre (#3563)

Added anonymization for Sieve and changed regex for Rspamd to look same as new Sieve regex
master
Dmitriy Alekseev 2020-05-21 21:04:03 +03:00 committed by GitHub
parent 16b2a2c055
commit d5ed0c0368
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -3,9 +3,13 @@ if /^\s*Received:.*Authenticated sender.*\(Postcow\)/
/^Received: from .*? \([\w-.]* \[.*?\]\)(.*|\n.*)\(Authenticated sender: (.+)\)\s+by.+\(Postcow\) with (.*)/ /^Received: from .*? \([\w-.]* \[.*?\]\)(.*|\n.*)\(Authenticated sender: (.+)\)\s+by.+\(Postcow\) with (.*)/
REPLACE Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with $3 REPLACE Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with $3
endif endif
if /^\s*Received: from rspamd \(.*mailcow-network.*\).*\(Postcow\)/ if /^\s*Received: from.* \(.*dovecot-mailcow.*mailcow-network.*\).*\(Postcow\)/
/^Received: from rspamd (.*|\n.*)\((.+) (.+)\)\s+by (.+\(Postcow\)) with (.*)/ /^Received: from.* (.*|\n.*)\((.+) (.+)\)\s+by (.+) \(Postcow\) with (.*)/
REPLACE Received: from rspamd (RSPAMD_HOST $3) by $4 with $5 REPLACE Received: from sieve (sieve $3) by $4 (Postcow) with $5
endif
if /^\s*Received: from.* \(.*rspamd-mailcow.*mailcow-network.*\).*\(Postcow\)/
/^Received: from.* (.*|\n.*)\((.+) (.+)\)\s+by (.+) \(Postcow\) with (.*)/
REPLACE Received: from rspamd (rspamd $3) by $4 (Postcow) with $5
endif endif
/^\s*X-Enigmail/ IGNORE /^\s*X-Enigmail/ IGNORE
/^\s*X-Mailer/ IGNORE /^\s*X-Mailer/ IGNORE