# Obfuscating mailto:foo@bar.com when importing mail archives

**URL:** <https://meta.discourse.org/t/obfuscating-mailto-foo-bar-com-when-importing-mail-archives/193584>\
**Category:** Product Support\
**Created:** [June 11, 2021, 9:31pm UTC](https://meta.discourse.org/t/obfuscating-mailto-foo-bar-com-when-importing-mail-archives/193584 "2021-06-11T21:31:00Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [June 12, 2021, 7:29am UTC](https://meta.discourse.org/t/obfuscating-mailto-foo-bar-com-when-importing-mail-archives/193584/6 "2021-06-12T07:29:33Z")

</div>

> [@dachary](#):
>
> Globally replace content in the posts with something like s/{email\_regexp}/obfuscated/

This is the way I should go.

I would use PostgreSQL `regexp_replace` to replace all email addresses in `posts.raw` and `posts.cooked`.

---

_[View the full topic](https://meta.discourse.org/t/obfuscating-mailto-foo-bar-com-when-importing-mail-archives/193584)._
