To configure GRR to send emails for reports or other purposes:
Ensure email settings are correct by running back through the configuration script if needed (or by checking
/etc/grr/server.local.yaml to include the following at the end of the file:
Worker.smtp_server: <server> Worker.smtp_port: <port>
and, if needed,
Worker.smtp_starttls: True Worker.smtp_user: <user> Worker.smtp_password: <password>
After configuration is complete, restart the GRR worker(s). You can test this configuration by running *OnlineNotification” flow on any of the online clients (in the “Administrative” category). This flow sends an email to a given email address as soon as the client goes online. If the client is already online, the email will be sent next time it checks in (normally within 10 minutes).
Custom Email addresses¶
When GRR sends an Email to a GRR user, the destination Email address defaults to
<username>@<Logging.domain>. Starting with version 220.127.116.11, GRR can alternatively use custom Email addresses. In this mode, GRR will store a separate Email address for each user in the data store. To enable this mode, set the following option in the GRR config:
The value of the custom Email addresses can be set in one of the following ways:
RemoteUserWebAuthManagerfor authentication, the Email address can be passed to GRR in the
X-Remote-Extra-EmailHTTP header. (The actual of the header is configurable using the
Using the GRR root API:
grr_api_shell_raw_access --exec_code "grrapi.root.CreateGrrUser(username='foo', email@example.com')"
grr_api_shell_raw_access --exec_code "grrapi.root.GrrUser('foo').Get().Modify(firstname.lastname@example.org')"