On Sun, Apr 18 2021, Tomi Ollila wrote:
>
> not perl, but python3 -c 'import socket; print(socket.getfqdn())'
notmuch_passwd_sanitize()
{
python3 -c '
import os, sys, pwd, socket
pw = pwd.getpwuid(os.getuid())
user = pw.pw_name
name = pw.pw_gecos.partition(",")[0]
fqdn = socket.getfqdn()
for l in sys.stdin:
l = l.replace(user, "USERNAME").replace(fqdn, "FQDN").replace(name, "USER_FULL_NAME")
sys.stdout.write(l)
'
}
could work, could not remember whether it was PYTHON or NOTMUCH_PYTHON,
and tested only manually on command line...
>
> Tomi
Tomi
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org