anonymize_headers.pcre 817 B

123456789101112131415
  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 rspamd \(.*mailcow-network.*\).*\(Postcow\)/
  7. /^Received: from rspamd (.*|\n.*)\((.+) (.+)\)\s+by (.+\(Postcow\)) with (.*)/
  8. REPLACE Received: from rspamd (RSPAMD_HOST $3) by $4 with $5
  9. endif
  10. /^\s*X-Enigmail/ IGNORE
  11. /^\s*X-Mailer/ IGNORE
  12. /^\s*X-Originating-IP/ IGNORE
  13. /^\s*X-Forward/ IGNORE
  14. # Not removing UA by default, might be signed
  15. #/^\s*User-Agent/ IGNORE