anonymize_headers.pcre 1.1 KB

1234567891011121314151617181920
  1. if /^\s*Received:.*Authenticated sender.*\(Postcow\)/
  2. #/^Received: from .*? \([\w-.]* \[.*?\]\)\s+\(Authenticated sender: (.+)\)\s+by.+\(Postcow\) with (E?SMTPS?A?) id ([A-F0-9]+).+;.*?/
  3. /^Received: from .*? \([\w-.]* \[.*?\]\)(.*|\n.*)\(Authenticated sender: (.+)\)\s+by.+\(Postcow\) with (.*)/
  4. REPLACE Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with $3
  5. endif
  6. if /^\s*Received: from.* \(.*dovecot-mailcow.*mailcow-network.*\).*\(Postcow\)/
  7. /^Received: from.* (.*|\n.*)\((.+) (.+)\)\s+by (.+) \(Postcow\) with (.*)/
  8. REPLACE Received: from sieve (sieve $3) by $4 (Postcow) with $5
  9. endif
  10. if /^\s*Received: from.* \(.*rspamd-mailcow.*mailcow-network.*\).*\(Postcow\)/
  11. /^Received: from.* (.*|\n.*)\((.+) (.+)\)\s+by (.+) \(Postcow\) with (.*)/
  12. REPLACE Received: from rspamd (rspamd $3) by $4 (Postcow) with $5
  13. endif
  14. /^\s*X-Enigmail/ IGNORE
  15. # Not removing Mailer by default, might be signed
  16. #/^\s*X-Mailer/ IGNORE
  17. /^\s*X-Originating-IP/ IGNORE
  18. /^\s*X-Forward/ IGNORE
  19. # Not removing UA by default, might be signed
  20. #/^\s*User-Agent/ IGNORE